BlackBerryForums.com : Your Number One BlackBerry Community      

»Sponsored Links




Reply
 
LinkBack Thread Tools
  (#1 (permalink)) Old
hibbert Offline
Thumbs Must Hurt
 
Posts: 122
Join Date: May 2007
Model: 7290
PIN: N/A
Carrier: private
Default Bluetooth - DeviceName - 03-19-2008, 08:01 AM

Hi,
i've tried this code here:
Code:
 
import net.rim.blackberry.api.options.*;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.*;
import net.rim.device.api.bluetooth.*;
import net.rim.device.api.system.*;
import net.rim.device.api.bluetooth.BluetoothSerialPortInfo;
/*
...
*/
BluetoothSerialPortInfo btinfo[] = BluetoothSerialPort.getSerialPortInfo();
        if(btinfo != null && btinfo.length > 0) {
                btdevices = new String[btinfo.length];
                for(int i=0; i < btinfo.length; ++i) {
                    btdevices[i] = btinfo[i].getDeviceName();
                }                
            } else {
                btdevices = new String[1];
                btdevices[0] = "no devices";                
            }
so now i get this little error message here:
Quote:
Originally Posted by error
cannot find symbol
symbol : method getDeviceName()
location: class net.rim.device.api.bluetooth.BluetoothSerialPortIn fo
btdevices[i] = btinfo[i].getDeviceName();
i'm using the JDE vers. 4.0.
so why get i this stupid errormessage?

thanks hibbert


I'm sorry for my bad english
   
Reply With Quote
Sponsored Links
Please Login or Register to Remove these Advertisements!

  (#2 (permalink)) Old
richard.puckett Offline
Talking BlackBerry Encyclopedia
 
richard.puckett's Avatar
 
Posts: 212
Join Date: Oct 2007
Location: Seattle, WA
Model: 8800
PIN: N/A
Carrier: AT&T
Default 03-19-2008, 10:50 AM

Looks like the method you're trying to call doesn't exist. Have you checked the API docs? Functionality is added and deprecated all the time; just because it works in one environment doesn't necessarily mean it will work in another.


Do your homework and know how to ask a good question.
   
Reply With Quote
  (#3 (permalink)) Old
simon.hain Offline
CrackBerry Addict
 
Posts: 774
Join Date: Apr 2005
Location: hamburg, germany
Model: 8700
Carrier: o2
Default 03-19-2008, 12:21 PM

Since:
JDE 4.0.2

are you using 4.0.2 or above?


java developer, Devinto, hamburg/germany
   
Reply With Quote
  (#4 (permalink)) Old
hibbert Offline
Thumbs Must Hurt
 
Posts: 122
Join Date: May 2007
Model: 7290
PIN: N/A
Carrier: private
Default 03-20-2008, 04:47 AM

i'm using 4.0 and/or 4.2.1 (in 4.2.1 it works, but i have to use the 4.0 version, except the BB crashes and i have to restore the BB to factory defaults)


I'm sorry for my bad english
   
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On






Copyright © 2004-2008 BlackBerryNews.com, BlackBerryFAQ.com, BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of Research In Motion Limited.
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.1