I've created an android app which tracks user experiences(for example mood) through days( So it uses databases) and I've installed it on my (real) phone. To truly assess my application I work with the application on my real phoine for some days to see how it works.
The problem is about upgrades : when I make changes to my app and then update the app in my phone respectively there is a great chance everything would be ruined. for example suppose that I mistakenly add a line to delete the database! So I want to clone(backup) the app on my real device before updates. Is it possible?
More clarification: I want to make clone of the app installed on my real device with "all it's data". As I've mentioned, app's data will be the user's experience which may contain a week or month of data. Changing app id will install a fresh copy which I'm not interested in.
The only defining thing about an app in a device is the appId. So you can have two instances of the same app as long as they have different applicationId
. You can simply change the applicationId
property in build.gradle
file to achieve this:
android {
...
defaultConfig {
applicationId "any.new.name"
}
...
}
Keep changing the appId for different versions
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.