0

I want put a link in my app, in actionbar, for sending email to others, for going to app market.

the app markets link, for opening chooser is:

market://details?id=info.shandel.maghalat.shariati

I write this string in the string file in values folder:

<string name="myMail_Body">Hi \n\n install this app \n\n click this link for going to your favorite market: \n\n market://details?id=info.shandel.maghalat.shariati" </string>

now, when app send email to others, market link is not a link and email reciever can not click it. it is text.

what can I do?

please help.


I am in iran. we, irainian, can not put our app in google play.

I want opening the market chooser in mobile, and user can select his/her favorite market among installed apps in his/her mobile.

please help me to convert:

"market://details?id=info.shandel.maghalat.shariati"

to a link in email body.

the problem is that: my address does not "http://".

when I try other address with prefix "http://", it works good.

3 Answers3

0

Try to use a http url:

https://play.google.com/store/apps/details?id=info.shandel.maghalat.shariati

Many e-mail clients will show that as a clickable link.

Henry
  • 42,982
  • 7
  • 68
  • 84
  • I am in iran. we, irainian, can not put our app in google play. I want opening the market chooser in mobile, and user can select his/her favorite market among installed app in his/her mobile. please help me to convert: "market://details?id=info.shandel.maghalat.shariati" to a link in email body. – کانون آرمان شریعتی Jul 05 '14 at 07:34
0

use this below function...

 <string name="myMail_Body">Hi! I am using this awseome app. Please find this from <a href="market://details?id=info.shandel.maghalat.shariati">here</a></string>


public void shareThisApp()
        {
          final Intent intent = new Intent(Intent.ACTION_SEND);
          intent.setType("text/html");
          intent.putExtra(Intent.EXTRA_SUBJECT, "Android App");
          intent.putExtra(Intent.EXTRA_TEXT,getResource.getString(Html.fromHtml(R.string.myMail_Body)));

          try {
            startActivity(Intent.createChooser(intent, "Select an action"));
          } catch (android.content.ActivityNotFoundException ex) {
            // (handle error)
          }
        }
Sanket Kachhela
  • 10,861
  • 8
  • 50
  • 75
0

Try to place the below line in string.xml file and try to class that where you require...

<string name="share_text_content">https://play.google.com/store/apps/details?id=info.shandel.maghalat.shariati</string>
vinay Maneti
  • 1,447
  • 1
  • 23
  • 31