Jayeshkumar Sojitra
Jayeshkumar Sojitra

Reputation: 2511

How to launch android application from URL in android?

Can anybody please tell me how to open android application from URL in android.

I am using following method to open application in android but it doesn't works for me.

<data android:scheme="application"/>

I am passing source of URL "application://[RandomText]"

Is it correct way to open application?

Upvotes: 8

Views: 18144

Answers (2)

Ashish Jaiswal
Ashish Jaiswal

Reputation: 804

Try this:

    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />

    <data android:host="www.put-your-website.com" />
    <data android:scheme="https" />
    <data android:scheme="http" />
    <data android:pathPattern=".*" />
</intent-filter>

Upvotes: 1

pshirishreddy
pshirishreddy

Reputation: 746

Read about BroadcastReceiver. An application must register itself to listen to intents sent using sendBroadcast(). After this the user is presented with a pop up to launch that application. (Similar to send functionality where you can choose to send using different applications)

Upvotes: 0

Related Questions