1. Android Central Question's Avatar
    It looks like Android 11 is designed such that either an app deletes its data when it gets uninstalled or the app stores the data in a remote server.

    But my app requirements are different:

    My app doesn't store any data on a remote server but it stores user data on user's device itself.

    So, my app creates some files in Public Documents directory.

    When the app is uninstalled, the data on the device doesn't get deleted.

    When the user installs the app again, the app sees that there is previous data in the device and hence it tries to reuse that earlier data.

    But, when trying to read the file, Android gives an error/exception that file cannot be read.

    I tried setting the file permissions (when it is created for the first time) to anyone can read/write/execute but I don't think that this is working.

    So, it looks like the problem is: When the app is installed again, it is a new user in the system and since it is not the owner of the files created by previous installation of the app, Android gives an error/exception.

    So, is there any solution?

    Or, is it that Android 11 is designed such that either an app deletes its data when it gets uninstalled or the app stores the data in a remote server?
    11-01-2021 03:16 AM
  2. ManiacJoe's Avatar
    Seems odd. Apps are not users.
    What is the exact error code you are getting. What are the exact permissions on the existing files.

    (This thread may need to be eventually moved to one of the developer forums.)
    11-01-2021 09:48 PM
  3. B. Diddy's Avatar
    Welcome to Android Central! I moved this from the Android 11 forum to the Software Development forum for more appropriate traffic.

    Please register on this forum, which will allow you to engage in discussion more easily, as well as post images. https://forums.androidcentral.com/as...community.html
    11-01-2021 09:49 PM
  4. anon(10753934)'s Avatar
    Yeah there is not really anything direct about this for the end user.Like Wickr for example knows if your using a new device or not. You summed up for us what the answers are I reckon.
    11-01-2021 11:12 PM

Similar Threads

  1. "Reachability"-like function on Android in 2021?
    By Phas0r in forum General Help and How To
    Replies: 2
    Last Post: 11-18-2021, 07:45 PM
  2. Samsung S7 FE flash to straight Android 11 or 12L
    By Globalise in forum Samsung Galaxy Tab S7 & S7+
    Replies: 3
    Last Post: 11-07-2021, 12:48 PM
  3. Are there any current-spec Android phones under 5.7" in size?
    By Android Central Question in forum Ask a Question
    Replies: 1
    Last Post: 11-01-2021, 09:55 PM
  4. Should i delete app leftovers? Its in file titled dp.ws.popcorntime
    By Android Central Question in forum Ask a Question
    Replies: 1
    Last Post: 11-01-2021, 09:50 PM
  5. My S10e will not update past android 10 security patch March 1, 2020
    By Android Central Question in forum Ask a Question
    Replies: 2
    Last Post: 10-31-2021, 08:48 PM
LINK TO POST COPIED TO CLIPBOARD