microbit-foundation / microbit-android

micro:bit official Android application code. The application is free to download from https://play.google.com/store/apps/details?id=com.samsung.microbit
Apache License 2.0
13 stars 10 forks source link

offline use: MakeCode's normal cacheing behaviour is not preserved in webview #67

Open jaustin opened 2 months ago

jaustin commented 2 months ago

Describe the bug

When clicking 'create code' while not connected to the internet, even if MakeCode has previously been loaded in the app, does not launch MakeCode.

To Reproduce

  1. Load MakeCode with 'create code'
  2. Use it
  3. Quit the app
  4. Disable connectivity /enable Airplane mode
  5. Open the app and choose "Create code"
  6. 404 page

Expected behavior We would expect the cached version of MakeCode to load.

@microbit-carlos has debuged this in the desktop browser too - it appears our queryparameter specifying the android app (or the ?dbg=1) appears to defeat the cacheing.

@microbit-matt-hillsdon do you think this is really a MakeCode bug given the issue with the queryparam?

jaustin commented 2 months ago

Using the 'change makecode URL' option (long press on the micro:bit face on homescreen) to remove the queryparameter fixes this.