简体   繁体   中英

What's the best way to seamlessly link back to an android app from a browser?

I'm an Android newbie, in the planning stages of a project that involves android. I'm considering augmenting an android app with a button on a menu page linking to an HTML5 page, which leads to a sequence of pages, and ideally returning to the android app's menu page, via a button on the last page. I'd create an intent filter in my app to intercept a URL request and show the app instead. Is there a better way?

If you load the web page in a WebView in your app, you could inject a js interface and interact directly with your java code through it. Otherwise, yes, a custom url scheme and an Intent filter would probably be the best way to go around it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM