2

I am creating an webview android app. while using our app, its creating cache files in default location.

while loading app at first time, i am saving all files in cache file, For next time, retrieving all files from same cache location, for fast access, instead of remote download.

so, In this moment, There is a possibilities to tamper my cache file in android mobile. so, i want to protect or secure from modifying the cache files in my mobile( if suppose my mobile theft).

I have searched and saw few sites, i am unable to found exact solution, which i am expecting?

Note: I want to restrict/protect/secure the cache file altering or modifying from tamper/theft person.

any suggestion or solution would be appreciated.

Thanks Advance

Referred websites:

https://developer.android.com/reference/android/webkit/WebSettings

Any option to restrict our Android application cache being cleared?

Caching in Android webview

Is it possible to access the WebView cache?

Encrypt the WebView Cache on Android

harikrishnan
  • 1,985
  • 4
  • 32
  • 63
  • I doubt there would be public API for accessing cache files. – androidlover Apr 19 '23 at 19:46
  • 1
    "There is a possibilities to tamper my cache file in android mobile" -- not really. Your app can modify your cache contents. No other app can, except on rooted devices. End users cannot modify the cache contents either, except on rooted devices. – CommonsWare Apr 21 '23 at 16:18

1 Answers1

-1

If your application accesses sensitive data with a WebView, consider using the clearCache() method to delete any files stored locally. You can also use server-side headers, such as no-store, to indicate that an application should not cache particular content.

read it:

https://developer.android.com/training/articles/security-tips#WebView

AmirMohamamd
  • 301
  • 3
  • 14
  • As per my requirement, i have to store data in cache files and need to make secure from unauthorised modification. so, we are seaking solutions. – harikrishnan Apr 27 '23 at 08:57