I'm trying to open a link from my Gmail Application. If I send myapp://custom/params, Gmail only recognizes it as text. I can get the link to open my application "myapp" from a browser, though. How can I get around this?
Android Custom URI Handler - Gmail App doesn't recognize?
2.2k Views Asked by AudioBubble At
2
There are 2 best solutions below
0

I think this comes down to a problem with the way the GMail apps looks for stuff to link up as URLs in the body of a text formatted message. I believe you have two options:
- Send the email message as HTML instead of plain text and explicitly href= link to your custom scheme.
- Instead of hooking to a custom scheme, setup your app to handle protocol http with the host and path set to something unique. As long as you include the exact path the intent filter shouldn't get in the way of normal browsing to your website.
I haven't tried either of those. #2 I'm pretty definite will work, however #1 might be a bit cleaner depending on your app.
I'd suggest that you use URIs with the content: scheme and a custom ContentProvider. See http://developer.android.com/guide/topics/providers/content-providers.html.