App crashes on export when AnkiDroid doesn't have Storage permissions

Open
#10 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
android, java
Domain
mobile

Research direction

Reproduce the permission-denied export flow in the API Sample app, then inspect AnkiDroidHelper::getDeckId and the Instant-Add share path. Determine the intended user-facing behavior for an inaccessible AnkiDroid database; done means this state no longer causes an unhandled IllegalStateException.

Written by the indexing model from the issue text.

Description

Steps to reproduce:
  1. Install AnkiDroid but do not run OR remove Storage permissions from existing AnkiDroid app via App Info UI
  2. Launch API Sample app
  3. Select entry, hit share button, select AnkiDroid Instant-Add

Expected: Not sure? Maybe user gets prompted with dialog explaining why Anki cannot be exported to?
Actual: App crashes due to unhandled IllegalStateException in AnkiDroidHelper::getDeckId with message "AnkiDroid database inaccessible. Open AnkiDroid to see what's wrong."

Dominant language
Java
Stars
28
Forks
15
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ankidroid/apisample

All issues in ankidroid/apisample

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.