Re: [android-developers] Re: Since Android 2.0 the phone number in the emulator became null - how to set it?

2009-11-02 Thread Marek Urbaniak
Thanks for your response! It's a little bit weird because after I restarted
the Android 2.0 emulator the phone number is set. I hope it was a rare
heisenbug.

On Mon, Nov 2, 2009 at 2:55 AM, Nmix nepean...@gmail.com wrote:

 Yes it is. I can see it in Settings and I can retrieve it
 with .getLine1Number().

 However... if you are using a broadcast receiver for BOOT_COMPLETED, I
 have found with 2.0 (and sporadically with earlier versions) that it
 is not available when the receiver runs. Some delay seems to be
 required before attempting to retrieve the number. I've only tested
 this on the emulator, not a real phone.

 On Nov 1, 3:00 pm, Marek Urbaniak marek.urban...@gmail.com wrote:
  It the earlier versions of Android SDK the emulator had the set phone
  number. Visible in the phone settings and accessible to applications
  through the TelephonyManager.getLine1Number method. In Android SDK 2.0
  it is not set. How to set it?

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Since Android 2.0 the phone number in the emulator became null - how to set it?

2009-11-01 Thread Nmix
Yes it is. I can see it in Settings and I can retrieve it
with .getLine1Number().

However... if you are using a broadcast receiver for BOOT_COMPLETED, I
have found with 2.0 (and sporadically with earlier versions) that it
is not available when the receiver runs. Some delay seems to be
required before attempting to retrieve the number. I've only tested
this on the emulator, not a real phone.

On Nov 1, 3:00 pm, Marek Urbaniak marek.urban...@gmail.com wrote:
 It the earlier versions of Android SDK the emulator had the set phone
 number. Visible in the phone settings and accessible to applications
 through the TelephonyManager.getLine1Number method. In Android SDK 2.0
 it is not set. How to set it?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en