Skip to content

Commit

Permalink
8.0 8.1 app crash fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tkrajina committed Oct 28, 2018
1 parent 4af8b6e commit 65e259c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
8 changes: 2 additions & 6 deletions 10000sentencesapp/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
android:theme="@style/AppTheme">

<provider
android:name="com.activeandroid.content.ContentProvider"
android:authorities="info.puzz.a10000sentences"
android:enabled="true"
android:name=".dao.DatabaseContentProvider"
android:authorities="${applicationId}"
android:exported="false" />

<meta-data
Expand All @@ -28,9 +27,6 @@
<meta-data
android:name="AA_DB_VERSION"
android:value="10" />
<meta-data
android:name="AA_MODELS"
android:value="info.puzz.a10000sentences.models.Language,info.puzz.a10000sentences.models.Sentence,info.puzz.a10000sentences.models.SentenceCollection,info.puzz.a10000sentences.models.SentenceHistory,info.puzz.a10000sentences.models.Annotation,info.puzz.a10000sentences.models.WordAnnotation" />

<activity
android:name=".activities.CollectionsActivity"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package info.puzz.a10000sentences.dao;

import com.activeandroid.Configuration;
import com.activeandroid.content.ContentProvider;

public class DatabaseContentProvider extends ContentProvider {
@Override
protected Configuration getConfiguration() {
Configuration.Builder builder = new Configuration.Builder(getContext());
builder.addModelClass(info.puzz.a10000sentences.models.Language.class);
builder.addModelClass(info.puzz.a10000sentences.models.Sentence.class);
builder.addModelClass(info.puzz.a10000sentences.models.SentenceCollection.class);
builder.addModelClass(info.puzz.a10000sentences.models.SentenceHistory.class);
builder.addModelClass(info.puzz.a10000sentences.models.Annotation.class);
builder.addModelClass(info.puzz.a10000sentences.models.WordAnnotation.class);
return builder.create();
}
}

0 comments on commit 65e259c

Please sign in to comment.