pete-mc / Summit

Where Every Achievement is a Summit Conquered - Terrain | Summit adds usability features to the Australia Scouts Terrain website.
https://www.facebook.com/groups/scoutsterrain
MIT License
6 stars 1 forks source link

[UPDATED] Bug: Unable to save downloads within Summit app (Android) #47

Open CrispyCamper opened 8 months ago

CrispyCamper commented 8 months ago

Describe the bug When using the Android Summit app, you are unable to save any downloads. This applies to Summit reports, Topo reports, and native Terrain reports and exports (such as programmes).

To Reproduce Steps to reproduce the behavior:

  1. Open the Terrain | Summit app on your Android device
  2. Navigate to Topo, and attempt to generate a report (such as Wallchart)
  3. It will act as if it is generating (spinning progress circle), but no report will ever be generated
  4. Navigate to any Summit report (such as Peak Award Progress), and attempt to save the report, by either clicking "Print", or "Export to CSV"
  5. The button will stay highlighted, and no report will be saved
  6. Navigate to any native Terrain report (such as a Programme), and click "Export"
  7. You get a popup saying "Activity Export downloaded", but no download is saved

Expected behavior All reports/exports should be saved into the device's Downloads folder

Screenshots Screen Recording of Topo report as I originally thought this bug only pertained to Topo reports

CrispyCamper commented 8 months ago

Upon further testing, I am unable to download any files within the Summit app, including those native to Terrain, such as exporting programmes. It seems Summit is blocking downloads completely somehow.

AceLeader2023 commented 8 months ago

I can confirm

Device: Samsung S22 Ultra OS: Android Version: 2.3.0

pete-mc commented 8 months ago

Thanks, I am using a fairly basic browser in the app, I think I might need to swap it out for a different one. I think this also effects the 3 button / title issue.

pete-mc commented 8 months ago

Pushing to the v3 which will be based on the same framework that Terrain uses so all of the components work more seamlessly and I will switch out the browser from Cordova InAppBrowser to https://capacitorjs.com/ which seems to be a lot more slick and supports more features.

CrispyCamper commented 8 months ago

Unfortunate that we won't be able to generate anything within the app until then, but if it requires changing the entire underlying framework to fix it, needing to wait til v3.0 is understandable. Thanks for your work.

pete-mc commented 8 months ago

It should not be too far away, I am targeting early in term 1. I already have the foundations configured and working within Terrain using Vue which is the framework it uses. I have been able to add pages directly in so that Terrain is aware of them and handles the navigation and data which should make it much more robust.

My code is already quite modular so it will port across quite easily and I shouldn't need to rewrite much of it.

The mobile app part is basically just a wrapper so I might be able to push that back to the previous version if the rest of 3.0 runs into any issues.

pete-mc commented 8 months ago

Been playing around with this issue, the workaround I am playing with now might sort it. If so, I should be able to release a fix this week.

pete-mc commented 8 months ago

Update: I have implemented the new browser app so it will provide me with a lot more options like print and save. It will take me some time to work through them. Adding some links to remind me when I get some free time to try them out.

https://github.com/pichillilorenzo/flutter_inappwebview_examples/tree/main/file_download https://inappwebview.dev/docs/webview/print-job-controller/

The code for the new app is here if anyone is interested in taking a look at this issue: https://github.com/pete-mc/Summt-FlutterBrowserApp