webOS Nation Forums >  Homebrew >  webOS patches > [Help]How can I get the Phone Number when phone coming in or out?
[Help]How can I get the Phone Number when phone coming in or out?

  Reply
 
LinkBack Thread Tools Display Modes
Old 01/25/2012, 07:17 PM   #1 (permalink)
Member
 
Join Date: Oct 2011
Posts: 5
Likes Received: 0
Thanks: 1
Thanked 0 Times in 0 Posts
Question [Help]How can I get the Phone Number when phone coming in or out?

Hello everyone~Now,I use a pre3 at&t in China,but the mobile phone number is different from the Fixed telephone number.
For example,the fixed number in shanghai is 021-88888888,the pre3 can recognize the number and show "shanghai" under the phone number when I dialing the number or some one call me.
But when I call a mobile phone,it only show "Mobile Phone" under the mobile phone number.
I want to create a app to recognize the mobile phone region and show it under the mobile phone number when I dialing.I have the database to recognize the region,for example,the mobile phone number in China is 11 digitals,for example,15000711234,I can recognize the region by the number "1500071",but I don't know how to get the Phone Number when I dialing.
I have found some files,for example,(/usr/palm/frameworks/globalization/submission/44/formats/cn.area.json),this file can help the pre3 to recognize the fixed phone region.
and in the file /usr/palm/frameworks/mojo/builtins/palmglobalizationVersion1_0.js palmglobalizationVersion1_0.js,I have found some codes just like to recognize the mobile phone number,……else {ret.area={sn: rb.$L("Mobile Number"),ln: rb.$L("Mobile Number")};}},When I change the string ("Mobile Number") to others,and then change it in pre3,but it is useless,it also show the "Mobile Number" under the Phone Number,How can I do that?
I just want to get the phone number when I dialing,the following code will be easier……Please help me,Thank you very much~
The most important code as follows in my opinion:
else if(number.mobilePrefix!==undefined){var prefixzz = number.mobilePrefix + number.subscriberNumber.substr(0,1);var index = Utils.getJsonFile("/media/cryptofs/apps/usr/palm/applications/com.treo8.app.callshow/formats/cn."+prefixzz+".json", "cn."+prefixzz);var areaNames = Utils.getJsonFile("/media/cryptofs/apps/usr/palm/applications/com.treo8.app.callshow/formats/cn.geo.json", "cn.geo");if ((number.countryCode===undefined||number.countryCode==86) && index && areaNames){ var appendixzz = Number(number.subscriberNumber.substr(1,3));var NameIndex = index[appendixzz].toString();var ProvIndex = Number(NameIndex.substr(0,2));var CityIndex = Number(NameIndex.substr(2))+100;var TheName = areaNames[ProvIndex]+areaNames[CityIndex];ret.area={sn:TheName,ln:TheName};}
How number.mobilePrefix means?How number.subscriberNumber means?
roynote is offline   Reply With Quote
Old 01/25/2012, 07:51 PM   #2 (permalink)
Member
 
Join Date: Jan 2012
Posts: 5
Likes Received: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I know I sound like an idiot, but I'm COMPLETELY new. Can any of you tell me how to post a thread?
scratchNsniff is offline   Reply With Quote
Old 01/25/2012, 09:27 PM   #3 (permalink)
Member
 
Join Date: Oct 2011
Posts: 5
Likes Received: 0
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by scratchNsniff View Post
I know I sound like an idiot, but I'm COMPLETELY new. Can any of you tell me how to post a thread?
You can find a button called "New Thread" in the page listed as follows...
http://forums.webosnation.com/webos-patches/
roynote is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0