Reading out of phone information

kkolle

Member
Licensed User
Longtime User
Hello!

Maybe I´m blind but I can´t find any information about reading out of phone information like this:
- my own phonenumber
- providername
- servicestatus
- roaming
- signalstrength

Can anybody help me?

Thanks a lot!
 

Amalkotey

Active Member
Licensed User
Longtime User
Hi KKolle,

with the Phone Library can read the device information. See here!

regards
Amalkotey
 
Upvote 0

kkolle

Member
Licensed User
Longtime User
HI Amalkotey!

That´s right!

There are only functions for reading out:
- GetDeviceId (357841XXXXXXXXXX)
- Manufacturer (HTC)
- Model (HTC Desire)
- Product (htc_bravo)
- SdkVersion (8)

But where I can find information about:
- my own phonenumber (+49171XXXXXX)
- providername (Telekom)
- etc.

Greetings from Paderborn :)
 
Upvote 0

alfcen

Well-Known Member
Licensed User
Longtime User
Hi to Paderborn

Access to phone numbers, providers, etc would probably hurt Android's privacy policy. Likewise, you can't engage/disengage GPS in code.

I would not be happy knowing that an app can read my phone number in the background and send it to an unknown server.
 
Upvote 0

Amalkotey

Active Member
Licensed User
Longtime User
Hello KKolle,

I've tested a few times. If I create an Eclipse untr Adnroid.projekt and implement the following Java code, I have full access to the SIM card information. The problem is that you the method

B4X:
TelephonyManager tm = (TelephonyManager) getSystemService(TELEPHONY_SERVICE);

is needed, which is declared in the class Activity. Erel apparently generated by a derivation of "extend Activity" code when converting to Java. I think the Erel access only when an update of B4A generated in this method.

regards
Amalkotey
 
Upvote 0

kkolle

Member
Licensed User
Longtime User
Hi Amalkotey!

That´s why I was asking!
Before I found Basic4Android I made some tests with eclipse.

But I thought that I´m just too blind to find it in B4A!

@Erel: Maybe you could update (all) these functions in the phone library. Shall I open a new thread in "Bugs & wishlist"?

Thanks alot!
 
Upvote 0
Top