You can "prevent" your user from taking the data from Gmail, and doing so is a pretty bad design: what happens if the user doesn't use the GMail app? You're going to get lots of bad rep for leaving out users who use other apps.
If you want to do it, you can name an explicit intent target, just target the intent at the GMail app's package name. (Though, again, this is a bad idea, you should really just allow the user to pick the mechanism they want to use.) Kris On Wed, Feb 13, 2013 at 4:04 AM, ashwini vandanapu <[email protected]> wrote: > > Hi, > > I want to share image. so i can able to share image via gmail but > not able share through bluetooth,wifi,facebook...etc. > > here the snippet is below. please find and If anyone have idea share > with me and help me out. > > > Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND); > shareIntent.setType("image/png"); > shareIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); > shareIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,"Image > Attachment"); > shareIntent.putExtra(android.content.Intent.EXTRA_TEXT,"Image Attachement"); > Uri > pngUri=Uri.parse("android.resource://com.example.share/"+R.drawable.ic_launcher); > shareIntent.putExtra(android.content.Intent.EXTRA_STREAM,pngUri); > startActivity(Intent.createChooser(shareIntent , "Send image using..")); > > > > Thanks&Regards, > Ashwini V. > > -- > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Android Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > -- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

