ARK-Builders / ARK-Navigator

Android app for navigation through your data
MIT License
15 stars 15 forks source link

#25: Fix warnings #161

Closed CloudLevi closed 2 years ago

CloudLevi commented 2 years ago

Currently started reworking the permission request. There is a bug here, but in a very rare scenario. Steps to reproduce:

  1. On a fresh app, open the app
  2. Grant storage permissions
  3. Add a root
  4. Without closing the app completely, go to app settings on the device, and revoke the storage permissions
  5. Go back into the app (the app should ask for storage permissions again)
  6. Deny the permission (saved root folder should still be present)
  7. Click on those roots and click the navigate button, the app may crash or behave unexpectedly

Otherwise, I tried blocking all interactions until we have storage permissions. How do you think we should handle that event, and similar ones? My suggestions are:

  1. Clear the fragments, so the user will end up with a blank screen and nothing to interact with
  2. Have some kind of a custom Router, that will check storage permissions when trying to make Fragment transactions
  3. (I think it's a bad one, as it can cause memory leaks, but will toss it here) store "hasStoragePermissions" in MainActivity or other place as a variable, and check it from the Presenter and other places thoughout the app
kirillt commented 2 years ago

@CloudLevi could you register this bug as issue?

Also, what does this warning mean? I don't see any usage of ANDROID_NDK_HOME in build scripts.

WARNING: Support for ANDROID_NDK_HOME is deprecated and will be removed in the future. Use android.ndkVersion in build.gradle instead.

Also please pull commits from main.

kirillt commented 2 years ago

Btw, linter doesn't upload results last month. Could you also look what happened to it?