Hi, I'm trying to get the phone no. of the handset in the Emulator as
follows:

private Context context;


context = getApplicationContext();
                TelephonyManager mTelephonyMgr =
(TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
                strPhoneNo = mTelephonyMgr.getLine1Number().toString();
                strIME = mTelephonyMgr.getDeviceId();
                Toast.makeText(ReadWebpage.this, strPhoneNo,
Toast.LENGTH_LONG).show();




However, on the emulator, both  strPhoneNo and strIME are blank. I
have

<uses-permission android:name="android.permission.READ_PHONE_STATE"></
uses-permission>

Do I need to enter some values for the Emulator somewhere, or should I
get 'something' !

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to