How to share image + text on viber instagram

How to share image + text on viber instagram

Questions : How to share image + text on viber instagram

4872

On Android I try to share image + text like in4codes_android-intent this :

Uri imageUri = Uri.parse("android.resource://" + getPackageName() + "/drawable/" + "ic_launcher"); Intent shareIntent = new Intent(); shareIntent.setAction(Intent.ACTION_SEND); shareIntent.putExtra(Intent.EXTRA_TEXT, "Hello"); shareIntent.putExtra(Intent.EXTRA_STREAM, imageUri); shareIntent.setType("image/jpeg"); shareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); startActivity(Intent.createChooser(shareIntent, "send")); 

this work fine on Whatsapp (for example) but in4codes_android-intent on viber it’s show only the image and skip in4codes_android-intent the text 🙁 On Instagram it’s the total in4codes_android-intent opposite, text is send but not the image …

How can i do ?

Total Answers 2
27

Answers 1 : of How to share image + text on viber instagram

Try this for viber :

Intent intent = new Intent(Intent.ACTION_SEND); intent.setPackage("com.viber.voip"); intent.setType("text/plain"); intent.putExtra(Intent.EXTRA_TEXT, "Message"); 

Checkout this answer for the Instagram in4codes_android-intent part : in4codes_android-intent https://stackoverflow.com/a/16299999

Hope this helps !!

0

4

Answers 2 : of How to share image + text on viber instagram

it requires both Viber & WhatsApp in4codes_android-intent apps to grant storage permission (to in4codes_android-intent themselves) before being able to access in4codes_android-intent the files.

Sadly, I think it requires this in4codes_android-intent permission on all of the apps on the in4codes_android-intent chooser.

If Viber doesn’t have this permission in4codes_android-intent granted yet, it shows a black screen.

0