Enable opening files via file browser, and via file picker within the app
Description
This PR adds a content filter to allow the app to show in the "open with" dialog in Android, allowing a user to select a GWC file from their downloads folder and select to open it in WhereIGo. A "select file" is also added to the start dialog allowing the user to browse the system for a file to open.
On selecting a file to open, the file is copied to the WhereIGo folder and opened. If a file with the same name already exists there, the copy is skipped and the existing cartridge is opened.
There is a slight limitation in the file picking functionality, because GWC doesn't have a defined mimetype and just shows as application/octet-stream, it is not possible to scope the intent-filter and file picker to just gwc files, therefore WhereIGo will appear as a handler for any file type.
I've changed a few English strings so might need some pointers on how this project handles translation.
Tested on API 28 and 33
Can one of the core team members give me the the permission to test this?
ok to test
@mattford Many thanks for your contribution.
In the last years no one was able or had time to start in the neccessary tasks to move WhereYouGo in the changed Android world. (E.g., file system access with SAF). Instead, a start was done to integrate WYG in c:geo. Please see at https://github.com/cgeo/cgeo/tree/master/main/src/main/java/cgeo/geocaching/wherigo and https://github.com/cgeo/cgeo/wiki/Use-the-Draft-Wherigo-Player. It will be greatly appreciated if you can support the development of c:geo (or WYG in c:geo).
It is possible, that we integrate your PR in the code base here. But currently it is not possible to release a new version at the Google PlayStore. Nevertheless, the resulting *.apk of your PR test build is useable from our CI, e.g. at https://ci.cgeo.org/job/WhereYouGo-CI_PR-build/664/.
I've changed a few English strings so might need some pointers on how this project handles translation.
The translation is done in Crowdin: https://crowdin.com/project/whereyougo. The core language is English. So, all translations are done in Crowdin from the English words.
@bekuno thanks for the response, I sort of realised after I'd raised this PR that the integration into c:geo had progressed, I'd be happy to support the effort over there in any way I can
You will find the current information to the c:geo WIG integration at https://github.com/cgeo/cgeo/wiki/Use-the-Draft-Wherigo-Player.