0

I would like to create a series of apps that will be opened via URL scheme. What I would like to do is to use the same base scheme for all of them but be able to specify which app to open... somthing like this:

  • myApp://open?appUrl="app1" -> open first app
  • myApp://open?appUrl="app2" -> open second app
  • etc...

Is it possible?

THX

2 Answers 2

1

You can do it using <intent-filter> in your <activity>:

 <activity android:name=".activity.Activity">
   <intent-filter>
     <action android:name="android.intent.action.VIEW" />
     <category android:name="android.intent.category.DEFAULT" />
     <category android:name="android.intent.category.BROWSABLE" />
     <data android:scheme="myApp" />
     <data android:host="app1" />
  </intent-filter>
 </activity> 

this should work for myApp://app1, I am not sure if intent-filter can parse more complicated URLs like open?appUrl="app1"

Sign up to request clarification or add additional context in comments.

Comments

0

Yes this is possible. You'll need to specify the URL scheme within the corresponding BroadcastReceiver of your apps.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.