share application e2 80 9clink e2 80 9d in android

Solutions on MaxInterview for share application e2 80 9clink e2 80 9d in android by the best coders in the world

showing results for - "share application e2 80 9clink e2 80 9d in android"
Sarah
13 Sep 2019
1try { 
2    Intent shareIntent = new Intent(Intent.ACTION_SEND);  
3    shareIntent.setType("text/plain");
4    shareIntent.putExtra(Intent.EXTRA_SUBJECT, "My application name");
5    String shareMessage= "\nLet me recommend you this application\n\n";
6    shareMessage = shareMessage + "https://play.google.com/store/apps/details?id=" + BuildConfig.APPLICATION_ID +"\n\n";
7    shareIntent.putExtra(Intent.EXTRA_TEXT, shareMessage);  
8    startActivity(Intent.createChooser(shareIntent, "choose one"));
9} catch(Exception e) { 
10    //e.toString();
11}   
12