Is their a way to format a link in a gmail, which when opened in a browser or a app, when clicked opens a different activity on a phone?
I mean let's s开发者_如何转开发ay in an email you send a link and link has some formatting like YouTube and this when clicked opens the YouTube app on the android phone.
Basically what you are trying to do is to get the browser to emit an intent to start another software component. This is not possible. What happens with the Youtube link is that you are asking the browser to handle a certain mime type, which it does by calling an external application. There are a few mime types that in Android will bring up external applications, but that is completely different to having the browser emitting an intent in order to start executing a specific component.
If you manage to get this to work, you have discovered a serious security flaw in Android.
精彩评论