Intiate daabase - Artlite/SQDatabase GitHub Wiki
- Create Application singleton
public final class CurrentApplication extends Application {
/**
* Method which provide the action when application created
*/
@Override
public void onCreate() {
super.onCreate();
SQDatabase.init(this);
}
}- Register Application singleton in your AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.artlite.sqltest">
<application
android:name=".core.CurrentApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
</application>
</manifest>- Done, database registered. For now you can start working with SQLite