Search code examples
androidbrowserblackberrynative

On blackberry and android : calling native application from a web browser?


On iPhone, an application can associate a new protocol name to itself so that if a user types in 'myapp://xxx' in a web browser it calls the application.

Is this possible with BlackBerry or Android?


Solution

  • For Android have a look at this question's answers:

    Android Respond To URL in Intent

    and also the following page especially in the section "Data Types" about android:scheme on this page:

    http://developer.android.com/guide/topics/intents/intents-filters.html

    For your app you would put something like the following in your AndroidManifest.xml:

    <intent-filter><action android:name="android.intent.action.VIEW"></action>
    <category android:name="android.intent.category.DEFAULT"></category>
    <category android:name="android.intent.category.BROWSABLE"></category>
    <data android:scheme="myapp"></data>
    </intent-filter>