The main reason we built a content provider was to allow other applications to access the complex data store in our database and perform CRUD operations. We will now build one more application in order to test our newly built content provider. The test application is very simple, comprising of only one activity class and one layout file. It has standard buttons to perform actions. Nothing fancy, just the tools for us to test the functionality we just implemented. We will now delve into the TestMainActivity
class and look into its implementation:
public class TestMainActivity extends Activity { public final String AUTHORITY = "com.personalcontactmanager.provider"; public final String BASE_PATH = "contacts"; private TextViewqueryT, insertT; public class Columns { public final static String TABLE_ROW_ID = "_id"; public final static String TABLE_ROW_NAME = "contact_name"; public final static String TABLE_ROW_PHONENUM = "contact_number"; public final static...