问题
It is possible to start an app and request some action from Chrome web-browser in Android:
Android Intents with Chrome - Google Chrome Mobile — Google Developers https://developer.chrome.com/multidevice/android/intents
There is an example:
<a href="intent://scan/#Intent;scheme=zxing;package=com.google.zxing.client.android;end"> Take a QR code </a>
I have tried to write something similar to start the GMail app. I have tried various versions, but all that happens is that the Google Play APP is opened showing GMail. Here is one attempt I have made:
<a href="intent://dummy/#Intent;package=com.google.android.gm;action=android.intention.action.VIEW;category=;component=;scheme=;end">Gmail, android.intention.action.VIEW</a>
I would like to open the GMail app and do a search, but I can't even open it. ;-)
回答1:
I suspect it can't be done. Gmail would have to be set to be "Browseable" which means it is able to be opened from the web and I don't see it in the manifest.
来源:https://stackoverflow.com/questions/21418691/how-do-i-write-an-android-intent-for-chrome-to-open-the-gmail-app-and-search