Comments (6)
I'm not sure about the button appearing without access to Anki, but I can reproduce a crash by:
- Long press AnkiDroid app icon and select "App Info"
- Open "Permissions", disable "Storage"
- Open Wanicchou and hit the Anki "send" button
from wanicchou.
This actually happens in AnkiDroid's API sample app too so I opened a similar issue there: ankidroid/apisample#10
One workaround would be to catch the IllegalStateException
and display an informative message to the user.
from wanicchou.
@mattdeckard
Thanks for the great investigative work. It looks like AnkiDroid itself is not functional without the storage permission since it defaults to a save location where it is required, but it would definitely be nice to have an API call available that returns whether the storage permission is granted to Anki and/or an api call that request storage permission on the behalf of AnkiDroid if it doesn't have it. I'd prefer that over adding error handling if possible.
If you have more time on your hands, you could submit an issue to the AnkiDroid project to add such an API call, or even add it yourself. Otherwise, I can add the API calls and submit a pull request when I finish up re-architecturing Wanicchou itself. Though there's room for debate on whether it should even exist if AnkiDroid is not functional without it, so who knows if it'll get accepted.
The button appearing issue was a result from an accidental commit when I was testing and rushing to get this out, since I was anticipated not having time to work on it soon when I released it. Luckily I have the time again, and it's resolved in the typical case (where the user grants AnkiDroid storage permission.) in a commit to the 1.0.2 branch, but it'll still be a just bit more until I'm ready to release that version due to rearchitecturing.
from wanicchou.
Sure thing! Thank you for making this app. I've found it so useful, it's become my main method of adding cards to my Japanese deck. I used to use Aedict3 to add them from JMDict entries and then manually replaced the English definitions with ones from Sanseido using AnkiDroid's card editor. So you can imagine how much time this app has saved me! 😄
I added an issue here
I'd be happy to work on the PR too but I'm going to try to wait until that issue gets some discussion cause I'm not sure which route the AnkiDroid maintainers will want to go.
from wanicchou.
Glad to hear it! That's definitely the right route in the API case.
But, really. You have no idea how happy knowing someone else actually gets use from the app. Despite the fact that a lot of my dev has been focused on self-satisfaction... Definitely more feature focused soon(tm) though. Probably additional sources and send-to Wanicchou (for direct searching of highlighted text) after things are cleaned up.
from wanicchou.
@mattdeckard
Once again, thank you for the research.
I added a check and message as suggested.
It completely slipped me to just check their permissions with Android's PackageManager, and they do conveniently provide their package name to check.
With that said, it would probably help a lot to have the apisample updated so other developers know how to handle the issue at least.
I personally would still appreciate an API method for checking API availability and Storage permission (or both as a combination and being encompassed by a method like isApiAvailable from the apisample), but we'll see how they feel about it (eventually). Feels a little silly to me to expose the app's package name in an API method and forcing every developer to write the code to perform the same two checks.
from wanicchou.
Related Issues (20)
- Wanicchou's own online database
- Associated Database Website
- Definition View not drawing properly HOT 3
- Translated Display Text for Match Types and AutoDelete HOT 1
- Continuous Integration
- Refocus Definition on Search Result
- Better Wiki Developer's Guide
- User-defined search ordering
- Re-search Online
- Option to automatically tag source dictionary
- New controls and add controls description page/tutorial within the app
- Support selecting text HOT 1
- AddContentAPI.findDuplicateNotes not finding duplicates
- Auto Update imported cards on change
- mockk Tests not validating coVerify HOT 1
- UI Tests
- Android Q Translate/Define Action Intent
- Search Instructions HOT 1
- F-Droid HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wanicchou.