Search code examples
androidsqliteandroid-sqliteandroid-sharing

what happen for sqlite db when share apk


As I'm new in sqlite & android: I've an app with external DB in assets folder that create a copy of it for the first use and if it exists, I just open the DB in app.Here is my question: after these, data may change in DB,such as set some flags,update some rows,create some records , etc. .And now if we share the apk with some apps like "Zapya" ,"MyAppSharer" or any other, Is this app shared with the CHANGED DB or default DB? and if its true what should I do to prevent of this issue? thanks in advance


Solution

  • your android-apk file contain the content of the assets folders.

    share the apk means copying the apk file (without the local data of the copied and modified db)

    therefor the share-receiver will only get the default-DB