0

What am I trying to do: I am sending an image(bitmap) and text from online server to direct in MMS. Whenever I will open my application all images(bitmap) and text will be automatically sent through default messaging application to all already inserted numbers in the server. My Issue: I am facing issue related to MMS. Sms is working fine. But when I sent MMS it only sent the text which is along with MMS, not the image(bitmap) nither converting the message into MMS.

Here is my MMS Class Code:

public class MainActivity extends AppCompatActivity {

    Bitmap bitmap;
    String[] a=new String[]{"name"};
    private Settings settings=new Settings();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);


            sendMessage();

    }

    public void sendMessage() {
        new Thread(new Runnable() {
            @Override
            public void run() {
                com.klinker.android.send_message.Settings sendSettings = new com.klinker.android.send_message.Settings();
                sendSettings.setMmsc(settings.getMmsc());
                sendSettings.setProxy(settings.getPort());
                sendSettings.setPort(settings.getProxy());
                sendSettings.setUseSystemSending(true);

                Transaction transaction = new Transaction(MainActivity.this, sendSettings);
                bitmap=BitmapFactory.decodeResource(getResources(), R.drawable.ic_alert);
                Message message = new Message("this is the text message sent with MMS", "0********",bitmap,"test");


               // message.setImage());


                transaction.sendNewMessage(message, Transaction.NO_THREAD_ID);
            }
        }).start();
    }



}
  • See if this helps out [send mms programmatically](https://stackoverflow.com/questions/16518393/send-mms-programmatically) - if you need more help, search SO for "android mms" – JGlass Apr 09 '18 at 15:32
  • Possible duplicate of [Send MMS programmatically](https://stackoverflow.com/questions/16518393/send-mms-programmatically) – JGlass Apr 09 '18 at 15:32

0 Answers0