1. Android Central Question's Avatar
    I'm trying to start an Intent from a Unity app that will launch the text messaging app with an attachment.

    I have been able to open the text messaging app but the attachment does not load properly, throwing the following exception:

    'Could not determine type of file:///storage/emulated/0/Android/data/com.torpedoesaway.memematch/files/Gifit2MemeFiles/gifit2meme-2019-09-7-09-39-54.gif
    java.io.IOException: java.lang.RuntimeException: setDataSource failed: status = 0x80000000'

    Note that I have also tried loading other images, such as pngs and jpgs, all throwing the same error.

    This is my intent code:

    Intent intent = new Intent(Intent.ACTION_SENDTO);
    intent.setData(Uri.parse("smsto:" + recipient));
    intent.putExtra("sms_body", message);
    intent.putExtra(Intent.EXTRA_STREAM, attachment);

    if (intent.resolveActivity(activity.getPackageManager()) != null) {
    activity.startActivity(intent);
    }

    Now, I tried playing around with the intent action as well as the setData/setType calls and in one instance I am able to open the chooser, select the messaging app and then the attachment is loaded properly. However, I want to open the text messaging app directly with the attachment working.

    Thanks in advance for the help!
    07-09-2019 03:46 AM
  2. SpookDroid's Avatar
    I know nothing of programming in this case, but are there different commands for MMS? Since SMS doesn't support any kind of media attachment, might that be why you're given an error?
    07-09-2019 02:51 PM

Similar Threads

  1. Galaxy 10 saves all searches, including in app store, contacts, etc
    By Android Central Question in forum Ask a Question
    Replies: 2
    Last Post: 07-09-2019, 10:04 PM
  2. Notification bar not pull down in open app
    By Android Central Question in forum Ask a Question
    Replies: 1
    Last Post: 07-09-2019, 03:54 AM
  3. Why does it say cb#and then my phone number at the bottom of my text messages
    By Android Central Question in forum Ask a Question
    Replies: 1
    Last Post: 07-08-2019, 10:10 PM
  4. Rec'ing old text messages on Ford sync
    By Android Central Question in forum Ask a Question
    Replies: 1
    Last Post: 07-08-2019, 09:11 PM
  5. Google Asstent confused with a time in a reminder
    By Android Central Question in forum Ask a Question
    Replies: 0
    Last Post: 07-08-2019, 05:22 PM
LINK TO POST COPIED TO CLIPBOARD