您的位置:首页 > 移动开发

Sending a URL to Another App on Android and iOS with Delphi XE5

2017-09-26 17:11 645 查看
Here is the source code for my Open and View URL library from my
CodeRage 8 session “Beyond the App”. Here is a download of the
example app. I’ll see about posting it to a SVN repository too so it can grow and evolve. Thanks to Al Mannarino for his code that started this!

Note the code is using TidURL.URLEncode on all URLs. I found it is only required on the maps for iOS (iOS doesn’t like spaces) but may be causing trouble with the geo:// on Android.

Some example protocols

http, tel, sms, fb, mailto, twitter, geo, etc.
Example URLs

– Common to both iOS & Android – http://www.embarcadero.com/ tel://(415)834-3131
sms://1234 http://twitter.com/coderage (This opens with the Twitter client on Android)
mailto://jim.mckeeth@embarcadero.com
twitter://user?screen_name=coderage
fb://profile/34960937498 (get the UID from http://graph.facebook.com/embarcaderotech or for whatever page you are looking for)
– iOS Specific – http://maps.apple.com?q=5617 Scotts Valley Drive, Scotts Valley, CA 95066 (this needs the URL encode – Apple has some additional APIs that are recommended.)
– Android Only –
content://contacts/people/
content://contacts/people/1
geo://0,0?q=5617 Scotts Valley Drive, Scotts Valley, CA 95066
geo://46.191200, -122.194400 (I think this one doesn’t like the URLEncode)

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  delphi android url
相关文章推荐