Sending MMS into different Android devices

前端 未结 3 1859
别那么骄傲
别那么骄傲 2021-01-17 06:39

I need to send MMS. Into my hero this code looks ugly but works:

Intent sendIntent = new Intent(\"android.intent.action.SEND_MSG\"); 
   sendIntent.putExtra         


        
相关标签:
3条回答
  • 2021-01-17 07:17

    You could try something like this.Which will launches all the apps which can handle the intent.

    intent.setAction(Intent.ACTION_SEND);
    //In case of multiple file
    intent.setAction(Intent.ACTION_SEND_MULTIPLE);
    intent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, <List of uris>);
    intent.putExtra(Intent.EXTRA_STREAM, <singleUri>);
    intent.setType("*/*");
    startActivity(intent);
    
    0 讨论(0)
  • 2021-01-17 07:28

    Have you tried something like this (change to your need and add images etc...):

    Intent intent = new Intent(Intent.ACTION_SENDTO, Uri.parse("mmsto:<number>");
    intent.putExtra("address", <number>);
    intent.putExtra("subject", <subject>);
    startActivity(intent);
    

    The above is the best I could come up with which works on HTC/Nexus/SE from 1.6 to 2.2.

    0 讨论(0)
  • 2021-01-17 07:30

    send from your app ?

    before startActivity, you can

    intent.setClassName("your package name", "your class name");

    startActivity(intent);

    0 讨论(0)
提交回复
热议问题