How do I write an Android intent for Chrome to open the GMail app and search?

ε祈祈猫儿з 提交于 2019-12-12 01:07:04

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!