Issue
I`m new to android, I want to look like this custom popup intent
this is what I get my popup intent
here my question is how to add custom image and text in above popup when i try to share something via intent send.
this is my code what should I change here?
Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT,
"Intall COC!!"+"https://play.google.com/store/apps/details?id=com.supercell.clashofclans");
sendIntent.setType("text/plain");
startActivity(sendIntent);
Solution
Check your android version it's only supported start at android 11
use below code
Intent shareIntent = new Intent(Intent.ACTION_SEND);
shareIntent.setType("text/plain");
shareIntent.putExtra(Intent.EXTRA_SUBJECT, "Here you can make custom title");
String shareMessage= "\nhere you can make custom message";
shareMessage = shareMessage + "Intall CoC!!\"+\"https://play.google.com/store/apps/details?id=com.supercell.clashofclans" + BuildConfig.APPLICATION_ID +"\n";
shareIntent.putExtra(Intent.EXTRA_TEXT, shareMessage);
startActivity(Intent.createChooser(shareIntent, "choose one"));
Answered By - Ganesh MB
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.