Asking Permission to Place a Call
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<meta-data android:name="android.app.searchable"
android:resource="@xml/searchable" />
<meta-data android:name="android.app.default_searchable"
android:value=".LunchList" />
</activity>
<activity android:name=".DetailForm">
</activity>
<activity android:name=".EditPreferences">
</activity>
<receiver android:name=".AppWidget"
android:label="@string/app_name"
android:icon="@drawable/icon">
<intent-filter>
<action
android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_provider" />
</receiver>
<service android:name=".WidgetService" />
</application>
</manifest>
Step #6: Dial the Number..................................................................
Next, let us set up DetailForm with its own option menu that contains a Call
item. When chosen, we dial the phone number, assuming there is one.
First, create LunchList/res/menu/option_detail.xml with the following
content:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/call"
android:title="Call"
android:icon="@drawable/ic_menu_call"
/>
</menu>
Then, add the following methods to DetailForm: