I understand that the user should be given option to choose an application, and why. But it is the requirement of the client that the application should use the messaging application that came with the phone OR the default messaging application to send the mms. /And i am kind of stuck here.
Also, in the chooser, applications like evernote, facebook, gmail, etc show up, that are capable of ACTION_SEND action. To exclude them, what should be done? I look into intent filters? On Mon, Mar 26, 2012 at 4:28 AM, Mark Murphy <[email protected]>wrote: > On Sun, Mar 25, 2012 at 7:21 PM, Farhan Tariq <[email protected]> > wrote: > > Intent picMessageIntent = new Intent(android.content.Intent.ACTION_SEND); > > picMessageIntent.putExtra("address", "Some Numbers"); > > picMessageIntent.setType("image/jpeg"); > > picMessageIntent.putExtra("sms_body", "Some Text"); > > picMessageIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(file)); > > > > > > Yes, I understand now that the package may not be there in a device, so > it > > is giving a chooser. > > > > Is there a way to find the default messaging application or the built-in > > messaging, and set its package in the intent above? > > If there is a default, it is because the user chose it to be the > default, and no chooser dialog will appear -- the user will be taken > straight to that default. If there is only one messaging app, no > chooser dialog will appear -- the user will be taken straight to that > app. If there is no default and there is more than one app, PLEASE > ALLOW THE USER TO CHOOSE WHICH SMS CLIENT THEY WANT TO USE. > > Hence, please delete: > > picMessageIntent.setPackage("com.android.mms"); > > so your app does what the USER wants and will work on more devices. > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com | http://github.com/commonsguy > http://commonsware.com/blog | http://twitter.com/commonsguy > > _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.5 > Available! > > -- > 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 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

