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)
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)
相关文章推荐
- How to create iOS 8 Today extension and share data with containing app – tutorial
- Using Qt to build an Omi App for iOS (and Android)
- How To Setup a Rails 4 App With Apache and Passenger on CentOS 6
- How to read out WhatsApp messages with Tasker and react on their content in real time
- using XCode 4.2 and iOS 5 SDK to create app runs on iPhone 3g
- Correct Smartphone Video Orientation and How To Rotate iOS and Android Videos with ffmpeg
- Free Lua Scripting Interpreter Library For Delphi XE7 Firemonkey On Android And IOS
- Comparing Xamarin and Delphi XE5 to Xcode for Cross Platform Mobile App Development
- Using Qt to build an Omi App for iOS (and Android)
- [ios] where to find your iphone app on your mac during debuging
- [WP7] How to press the mouse on a control, and detect MouseLeftButtonUp on another
- In Android how to display one view as overlay on top of another view?
- Open file in another app on iOS
- Could not find method android.app.Activity.on.AttachedToWindow...
- Open Source C# (Mono Compatible) Library for Sending Push Notifications To iOS (iPhone/iPad APNS), Android (C2DM), Windows Phone Apps
- Setting Text to Image On Android and Adjudt the text font size based on the android resolution
- Transaction (Process ID) was deadlocked on lock resources with another process and has been chose
- Preparing and Submitting an Application to the App Store with xCode4.2 and iOS5 SDK
- (转载)PROGRAMMING 3D GAMES ON ANDROID WITH IRRLICHT AND BULLET
- How to debug SceneLib with Eclipse and How to install SceneLib 1.0 on Ubuntu 10.04