Listing 919 Android Manifestxml

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

<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.cookbook.datastorage" android:versionCode="1" android:versionName="1.0"> <application android:icon="@drawable/icon"

android:label="@string/app_name">

<activity android:name=".DataStorage"

android:label="@string/app_name"> <intent-filter>

<action android:name="android.intent.action. MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>

<activity android:name=".MyPreferences" /> <activity android:name=".Diary"/> <activity android:name=".DisplayDiaries"/> <provider android:name="DiaryContentProvider"

android:authorities="com.cookbook.datastorage" /> </application>

<uses-sdk android:minSdkVersion="7" /> </manifest>

Now the content provider is ready for other applications to use.To test this content provider, a new Android project can be created called DataStorageTester with main activity DataStorageTester.This is shown in Listing 9.20.An instance of the ContentResult is created to query the data from the DataStorage content provider.After a Cursor is returned, the testing function parses the second column of each data entry and concatenates into a String to display on the screen using a StringBuilder object.

Character Building Thought Power

Character Building Thought Power

Character-Building Thought Power by Ralph Waldo Trine. Ralph draws a distinct line between bad and good habits. In this book, every effort is made by the writer to explain what comprises good habits and why every one needs it early in life. It draws the conclusion that habits nurtured in early life concretize into impulses in future for the good or bad of the subject.

Get My Free Ebook


Post a comment