android-smsmms icon indicating copy to clipboard operation
android-smsmms copied to clipboard

i cannot send MMS only SMS

Open zouvelekis opened this issue 5 years ago • 2 comments

This is my code

` try { SharedPreferences sharedpreferences = getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE); String path_camera = sharedpreferences.getString("pref_path_camera", "");

        File f= new File(path_camera);
        BitmapFactory.Options options = new BitmapFactory.Options();
        options.inPreferredConfig = Bitmap.Config.ARGB_8888;
        Bitmap myImg  = BitmapFactory.decodeStream(new FileInputStream(f), null, options);


        Settings settings = new Settings();
        settings.setMmsc("http://mms.vodafone.gr");
        settings.setProxy("213.249.19.49");
        settings.setPort("5080");
        settings.setUseSystemSending(true);

        Transaction transaction = new Transaction(MainActivity.this, settings);
        Message message = new Message("Hello test mms", "6955555555");
        message.setImage(myImg);
        transaction.sendNewMessage(message, Transaction.NO_THREAD_ID);

        } catch (Exception ex) {
            ex.printStackTrace();
            Log.d("TAGer", "Error in load image." + ex);
    }`

If i put into comments the line message.setImage(myImg); the message will be sent like normal SMS

What am I doing wrong ?

zouvelekis avatar Jul 21 '20 16:07 zouvelekis

Having same issue. Not sure it its 100% related, but getting "E/libc: Access denied finding property "ro.vendor.config.hw_vowifi"" when enabling the message.setImage() line above. Disabling it will send a normal sms without any issue.

g-radam avatar Dec 26 '21 17:12 g-radam

@zouvelekis , did you ever figure this out?

skamensky avatar May 10 '23 16:05 skamensky