Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to send an MMS programmatically?
    primarykey
    data
    text
    <p>I'm trying to write an app that send an MMS without user interaction (i.e. not using the ACTION_SEND intent), following what suggested <a href="https://stackoverflow.com/questions/2972845/i-want-send-image-through-using-mms-in-android">here</a>.</p> <p>The statement </p> <pre><code> HttpUtils.httpConnection(context, 4444L, MMSCenterUrl, bytesToSendFromPDU, HttpUtils.HTTP_POST_METHOD, !TextUtils .isEmpty(MMSProxy), MMSProxy, port); </code></pre> <p>return me an error that say that the statement cannot run in the same thread. So, I build a separate thread using the AsyncTask class and the doInBackground method.</p> <p>Now, I'm receiving the following error</p> <blockquote> <p>02-14 17:49:27.519: WARN/System.err(1884): java.io.IOException: Connect to /213.230.130.89:80 timed out 02-14 17:49:27.649: WARN/System.err(1884): Caused by: org.apache.http.conn.ConnectTimeoutException: Connect to /213.230.130.89:80 timed out</p> </blockquote> <p>where 213.230.130.89 is my MMSProxy (the MMSCenterUrl is "<a href="http://mms.tim.it/servlets/mms" rel="nofollow noreferrer">http://mms.tim.it/servlets/mms</a>").</p> <p>pls consider that I'm able to send an MMS from the user interface with the same settings.</p> <p>does anyone have any idea on what I'm missing?</p> <p>thanks in advance.</p> <p>[edit] I found the mistake. according to <a href="https://stackoverflow.com/questions/2972845/i-want-send-image-through-using-mms-in-android">D. Kołakowski</a>: "If you get result with Phone.APN_REQUEST_STARTED value, you have to wait for proper state. Register BroadCastReciver and wait until Phone.APN_ALREADY_ACTIVE appears". So I did a receiver for checking the phone connectivity status and, only then, perform the http-post request. Now it's working. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload