-
Notifications
You must be signed in to change notification settings - Fork 100
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
[FR] intent for CoolReader #9
Comments
I'm not sure what change are you asking me to make. Launching from other apps is described in the docs. It's up to other app authors. |
Sorry I forgot to answer you.
Also: If for any reason a user wants to use Aard(1) then he can choose |
Aard was launched using fully qualified class name (at least from FBReader, I believe other readers copied it). There is no way for a different Java package/class (such as aard2) to pretend to be it. Also, it was using Android's ACTION_SEARCH intent action which appears to be a special-purpose one - it's part of framework to create "search interface" practical value of which escapes me. If standard intent existed for dictionary lookups I'd add it, but it doesn't, as far as I can tell. |
I see. Thanks |
The last FBReader version which is FOSS is 1.8.2 so unless somebody offers to patch in Aard2 support to that version our best hope is to wait for CoolReader or NightWhistler/PageTurner#484 to add it to a new version. |
Is it? FBReader seems alive and well, and as open source as ever: https://github.com/geometer/FBReaderJ, am I missing something? Source for version with Aard 2 integration is available at https://github.com/itkach/FBReaderJ There's also outstanding pull request to merge this change: geometer/FBReaderJ#314 |
I tried this change on FBReader tag 1.8.2-ics but no dictionaries are now available and the app crashes when I try to translate a word. Since 1.8.2 there are non-free jars, lingvo and opendictionary api. |
Ah , sorry the change does work. Thanks. |
I notice a bug though: if I look up a word from FBReader, then return to FBReader without quitting Aard (e.g. via Recents), then look up another word from FBReader: Aard still shows the first word. However if I quit Aard via the Back button I do get the expected behaviour. |
Indeed. It looks like lookup activity needs to be started with Intent.FLAG_ACTIVITY_CLEAR_TOP , otherwise existing activity is brought to front and doesn't have a chance to handle new intent (because word to lookup is passed in extras and Android doesn't look at extras when filtering/comparing intents). Give it a try |
(Please ignore a comment I just deleted). It works fine now. I wonder if would be an idea to keep Aard 2 in Recents (whether it was launched from FBReader or not) as it might help jumping back and forward. One can always press the back button but perhaps the app is kept in memory if one doesn't? |
I don't see how. And does jumping back and forward really need help :) ?
The activity may stay in memory for some time, but next time you look up something you'll get a different one anyway. As for application process itself - I'm not sure being in Recent has any effect on when OS may decide to kill it. Of course Aard 2 gets on the list of Recent apps when launched from launcher. I thought it made sense to exclude it from Recent when launched as a lookup from another app since in that case it's more of an "extension" of that app rather than an independent application. |
It's just that I see different behaviour whether on Omnirom 4.4.4 or CM12. In the latter, based on Android 5, if Aard was called via Firefox, then selecting Firefox in Recents returns me to the website; Aard also appears briefly in Recents. In the former, when I select Firefox, I am still in Aard and thus have to use the back button or go to the home screen to return to Firefox.
|
I'm not sure what behavior are you asking for and how the application is supposed to address navigation quirks in all the various Android flavors that are out there. |
It's no big deal. Mainly I thought that navigating via Recents might deserve some extra consideration, particularly since jumping to the previous app is often available as a button shortcut on custom ROMs. Probably, most people have very little need to jump back and forward between dictionary and text many times.
|
And of course, the History tab retains the last word, if somebody really needs to do that.
|
CoolReader 3.1.2-68 has refactored the dictionary code and now supports Aard 2. |
Nice :) |
to make Aard2 ready to replace Aard completely
The text was updated successfully, but these errors were encountered: