Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 13    Views: 124

othmane
Apple Fan
Profile
Posts: 105
Reg: Feb 08, 2012
Casablanca
1,050
01/18/13 07:04 AM (13 years ago)

Problem with Contact Card plugin

Hi, When I created Contact Card item, with 2 digit numbers like 15, 18, or 19 I have in the simulator like this 1 (5) , 1 (8). For 3 digit number and up it works Thanks
 
LA
Aspiring developer
Profile
Posts: 3280
Reg: Aug 16, 2012
Jerseyville, IL
42,900
like
01/18/13 07:27 AM (13 years ago)
Hi @othmane, Sit tight and just relax. Someone will help you soon. LA
 
tb
buzztouch Evangelist
Profile
Posts: 2050
Reg: Nov 03, 2011
Oxford
32,300
like
01/18/13 07:38 AM (13 years ago)
the first thing to do would be to make sure you haven't got any spaces between the numbers. If there are spaces, it generally tends to mess things up.
 
othmane
Apple Fan
Profile
Posts: 105
Reg: Feb 08, 2012
Casablanca
1,050
like
01/18/13 08:18 AM (13 years ago)
Thank you LA. Annandale: I verified there is no space, and i have this kind of error Regards
 
LA
Aspiring developer
Profile
Posts: 3280
Reg: Aug 16, 2012
Jerseyville, IL
42,900
like
01/18/13 08:24 AM (13 years ago)
Hey @othmane, Anything in logcat? You said "error" so is this actually an error? LA
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
01/18/13 08:31 AM (13 years ago)
iOS/Android? what exactly is the problem? error message? if ios - I think those phone numbers have to be valid for the device functionality to work. I'm only populating First Name, Last Name, Main Phone number and Work email on a contact at minimum and having no issues.
 
othmane
Apple Fan
Profile
Posts: 105
Reg: Feb 08, 2012
Casablanca
1,050
like
01/18/13 09:25 AM (13 years ago)
Hi Atrain53, It's IOS. The problem is about the screen displayed in the simulator. This the link of a screenshot https://www.dropbox.com/s/sjulclfpt99cehp/Screenshot_53.png Thanks
 
Calypso Kid
Aspiring developer
Profile
Posts: 780
Reg: Mar 09, 2012
Upstate New Yor...
18,200
like
01/18/13 09:55 AM (13 years ago)
It looks to me like the contact card is automatically putting the parenthesis around the area code. For example: 1(234)567-1234. This is how most contact apps work here in America because of our area code. Don't know how to change it for you though.
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
01/18/13 10:14 AM (13 years ago)
Those are not valid phone numbers. I enter mine like 999-999-9999. I wonder if this could be a localization thing? In the US phone numbers are 10 digits. The first 3 are the area code. The next 7 the actual number. Casablanca (same as the famous movie?. nice locale!!! Moroco?) This plug-in uses the ios Address Book class to integrate with your contacts. You can't just plug arbitrary stuff in the field, ios needs valid data. I wonder if your device uses different dialing pattern and just see 3 numbers as a 'area code' in your 'localization'?
 
tb
buzztouch Evangelist
Profile
Posts: 2050
Reg: Nov 03, 2011
Oxford
32,300
like
01/18/13 10:24 AM (13 years ago)
I'm fairly sure that ATRAIN is correct. You need to place in valid data instead of just any two numbers. You could try testing this on a real iOS device, because you'll definitely need to test it before publishing.
 
othmane
Apple Fan
Profile
Posts: 105
Reg: Feb 08, 2012
Casablanca
1,050
like
01/18/13 10:27 AM (13 years ago)
Thanks Calypso. Atrain53: Those phone numbers are valid and concern emergency services like police, fireman... When i use the phone book on my iphone i get the correct number with 2 digit for example 18 and not 1(8) . Here is a link of the emergency number in Morocco 112 and it works with the plugin. https://www.dropbox.com/s/dgeg9lvgjwmx1vg/Screenshot_55.png
 
tb
buzztouch Evangelist
Profile
Posts: 2050
Reg: Nov 03, 2011
Oxford
32,300
like
01/18/13 10:39 AM (13 years ago)
In the screenshot, you have typed this into the native contacts app. Your iPhone or running native apps, are using the iPhone localisation files, which change from country to country. The contact card is set to the USA, and there are no localisation files attached to that. Your best bet is to probably ask the plugin developer how to edit the code to allow for localisation
 
othmane
Apple Fan
Profile
Posts: 105
Reg: Feb 08, 2012
Casablanca
1,050
like
01/18/13 10:49 AM (13 years ago)
Thank you Annandale, i Will ask the developer for localisation
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
01/18/13 02:36 PM (13 years ago)
Yes, I definitely need the localization on an upcoming project.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.