Romin Irani
unread,Oct 12, 2011, 3:05:41 PM10/12/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Thrutu Developers
I have created a simple Thrutu Button which launches an Activity in
Android when it is selected.
From this activity, I want to send across a SMS to the recipient or
caller - just like how the Map (Where I am) button does.
I have ensured that for this activity, the following entry is present
in the AndroidManifest.xml file:
<meta-data android:name="one way capable" android:value="true" />
Now in the activity on the click of a button, I want to send the SMS.
So I tried launching the SMS as mentioned in the Reference guide as
follows:
In the OnClick of a button, I try to send the SMS as follows:
Intent iSendSMS = new Intent(ThrutuServiceInterface.ACTION_SEND_SMS);
iSendSMS.putExtra(Intent.EXTRA_TEXT, "My SMS Text goes here");
iSendSMS.putExtra(ThrutuServiceInterface.EXTRA_CORRELATOR,getIntent().getExtras().getString(ThrutuServiceInterface.EXTRA_CORRELATOR));
iSendSMS.putExtra(ThrutuServiceInterface.EXTRA_CONNECTION_MODE,getIntent().getExtras().getString(ThrutuServiceInterface.EXTRA_CONNECTION_MODE));
startActivity(iSendSMS);
But this results in the following exception which I reproduce from
LogCat:
10-13 00:34:01.915: ERROR/AndroidRuntime(27539): FATAL EXCEPTION: main
10-13 00:34:01.915: ERROR/AndroidRuntime(27539):
android.content.ActivityNotFoundException: No Activity found to handle
Intent { act=com.thrutu.SEND_SMS (has extras) }
10-13 00:34:01.915: ERROR/AndroidRuntime(27539): at
android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:
1408)
10-13 00:34:01.915: ERROR/AndroidRuntime(27539): at
android.app.Instrumentation.execStartActivity(Instrumentation.java:
1378)
10-13 00:34:01.915: ERROR/AndroidRuntime(27539): at
android.app.Activity.startActivityForResult(Activity.java:2817)
10-13 00:34:01.915: ERROR/AndroidRuntime(27539): at
android.app.Activity.startActivity(Activity.java:2923)
10-13 00:34:01.915: ERROR/AndroidRuntime(27539): at
com.thrutu.example.TextChat.SendReminderActivity
$1.onClick(SendReminderActivity.java:36)
10-13 00:34:01.915: ERROR/AndroidRuntime(27539): at
android.view.View.performClick(View.java:2408)
10-13 00:34:01.915: ERROR/AndroidRuntime(27539): at
android.view.View$PerformClick.run(View.java:8816)
10-13 00:34:01.915: ERROR/AndroidRuntime(27539): at
android.os.Handler.handleCallback(Handler.java:587)
10-13 00:34:01.915: ERROR/AndroidRuntime(27539): at
android.os.Handler.dispatchMessage(Handler.java:92)
10-13 00:34:01.915: ERROR/AndroidRuntime(27539): at
android.os.Looper.loop(Looper.java:123)
10-13 00:34:01.915: ERROR/AndroidRuntime(27539): at
android.app.ActivityThread.main(ActivityThread.java:4633)
10-13 00:34:01.915: ERROR/AndroidRuntime(27539): at
java.lang.reflect.Method.invokeNative(Native Method)
10-13 00:34:01.915: ERROR/AndroidRuntime(27539): at
java.lang.reflect.Method.invoke(Method.java:521)
10-13 00:34:01.915: ERROR/AndroidRuntime(27539): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:858)
10-13 00:34:01.915: ERROR/AndroidRuntime(27539): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
10-13 00:34:01.915: ERROR/AndroidRuntime(27539): at
dalvik.system.NativeStart.main(Native Method)
Question : What entries need to go in the AndroidManifest.xml to
handle this ?
Kindly revert back at the earliest to help me complete my submission.
Thanks in advance.
Cheers
Romin