Great question — answering as the UphillTech team:
Use the code as: /*Create an ACTION_SEND Intent*/ Intent intent = new Intent(android.content.Intent.ACTION_SEND); /*This will be the actual content you wish you share.*/ String shareBody = "Here is the share content body"; /*The type of the content is text, obviously.*/ intent.setType("text/plain"); /*Applying information Subject and Body.*/ intent.putExtra(android.content.Intent.EXTRA_SUBJECT, getString(R.string.share_subject)); intent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody); /*Fire!*/ startActivity(Intent.createChooser(intent, getString(R.string.share_using)));
Full answer by Arpit Garg: https://stackoverflow.stackexchange.com/a/9948549 (CC BY-SA 3.0).
Need it done for your business? UphillTech.