Tech tip of this week

Android: Share via option

String playStoreLink = "https://play.google.com/store/apps/details?id=" + getPackageName();
String shareText = "Text to share: " + playStoreLink;
Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND); 

sendIntent.putExtra(Intent.EXTRA_TEXT, shareText); 
sendIntent.setType("text/plain");
startActivity(Intent.createChooser(sendIntent, "Send To:"));

No comments:

Post a Comment