Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid SMS Sending ISSUE
    text
    copied!<p>I am developing an Android application. In my application button click the application send the SMS automatically to a fixed number.</p> <p>The SMS is 127 character long, but it charges the mobile network for 3 messages.</p> <p>messages are like </p> <pre><code>EI{{_E_3LTV{&lt;:A&lt;B899?8@5@&gt;&gt;{M5CIO?L&lt;C&gt;M?O=C:?{&gt;NJ{{LWO^2Q]ST6N[[Q2YTRT6MXYX2KWQH6YTUS2`J{{A{&gt;39393:{;66{{;8&gt;&gt;&lt;:97{694968796; GL{{"G"5"VY{E8=9?;D&lt;&lt;@?=&gt;B{&lt;7F9N8FH@AQ7FI&lt;{APM{{HUK^4NZPQ9JY_T4VQOQ9IVUV4MTNI9VOQV4_M{{=7{&lt;:7:7:8{9{4={{:=&lt;&gt;&gt;&gt;:C{=7;7?6&gt;7=9 </code></pre> <p>** CODE USED TO SEND THE MESSAGE ** </p> <pre><code>TelephonyManager telMan = (TelephonyManager) context .getSystemService(Context.TELEPHONY_SERVICE); int simState = telMan.getSimState(); if (simState != TelephonyManager.SIM_STATE_READY) { throw new EscanException(-13); } ArrayList&lt;String&gt; splitMsg = smsMan.divideMessage(message); int count = splitMsg.size(); ArrayList&lt;PendingIntent&gt; sentIntent = new ArrayList&lt;PendingIntent&gt;(); for (int i = 0; i &lt; count; i++) { sentIntent.add(PendingIntent.getBroadcast(context, 0, new Intent( ACTION_SENT), 0)); } smsMan.sendMultipartTextMessage(number, null, splitMsg, sentIntent, null); flag = true; context.registerReceiver(new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { handler.sendEmptyMessage(getResultCode()); if (flag) { flag = false; context.unregisterReceiver(this); } } }, new IntentFilter(ACTION_SENT)); } } </code></pre>
 

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