You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Select entry, hit share button, select AnkiDroid Instant-Add
Expected Result
Not sure. Maybe user gets prompted with dialog explaining why Anki cannot be exported to?
Actual Result
API Sample App crashes due to unhandled IllegalStateException in AnkiDroidHelper::getDeckId with message "AnkiDroid database inaccessible. Open AnkiDroid to see what's wrong."
Debug info
N/A (crash is in the app using the AnkiDroid API, not AnkiDroid itself)
Research
[ x ] I have read the support page and am reporting a bug or enhancement request specific to AnkiDroid
[ x ] I have checked the manual and the FAQ and could not find a solution to my issue
[ x ] I have searched for similar existing issues here and on the user forum
Additional Note
If #5304 were implemented, this issue would likely go away.
The text was updated successfully, but these errors were encountered:
I submitted this as an issue on the sample app, but the fix may need to happen in the API itself unless there is an elegant way for API clients to avoid this crash (in which case it should probably be documented).
This was discovered because it happens in the Wannichou app (link to issue) which exports cards to AnkiDroid.
Options we discussed in that linked thread are:
Add an API to check to see if AnkiDroid has access to the DB, so clients can use this before attempting to use API calls that would raise exceptions
Add an API to request storage permission on behalf of AnkiDroid (not sure if this is even possible)
Another option that just occurred to me would be to have the API code catch the exception and handle it by returning null, since that seems to be how most of the API methods report errors.
Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically
Reproduction Steps
Expected Result
Not sure. Maybe user gets prompted with dialog explaining why Anki cannot be exported to?
Actual Result
API Sample App crashes due to unhandled
IllegalStateException
inAnkiDroidHelper::getDeckId
with message "AnkiDroid database inaccessible. Open AnkiDroid to see what's wrong."Debug info
N/A (crash is in the app using the AnkiDroid API, not AnkiDroid itself)
Research
[ x ] I have read the support page and am reporting a bug or enhancement request specific to AnkiDroid
[ x ] I have checked the manual and the FAQ and could not find a solution to my issue
[ x ] I have searched for similar existing issues here and on the user forum
Additional Note
If #5304 were implemented, this issue would likely go away.
The text was updated successfully, but these errors were encountered: