Skip to content
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

Enable opening files via file browser, and via file picker within the app #459

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

mattford
Copy link

@mattford mattford commented Jul 12, 2024

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

@cgeo-ci-bot
Copy link
Collaborator

Can one of the core team members give me the the permission to test this?

@mattford mattford marked this pull request as ready for review July 12, 2024 09:08
@bekuno
Copy link
Member

bekuno commented Jul 13, 2024

ok to test

@bekuno
Copy link
Member

bekuno commented Jul 13, 2024

@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/.

@bekuno
Copy link
Member

bekuno commented Jul 13, 2024

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.

@mattford
Copy link
Author

@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

@bekuno
Copy link
Member

bekuno commented Jul 16, 2024

You will find the current information to the c:geo WIG integration at https://github.com/cgeo/cgeo/wiki/Use-the-Draft-Wherigo-Player.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants