Android - Sending audio-file with MMS -


im using following code send audio-files through email, dropbox +++.. not giving me option send same file through mms.. know how attach mms , let user send if he/she wants?

        intent share = new intent(intent.action_send);         share.settype("audio/3gpp");         share.putextra(intent.extra_stream, uri.parse("file://" + afile));         startactivity(intent.createchooser(share, "send file")); 

you can used code..

intent sendintent = new intent(intent.action_send);              sendintent.setclassname("com.android.mms", "com.android.mms.ui.composemessageactivity");             sendintent.putextra("address", "9999999999");             sendintent.putextra("sms_body", "if sending text");                final file file1 = new file(environment.getexternalstoragedirectory().getabsolutepath(),"downloadtest.3gp");             uri uri = uri.fromfile(file1);              sendintent.putextra(intent.extra_stream, uri);             sendintent.settype("video/3gp");             startactivity(intent.createchooser(sendintent, "send file")); 

you have used appropriate set type .if audio audio/*,image image/png

this code work samsung nexus,ace 5830 not working htc amaze.if 1 found solution please give snippet.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

android - layout with fragment and framelayout replaced by another fragment and framelayout -