Get devices phone number

148 views
Skip to first unread message

burningthe...@gmail.com

unread,
Feb 1, 2017, 9:07:01 AM2/1/17
to Automate
Hi
Can you get the devices phone number? My brother is constantly changing Sims ( to get cheap rates) I would like his device to sms his number if has changed. But first how to get phone number much thanks.? Mike

Florian HubSpace

unread,
Feb 1, 2017, 10:59:55 AM2/1/17
to automa...@googlegroups.com, burningthe...@gmail.com
Hi.

In general neither the sim nor your smartphone knows your phone number.
However, you don´t need to. You could try to identify a new sim by its iccid.
You will see his number when you receive a sms or call (If his number isn´t hidden).

But i wasn´t able to find any system setting or property for the iccid.

Henrik "The Developer" Lindqvist

unread,
Feb 1, 2017, 2:05:30 PM2/1/17
to Automate, burningthe...@gmail.com
Doesn't the mobile operator block suffice to identify the carrier?
http://llamalab.com/automate/doc/block/mobile_operator.html

Florian HubSpace

unread,
Feb 2, 2017, 7:12:35 PM2/2/17
to Automate, burningthe...@gmail.com
To get the 'icc_id' you can query this content provider: content://telephony/siminfo

burningthe...@gmail.com

unread,
Feb 4, 2017, 10:30:41 AM2/4/17
to Automate
To the developer - automate is a great piece of work should be called awesome mate.! Most impressed..btw is this your day job ..how do you get time..to answer posts and keep up with all the android versions..!

burningthe...@gmail.com

unread,
Feb 4, 2017, 10:48:28 AM2/4/17
to Automate
Hi thanks forian ill give it a go, looks like a bit of a rabbit hole !, but indeed this link

https://i.stack.imgur.com/AHeRx.png

shows a column called icc_id! Ill get back 2 u if it works..

burningthe...@gmail.com

unread,
Feb 5, 2017, 8:19:01 AM2/5/17
to Automate

Hi no luck getting the icc, I put the below

content://telephony/siminfo

Into the content uri, got a null pointer exception .even after downloading permissions.so dead end here..

Any ideas

Reply all
Reply to author
Forward
0 new messages