Provider not found in the contract using SQLite in android with java -
i want implement provider access sqlite database
in java android project using contentprovider
class.but when build have error :
failed find provider info com.sdnsoft.natemps.natemps.data.natempsprovider
this code:
the manifest file
<provider android:name="natempsprovider" android:authorities="com.sdnsoft.natemps.natemps.data" android:enabled="true" android:exported="false"> <grant-uri-permission android:pathpattern=".*" /> </provider> <application android:allowbackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundicon="@mipmap/ic_launcher_round" android:supportsrtl="true" android:theme="@style/apptheme"> <activity android:name=".mainactivity" android:label="@string/app_name" android:theme="@style/apptheme.noactionbar"> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.view" /> <action android:name="android.intent.action.edit" /> <action android:name="android.intent.action.pick" /> <category android:name="android.intent.category.default" /> <data android:mimetype="vnd.android.cursor.dir/vnd.com.sdnsoft.natemps.natemps.data.natempsprovider" /> </intent-filter> </activity> <activity android:name=".loginactivity" android:label="@string/title_activity_login"></activity> </application>
the content provider
public class natempsprovider extends contentprovider implements contentprovider.pipedatawriter<cursor> { // used debugging , logging private static final string tag = "natempsprovider"; /** * database provider uses underlying data store */ private static final string database_name = "natempscontract.db"; /** * database version */ private static final int database_version = 1;
the contract
public class natempscontract { public static final string authority = "com.sdnsoft.natemps.natemps.data.natempsprovider";
// rest of static class
wiki
Comments
Post a Comment