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

WhereYouGo should use SAF #309

Open
Lineflyer opened this issue Dec 6, 2021 · 14 comments
Open

WhereYouGo should use SAF #309

Lineflyer opened this issue Dec 6, 2021 · 14 comments
Assignees
Labels
Feature Request New feature or request

Comments

@Lineflyer
Copy link
Member

WhereYouGo should utilize the storage access framework (ScopedStorage) as it has some data exchange needs:

@Lineflyer Lineflyer added the Feature Request New feature or request label Dec 6, 2021
@sk-juroot
Copy link
Contributor

currently Work In Progress, there is a lot to refactor to use SAF

@Lineflyer
Copy link
Member Author

@sk-juroot
Thanks for stepping into this sleeping project and getting it alive again. Highly appreciated.

If you need information or help for SAF and associated topics, you can also try to glimpse into the cgeo repository, where we have it implemented already. @eddiemuc has most experiences there.

In fact what I think is needed for WhereYouGo is:

  • Let the user select a folder of his choice, where cartridges (and savegames) are to be stored
  • Let the user select a folder for his offline maps

Besides that I guess WhereYouGo does not have any file interactions which need scoped storage.

@sk-juroot
Copy link
Contributor

Thank you for referencing knowledgeable contact from c:geo team, I will get in touch when needed.

These two targets for SAF are on my list to resolve, also I have found some calls for manipulating files from OpenWIG. So I expect fun time when getting this to work 😄

@Lineflyer
Copy link
Member Author

Lineflyer commented Jan 22, 2022

I would suggest a very minimized approach:

  • For cartridges it should be enough to only store them in the default app accessible folders and let user "import" them to there via SAF.
  • For offline maps though the user should be able to grant the app access to a folder of users choice (to allow reusing maps of other apps, such as c:geo).

@MagpieFourtyTwo
Copy link

Unfortunately with Android 14 (problem most probably started with Android 13) it eventually got completely impossible to make WYG work at all, as a) cartridges can not be downloaded from within the app (gives download error, although everything is configured correctly and even login and cookie consent has been done on the website), and b) even cartridges stored on the device can not be opened (although WYG can enter the folder, it does not recognize them).

If there is any (perhaps overlooked so far) way, to make WIG work on an Android 14 device (checked the other day with a friend's Samsung S23), I would really appreciate helpful hints.

Guess the problem is SAF, thus would really be great, if this problem can be solved (before ALC completes kills the much nicer WIGs).

@eddiemuc
Copy link
Member

eddiemuc commented Jan 9, 2024

WhereYouGo is no longer the only available Wherigo Player for Android. Unfortunately this might make it obsolete over time if it remains unmaintained

@MagpieFourtyTwo
Copy link

For real? Which one would you recommend? At a first glance, I did not find something really usable in the Playstore ...

@moving-bits
Copy link
Member

You are still able to run WIG using WhereYouGo on an Android 14 system, have just cross-checked on my own mobile.

But WIG must be downloaded using WhereYouGo (by either starting it from within c:geo or by tapping on a cartridge link) - for this to work, WhereYouGo must be configured to accept WIG-links, see WhereYouGo FAQ: https://www.whereyougo.org/faq#android12_links

(Opening a cartridge from local file system will only work for the app-internal folder, due to missing SAF-support, files in public folders are no longer reachable.)

That leaves the map problem, though - offline maps cannot be accessed either, also due to missing SAF. You need to select an online map provider.

@MagpieFourtyTwo
Copy link

You are still able to run WIG using WhereYouGo on an Android 14 system, have just cross-checked on my own mobile.

As mentioned before we were not able to enable WIG to download a cartridge from within the app.
Even enabled and disabled the WYG links several times, but always just received a download error, whatever we did.
Even re-installed WYG, to get a clean data basis (esp. WRT the data folder), but to no avail.
Maybe we overlooked s/th, but I doubt it, as "we" was not just me and the guy to be supported, but plus a third one, who one may call a real Android nerd. ;)

@moving-bits
Copy link
Member

This is strange, as it does work here on a S22 running Android 14. IIRC we had such a thing a while ago, but back then it was some website change (which made us release a small hotfix for WhereYouGo). Do you get any error message (more specific than "download failed")?
I can try to debug into it, but won't be able to do so before the weekend.

@MagpieFourtyTwo
Copy link

Do you get any error message (more specific than "download failed")?

Most regretfully not. This was the only message we got.

Even worse: I can't test at will, as I don't have access to this nor any other A14 device.
But I'm pretty sure I can do some more tests at the next event, when she's there, too (she won't mind for sure, cause she wants to do WIGs again) but it would be good to know what I can do more (or differently) then. Or if there any debug possibilities/settings in WYG (like with c:geo).

As for the "invisible" cartridges: It is correct that WYG will not see cartridges, if the storage folder has been set to e. g. Downloads, but should see them, if they were stored to the default folder? Even if they were not downloaded inline by WYG? Cause as the in-app-download did not work, we tried to download a cartridge from the website and place it in the default folder - but even then WYG did not see it. Or does the inline download s/th different?

@moving-bits
Copy link
Member

moving-bits commented Jan 12, 2024

I can reproduce this behavior in the emulator meanwhile. Login in DownloadCartridgeTask.java returns a 302 http code / redirect to the error page, but without giving any hint WHY the login fails. Form names have not changed, AFAICS, and adding the "RequestVerificationToken" to the login request does not seem to suffice (I've added both the cookie and the form field, as they have different values).

Any ideas from the HTML / http wizards?

@moving-bits
Copy link
Member

@bekuno
Can you update Gradle for the WhereYouGo project to make it compatible to more recent AS versions? (as time permits)
I needed to downgrade to Giraffe and to change JDK to be able to compile WhereYouGo again.

Thanks.

@moving-bits
Copy link
Member

For documentation purposes with regard to the original issues here (missing SAF support), see #73 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants