Intent URL in mobile Chrome for testing multiple android package names
there is no such syntax to let you do that.But maybe some compromise solution can solve you problem.
1 you specify action instead of package
2 if you can't select the first solution,can you make two browser_fallback_url.The first browser_fallback_url just directly send a intent to open the APP B
So, I think one solution could be like this:
- lets say you are in the webpage www.myweb.com/index.html
- there you set the first intent, and as fallback the same URL www.myweb.com/index.html?number_of_tries=1 (adding a parameter, could be anything)
- in the javascript code you can understand that if that parameter is present, then mean you have to try the second package
- call second intent and as fallback use your real fallback URL www.myweb.com/my_real_fallback.html (for example)
You will have to have three URLs, say URL1, URL2, URL3.
- URL1 tries to open package name A. If A doesn't exist, redirect to URL2.
- URL2 tries to open package name B. If B doesn't exist, redirect to URL3.
- URL3 simply opens in default browser.