BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 08-22-2007, 03:56 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: May 2007
Location: Bulgaria
Model: none
PIN: N/A
Carrier: Mtel
Posts: 150
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default IMEI problem !!!

Please Login to Remove!

I want to get the IMEI programatically but i can't. I use that piece of code

Code:
IDENInfo.getIMEI()
It throws net.rim.device.api.system.UnsupportedOperationExce ption()

Can you help me?!
Offline  
Old 08-22-2007, 05:08 AM   #2 (permalink)
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

without seeing your code i can only guess, have you added the import:

import net.rim.device.api.system.IDENInfo;

and the method returns a byte array so you code should be:

byte[] imeiArray = IDENInfo.getIMEI();
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
Offline  
Old 08-22-2007, 05:09 AM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: Jun 2007
Location: Bangladesh
Model: 8800
PIN: N/A
Carrier: EDGE
Posts: 93
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi pa4o85,

UnsupportedOperationException is thrown when an attempt is made to access functionality that is not available on the current platform.

Is your device GPRS type handheld? if so, use net.rim.device.api.system.GPRSInfo instead of IDENInfo.

Cheers,
ARIF
Offline  
Old 08-22-2007, 05:18 AM   #4 (permalink)
Thumbs Must Hurt
 
Join Date: May 2007
Location: Bulgaria
Model: none
PIN: N/A
Carrier: Mtel
Posts: 150
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well jfisher, the code is ok i think. I import the class. I use this in fact :
Code:
IDENInfo.imeiToString(IDENInfo.getIMEI());
I think i should use DeviceInfo.getDeviceId(); or GRPSInfo az Arif told me...I will try it now.

Thank you, guys!
Offline  
Old 08-22-2007, 05:23 AM   #5 (permalink)
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by arifzaman View Post

UnsupportedOperationException is thrown when an attempt is made to access functionality that is not available on the current platform.
aah of course - i'll try and remember that in future,
thanks,
jon
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
Offline  
Closed Thread


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-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.