Click here to Skip to main content
15,891,597 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
i wanna share some png image with this code in adnroid but when i call this i get share filed. in whatsapp and other programs.
why?
Java
Intent sharingIntent = new Intent(Intent.ACTION_SEND);
     Uri screenshotUri = Uri.parse("file:///android_asset/logo.png");

     sharingIntent.setType("image/png");
     sharingIntent.putExtra(Intent.EXTRA_STREAM, screenshotUri);
     startActivity(Intent.createChooser(sharingIntent, "Share image using"));
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900