Hi,

I am trying to create an app that gets the location and telephone
number of the phone.

This is the Code I am using to get the telephone number (I am focusing
on sdk 1.5) and in the emulator this works

try {
            this.telMgr = (TelephonyManager) this.getSystemService
(Context.TELEPHONY_SERVICE);
            this.telephoneNumber = this.telMgr.getLine1Number();
            LogMessage(String.format("Your Telephone Number:%s",
this.telephoneNumber));
            } catch(Exception ex)
            {
                LogMessage(ex.getMessage());
            }

However on my HTC Hero it doesn't.

The Permissions I am using for both Location and Telephone number
are...

    <uses-permission
android:name="android.permission.ACCESS_FINE_LOCATION"></uses-
permission>
<uses-permission
android:name="android.permission.ACCESS_MOCK_LOCATION"></uses-
permission>
<uses-permission android:name="android.permission.CALL_PHONE"></uses-
permission>
<uses-permission
android:name="android.permission.ACCESS_COARSE_LOCATION"></uses-
permission>

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

Can anyone help me out with some pointers on where to start looking?

Regards

Mark

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

Reply via email to