launching Email application on Android via hyperlink -


i trying start email application hyperlink(in webpage). looked many questions/answers couln't find 1 matches problem.

i know searches open app should use scheme in link: launch custom android application android browser example:in custom applicaiton's manifest file can define:

<intent-filter>       <data android:scheme="my.special.scheme" />       <action android:name="android.intent.action.view" />  </intent-filter> 

and in webpage can reach app:

<a href="my.special.scheme://other/parameters/here"> 

but not application can reach manifest file. so, when try open email hyperlink use

<a href ="mailto:">email</a></li>  

and opens email opens screen can edit , send email. want open application can see inbox ( main page of application)

when try

<a href ="email:">email</a></li> 

it says there no application start. should use there ?

<data android:scheme="...." />  

for applicaiton ?

why arent using intent? it's easier plus can feedback in app -
can use th following code launch intent -

/* create intent */  final intent emailintent = new intent(android.content.intent.action_send);  /* fill data */ emailintent.settype("plain/text"); emailintent.putextra(android.content.intent.extra_email, new string[]{"to@email.com"}); emailintent.putextra(android.content.intent.extra_subject, "subject"); emailintent.putextra(android.content.intent.extra_text, "text");  /* send off activity-chooser */ context.startactivity(intent.createchooser(emailintent, "send mail...")); 

Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -