Adding new functions to iphone gap.js

8 views
Skip to first unread message

ueilat

unread,
Jan 21, 2009, 8:39:03 AM1/21/09
to phonegap
I've modified GlassAppDelegate.m in order to integrate phone calls.

in details after openmap management i added

else if([(NSString *)[parts objectAtIndex:1] isEqualToString:@"tel"])
{

NSString *mapurl = [@"tel:" stringByAppendingString:[parts
objectAtIndex:2]];

[[UIApplication sharedApplication] openURL:[NSURL
URLWithString:mapurl]];
}

that can be called with
javascript:Device.exec('tel:5551234');

Is it possible to add in the official project this support and adding
also other calls like sms:?

And more general:
is it possible to integrate a generic call , for example
javascript:Device.exec('com:tel:5551234'); or avascript:Device.exec
('com:sms:5551234'); etc..?
this can be done modifying the previous script searching for string
@"com" and launching in the same way parts[2]:parts[3]

tanx
mauro

kazoomer

unread,
Jan 21, 2009, 12:45:17 PM1/21/09
to phonegap
This is interesting Mauro I will take a closer look and see what we
can integrate back into the main project.
I added Phone support into Phonegap last week (in Settings.plist)
this will turn phone numbers into links that will automatically be
clickable and launch the phone.

I like the idea of adding SMS.

Rob

Alberto

unread,
Jan 22, 2009, 12:25:44 PM1/22/09
to phonegap
this would be wonderful to integrate since I want to make phone calls
clicking a button.

foulek

unread,
Feb 4, 2009, 10:34:00 AM2/4/09
to phonegap
hi

Like to phone number used to work like in safari with this version :"
sintaxi-phonegap-90673cc23f0dc1830ebd5da89cc7dfc6c2b7c023"
Since the new version i have an error message "Alert cannot show url".

the link to Tel are like this :
<a href="tel:5551234">Click to make phone call</a>

Why this changes ??
Do I have to keep PhoneGap Old version to work ?
> > mauro- Masquer le texte des messages précédents -
>
> - Afficher le texte des messages précédents -
Reply all
Reply to author
Forward
0 new messages