contact: 
Uki D. Lucas

Recent site activity

016j. AndroidMainfest.xml

  • run the app and look at the DDMS -> device selected -> LogCat
  • you should get red colored exception:
  • java.lang.SecurityException: Sending SMS message: User 10024 does not have android.permission.SEND_SMS.

  • open AndroidMainfest.xml
  • switch TAB on the BOTTOM to "Permissions"
  • try to select "User Permission" -> SEND_SMS (I find this wizard painful to use and prefer editing XML directly)

  • switch to AndroidMainfest.xml TAB
  • add android.permission.RECEIVE_SMS
  • add android.permission.SEND_SMS
  • make sure your code looks like this...

<?xml version="1.0" encoding="utf-8"?>

<manifest xmlns:android="http://schemas.android.com/apk/res/android"

package="com.chicagoandroid.workshop202" android:versionCode="1"

android:versionName="1.0">

<application android:icon="@drawable/icon" android:label="@string/app_name">

<activity android:name=".Main" android:label="@string/app_name">

<intent-filter>

<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />

</intent-filter>

</activity>


</application>

<uses-sdk android:minSdkVersion="4" />


<uses-permission android:name="android.permission.RECEIVE_SMS" />

<uses-permission android:name="android.permission.SEND_SMS" />


<uses-permission></uses-permission>

</manifest>