-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API for adding cards fails on Android 7 (Flyme 7.0.3.1A) #5114
Comments
Try installing ankidroid and allowing permissions then installing the sample. We have had a similar issue solved this wsy. No idea why |
Do you mean uninstalling, then installing? |
Yes, the previous problem we saw was that if ankidroid was not installed and I think with permission enabled before the API consumer was installed, it did not work. We don't know why as my read on manifests indicates we have the necessary declarations in ankidroid |
Uninstalled AnkiDroid, installed it again from F-Droid, launched, accepted one permission (access storage). Both API sample and my app started working. |
Sounds like the same thing we saw with the previous issue. We are not able to fix this that I know of as it appears to be a quirk with permissions. Our recommendation for the developer of the other application was to include this information prominently in their documentation - that AnkiDroid needed to be fully installed prior to installing the API-consuming app. I can't find the existing issue anymore, but I wonder if it's related to this at all: ankidroid/apisample#2 |
Note that I didn't reinstall the API sample or TextImporter. It started working after reinstallation of AnkiDroid alone. |
Hmm. the combination matrix of all the things to test (which to install first, try to access permission first or not, grant permission from one or the other app or both) is a bit tedious but it would be interesting to know under exactly what conditions it works or fails. I haven't played with the API enough to know it well myself, obviously |
It sounds like somehow our custom permission that we use for the API had
not been registered in the Android system, causing the apisample to fail
when said permission is requested.
…On Tue., 13 Nov. 2018, 2:42 am Mike Hardy ***@***.*** wrote:
Hmm. the combination matrix of all the things to test (which to install
first, try to access permission first or not, grant permission from one or
the other app or both) is a bit tedious but it would be interesting to know
under exactly what conditions it works or fails. I haven't played with the
API enough to know it well myself, obviously
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#5114 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACsA4nt1KpHxafG3SWGItBVIc5WI6BpZks5uubL8gaJpZM4YX78k>
.
|
Then why "Enable API" checkbox in AnkiDroid settings still changed behaviour a bit (delay vs no delay when returning null)? |
Yeah, no idea... In any case it seems clear that it's a bug in the OS somewhere, not much anyone can do without a reliable reproduction case. |
Reproduction Steps
Expected Result
Something is imported
Actual Result
After long-ish delay the API sample crashes.
My own app (TextImporter) gets
null
fromgetDeckList
call (immediately if API is turn off in AnkiDroid's advanced settings, after delay if it is enabled).Debug info
ankidroid version = 2.8.4 android version = 7.0 acra
Research
[x] I have read the support page and am reporting a bug or enhancement request specific to AnkiDroid
[ ] I have checked the manual and the FAQ and could not find a solution to my issue
[ ] I have searched for similar existing issues here and on the user forum
The text was updated successfully, but these errors were encountered: