wlky / AnkiDroid-Wear

Anki for Android Wear devices
GNU General Public License v2.0
48 stars 11 forks source link

dev #14

Closed nbossard closed 7 years ago

nbossard commented 7 years ago

Hello, I am trying to fix ankiwear app non working on Android 7 / ankidroid 2.8.2. This pull request is only to update dependencies and improve logs.

wlky commented 7 years ago

Hey @nbossard, thanks for your work. Have you tried if this fixes the Android 7 issue?

nbossard commented 7 years ago

Hello wlky, This was not enough, there is a security exception, when required permission : "com.ichi2.anki.permission.READ_WRITE_DATABASE" is necessary and not granted :

    Cursor reviewInfoCursor =
            getContentResolver().query(DUE_CARD_REVIEW_INFO_URI, null, deckSelector, deckArguments, null);

, I am writing some code to ask user for this permission at settings activity start. It works, but still needs a little bit of cleaning, sending it soon.

nbossard commented 7 years ago

Ok works fine for my devices now. Please review and pull if ok for you.

wlky commented 7 years ago

actually the problem with the permission only came up when you upgraded the target api to an api >22. I think 23 is the limit, every app targeting an api above has to request permissions :) I will check your code and put a new version in the play store in the course of this week

nbossard commented 7 years ago

Yes you are right, updating everything fixed the original issue but created this Bug on security. I will check out current version to find what was the original problem just for info.

wlky commented 7 years ago

I'll merge this pull request in the next days, just have to the permission request for external storage