1

Is there any way to launch android application from Email, without using http/https ?

Nemo
  • 1,059
  • 3
  • 14
  • 31

2 Answers2

1

You could use a custom protocol, and install a custom handler in your app. Check this out. In this example, if your mail contains a link to foo:do_something, clicking on it would open the app.

According to this, the way around it is to leave HTTP URLs in your email, and have a webserver transform them into your custom protocol. This is fine if you control the emails.

I don't know if it will work by simply returning a 301 or 302 response - you should try it.

Community
  • 1
  • 1
zmbq
  • 38,013
  • 14
  • 101
  • 171
  • But emails does not support customized protocols. You cannot have a link with foo://. It displays as plain text. The example you suggested works fine only from browser. – Nemo Sep 18 '12 at 20:50
  • i agree with the example you shared. The problem is, Gmail itself will not show the link. Since we are creating customized protocol, mail client renders the link as plain text. – Nemo Sep 18 '12 at 21:03
  • Are you using Gmail or the Android client? Anyway, the solution is the same, have the mail client (or Gmail) point to an HTTP link, and then redirect to a custom protocol link. – zmbq Sep 18 '12 at 21:05
0

You need to send your email in HTML, with your link in an tag:

<a href='myscheme://myhost?data=whatever'>Launch App

and before that you have to add this in the manifest file

<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="ace" android:host="samuel"/>
</intent-filter>

while clicking on the link it will prompt you to complete your action by, then select your app from that.

Thanks.

zmbq
  • 38,013
  • 14
  • 101
  • 171
Nikhil Dinesh
  • 3,359
  • 2
  • 38
  • 41
  • i tried to send HTML page in many ways. Online html generators, Java mail. But Android eMail app is still showing the link as plain text. Any suggestion? – Nemo Sep 18 '12 at 20:59
  • i don't want to do that Nikhil. If i do so it will show the chooser dialog with my app and browser as option. I wan to launch my app, like it works from browser. – Nemo Sep 18 '12 at 21:05