Skip to content Skip to sidebar Skip to footer

How To Add Custom Schema Url To "sms_body"

I want to send a sms message that contain custom schema URL : For example: samuel://ace?id=dddfsdfsdfsdfs When the addressee clikc this URL, it will launch my applica

Solution 1:

Don't use samuel://ace?id=dddfsdfsdfsdfs. Use http://samuel.org/ace?id=dddfsdfsdfsdfs. In your Android application, have an activity that responds to ACTION_VIEW, with the BROWSEABLE category, with an appropriate <data> element to match on the scheme, host, and path. Also create a Web page on your Web server that explains the value of your application and why they should install it.

This way:

  • Your link will be clickable automatically
  • Your link will work on all devices, including non-Android devices
  • Your link will still open your desired activity when the user has your application installed

Here is a sample application showing some of this.

Post a Comment for "How To Add Custom Schema Url To "sms_body""