Answers for "Share application “link” in Android"


Share application “link” in Android

try { 
    Intent shareIntent = new Intent(Intent.ACTION_SEND);  
    shareIntent.putExtra(Intent.EXTRA_SUBJECT, "My application name");
    String shareMessage= "\nLet me recommend you this application\n\n";
    shareMessage = shareMessage + "" + BuildConfig.APPLICATION_ID +"\n\n";
    shareIntent.putExtra(Intent.EXTRA_TEXT, shareMessage);  
    startActivity(Intent.createChooser(shareIntent, "choose one"));
} catch(Exception e) { 
Posted by: Guest on July-05-2021

Code answers related to "Share application “link” in Android"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language