11-17-2009 06:34 AM
i need to use pin number and phone number of the device but you know if phone number is not set, we can't get that, so i decided to use IMSI but i am not able to convert this into String.
give me this = [B@99721fbd in simulator and when i deployed it on device, i got [B at start.
String str=new String(imsi); gives me some square boxes
any idea why?
Solved! Go to Solution.
11-17-2009 06:48 AM
the [B@99721fbd i is correct.
This happens when you print out a byte array.
The problem why you see the square boxes when converting it to string is that the documentation says:
"IMSI in BCD format"
11-17-2009 07:35 AM
yeh i did see that but now i am searching how can i convert this into to integer or string.?
11-17-2009 08:45 AM
Any one who used this,Please guide me !
How can i use this IMSI either as string or int.
11-17-2009 08:53 AM
try something like:
public String toString(byte pBuffer)
StringBuffer oBuffer = new StringBuffer();
for (int i=0; i<pBuffer.length; i++)
11-17-2009 08:55 AM
11-18-2009 12:57 AM
Thanks for all, who put some effort to solve my problem.
I really appreciate that.