How to find the phone number in android? - Android Software Development

Hi
Any one help me to do this .I want to find the mobile number using in the particular android mobile programmatically
I tried the following
TelephonyManager tMgr =(TelephonyManager)this.getSystemService(Context.TELEPHONY_SERVICE);
String mPhoneNumber = tMgr.getLine1Number();
It is working fine in Emulator but It is not working in my phone
How to do that
Thanks in advance

Usually phone number is not stored on SIM card so it's possible in get it common situations.

Related

EVC Get SIM Phone number

Can anyone tell me the best way (with code example ideally!) to get the current phone number of the sim in the phone. I've tried SMSGetPhoneNumber but this doesn't work with some SIMs (namely an O2 UK sim).
I believe that SMSGetPhoneNumber lineGetAddressCaps should do it, right?
Many many thanks,
Vijay
Having problems myself
I thought so too,
but i've read alot about it, and not all sim cards contain the phonenumber.. One way you can see if you are storing your number, is to open the Start -> Programs -> Sim Manager... and choose Tools -> List own numbers...
if the idx there is empty .. i assume you cannot find you number.. only imei is stored on your phone... I might be mistaken .. but this is what i concluded..
I also tried the source code at : http://blogs.msdn.com/windowsmobile/archive/2004/11/28/271110.aspx
It didn't work for me, but you can try yourself
SaShje
Hi sashje!
Thanks for your comments. We were both right!
I figured it out after looking on WIVIT's website, their lineswitcher, in their faq they give the same info you did.
Obviously SMSGetPhoneNumber can't get the phonenumber unless you've already stored one. I was surprised that not all SIMs have them stored, but you can enter your own with the sim manager, and then SMSGetPhoneNumber works perfectly. See examples of my plugin in the Magician > "See your today screen" thread!
V

Calling Card dialing

Has anyone found a utility or a way to automatically dial numbers using a calling card? This is a rather convenient feature in my previous (non-WM5) cell phone that allowed me to import my corporate phone numbers and then use automatic calling card to dial them without editing hundreds of entries in the phone book.
I have noticed the "Callingcard" code sample at MSDN, however, there does not seem to be a compiled binary available anywhere and I do not have the development environment available.
Any help or tips appreciated.
Ihave been using this one
It is one of the importat things for me
so I use Program called "Long Distance Dialer (Pocket PC Phone) 1.3"
it works on WM2003, WM2003SE and I am runing it right now on WM2005
http://www.pocketgear.com/software_detail.asp?id=12595
good luck
DNO
Thanks! I did not realize it even runs on WM5. However, it does not see to go past dialing the access number - goes to reorder / busy tone right after. Is there a trick / fix to it?
I am using it on HTC Wizard
I never had that kind of problem
I don't know how to help you
This is my settings
Name: My card name
Acces#: my number (only numeric )
Dial Seq : PIN/Destination
Wait: 1Sec Pin : My pin
Wait 1 Sec Destination
then I go to Contacts I right click on the name I want to dial , it gives me optioon >> Dial using : then Name of my calling card .
When I click on that it gives me list of the phone numbers unther that name .
Since I call from USA I do need to select option << Add 011 before number >> but I do not do it because I added 011 to all phone numbers that I call with the card , in the Contacts
I hope this will help.
Good luck
DNO
I installed Long Distance Dialer 1.5 on my PPC. I like it so much that I want to register ($4.99). However 1.5 cannot be purchased anywhere anymore. Did anyone manage to purchase a registration key for 1.5? Or alternatively are 1.3 registration keys inter-changeable with 1.5?
This seems like a great piece of software, but it won't seem to accept pins less than 4 numbers. I have all my number listed with the country code first, so I need to add 00 to call them. In the past, I've configured my calling card feature to use 00 as the pin, which works great, but I can't get this to do it and I don't want to manually add 00 to all my numbers!
Many thanks for any help,
Paul
The link is to version 1.3. What you need is version 1.5. A quick Google will give you two or three sources.
1.5 has no limitations, but has an annoying trial notice pop-up each time you use it. Where can I purchase a registration key?
Thanks for the reply. I've downloaded v1.5, but it still won't let me enter a pin of less than 4 digits. Any thoughts?
Many thanks,
Paul
Solved the problem. In v1.5 you can put spaces as well, so, even though it needs at least 4 characters, I can put two spaces and then the two zeros.
Best,
P
Interesting - I was trying to solve my problem with the software dialing only the calling card access number. I defined an address book entry with the whole number with pauses - and still only the access number gets dialed. The card I use follows the "Number followed by PIN" model with a second dial tone after you dial the access number and a third one after the called number. Any ideas what could be causing the issue? Could it be that the Wizard does not recognize that the call has been completed after it dials the access number?
free and the best calling card dialing software
this is reply to betstu2004 request i.e compiled binary from msdn betstu2004 mentioned about
its in cab format and is attached for downloading.
here is the procedure for installing and using it:
1)copy the cab file in ppc and install it
2)then using any registry editor we have to edit the values of number to be dialled and the pin number of the calling card,to do that
open registry editor
go to:
hkey_current_user
then software
then microsoft
then calling card
in this option you have to edit two entries
1st is Number which is your calling card number
2nd is Pin which is your pin number
save the changes
then to use the software
go to contacts
then
with stylus touch and hold the contact(international) you want to dial
you will see an option
call mobile using calling card
click it
and ppc will start dialling using calling card software with stored calling card number and pin
once the card is finished you can input the values of number if different from previous one and pin again
in some cases the new number and pin will only be saved in the registry after soft reseting the phone
you can even adjust the pause time which is 2 sec by default
this software is working perfectly on my xda exec and i hope you all will love it
cheers
My email to the author (VSOFTCODE) of LDD bounced. Looks like I will have to remove it after the trial expires.
Edit: I just managed to purchase a licence through Handango after all.
----->chaniana
Thanks works fine!!
chaniana - BIG thanks - it works flowlessly.
Now - if I could only get it to dial the number before the PIN!
reg key
Well I know this is not a warez site but
would it be wrong if I give out the reg code ??
I think not ,because the software no longer supported by the developer.
what you think ???
One more thing !!
I have Version 1.3 which I bought from www.pockeatgear.com
where did you find v1.5 ???
Let me know
DNO
this is cool....
chaniana , i have been looking for something like this for a while... i have 2003 not 2005 to be able to complie or change this...
I am just migrating form treo 650 and am missing a program TakePhone. what it did it let me create rule
e.g. any number starting with a string it will use a calling card so i could set +44 use a calling card x
that way when i disl a number it will intercept the call an see the first few digits, if +44 it will dialthe calling card and wait for me to hit a button to enter a pin then eait for another button to dial the number, all in a few strokes i was dialing international and never had to change my contacts. when i was there in UK all i do is disabke the rule and voila i am in business...
see if u can do this
i did something similar in VS2003 creating from scratch an app that would list the contacts and i enter a ph and pin in 2 seperate textboxes and hit dial, got it to make a call to the 1800# but could not figure out how to dial the rest automatically so i am stuck
Long Distance Dialer 1.5 at handango.com.
Just pay the 5 bucks, it may inspire others to create affordable useful software!
This software doesn't work with PocketInformant. Any solution ?
I installed Long Distance Dialer 1.5 (Trial), entered Calling card (access#, PIN)
I can see new menu item when I right click "contact", but when I select "Dial CCard" NOTHING happe! No call started.
I'm using Wizard.
Hi
I am not able to see any context menu once I tried using by stylus
I am on WM6.1
Is it still usable
cheers
chaniana said:
this is reply to betstu2004 request i.e compiled binary from msdn betstu2004 mentioned about
its in cab format and is attached for downloading.
here is the procedure for installing and using it:
1)copy the cab file in ppc and install it
2)then using any registry editor we have to edit the values of number to be dialled and the pin number of the calling card,to do that
open registry editor
go to:
hkey_current_user
then software
then microsoft
then calling card
in this option you have to edit two entries
1st is Number which is your calling card number
2nd is Pin which is your pin number
save the changes
then to use the software
go to contacts
then
with stylus touch and hold the contact(international) you want to dial
you will see an option
call mobile using calling card
click it
and ppc will start dialling using calling card software with stored calling card number and pin
once the card is finished you can input the values of number if different from previous one and pin again
in some cases the new number and pin will only be saved in the registry after soft reseting the phone
you can even adjust the pause time which is 2 sec by default
this software is working perfectly on my xda exec and i hope you all will love it
cheers
Click to expand...
Click to collapse

App to prefix numbers with operator codes

Hi there,
I have a Moto Q11 from Vivo (Brazil) and it came with wonderful little app called "EP", which does a simple yet awesome thing:
It will replace (or add) as a prefix, the operator code I choose. No matter how the phone is stored in phonebook (already with the operator code, city code, or just the number itself) it properly adds or alters the phone when I dial it.
You may configure it with the operator of your choice, and change it as you please. For example, let´s say all my phonebook entries are with "015" as the long distance operator code (eg. 0151121342213). If I configure the app with another operator (let´s say, 031), when I hit dial, it will in fact dial 0311121342213. The actual phone in the phonebook is not altered. If the phone number is stored as 1121342213, it will add the 031 as well.
I really need such an app in my Rhodium and Kaiser!
Does any1 have any idea of an app that would do this ? Tried copying the executable from the Moto Q11 to my Kaiser and it didn´t work (it says the app is not for that platform)...
Tia!
I was not able to find a program that would do it. I have found that the EP stands for Easy Prefix, and googling it gave me the impression that this app is standard for Motorola phones.
Any further help would be appreciated...
I got same issue, bro
Can anybody help people like us ?
TA
Just fyi, so far no luck
Have you tried Magicall? ( http://www.mobiion.com/magicall.html )
It can change any number you dial, based on rules. I think this would work for you (so, for example, if you dialed anything starting with 789, it would replace that with 123.
I use it for ADDING numbers to the start, so that certain numbers get dialed using a calling card, but I'm pretty sure you can replace digits as well
-Steve

Sending SMS API - partially working (Windows Mobile)

Hello,
I am using C# to send SMS from an application i'm writing.
i have tried either
1) Microsoft.WindowsMobile.PocketOutlook.SmsMessage
2) [DllImport("sms.dll")] int SmsSendMessage(...
but in both cases i need to specify a FULL phone number including country code (i.e. +972544...)
if i specify a regular number, the SMS won't reach.
the interesting thing is that when i use the built in SMS Phone's application and specify a regular number, the messages do reach.
So, have i missed something? Is there a standard way to make my messages be sent (have i forget a flag, special way of calling the API or what ?!)
Many thanks
Hi there,
I don't know a lot about programming, but maybe you could do something like the following example.
My country code = +316
Set all the country codes in a array (or something like it in C#)
When I type in the number 0612345678
Use some kind of script to split:
$countrycode = 06;
$phonenumber = 12345678;
Search in the array for '06'.
$newcountrycode = +316;
echo($newcountrycode,$phonenumber);
+31612345678
Click to expand...
Click to collapse
Maybe this will help?
issue resolved
Just to update - I found a solution to this problem
The API that I use is SmsOpen, SmsSendMessage, SmsClose (from sms.dll).
The SendSmsMessage API gets an address parameter which includes one of numerous values, the ones relevant for the solution are SMSAT_INTERNATIONAL (equals 1), And SMSAT_UNKNOWN (which is 0)
If the number starts with “+” use international, else use unknown and the phone will figue this out and add the relevant extension. Note however that the latter might not work when roaming.
enjoy

Using more than a mobile phone number

Hi all,
I found that WM 6.5.x does not allow to specify more than a phone number in mobile detail of a contact. I can use a different detail for a second mobile phone number, but if I try to send a SMS/MMS to that number, it is not selectable to be used as destination.
So, I suppose this is a limitation of WM. Am I correct? I have a Samsung GT-I8000 and I am using WM 6.5.3.23135.

Categories

Resources