Android Question How to use #CustomBuildAction to Delete Specific File

Anuj_Singh

Member
Licensed User
Longtime User
Hello All,
I want to delete my existing SQLite database file, before installing new apk file.

I have explore a lot I got #CustomBuildAction tag which we can use in Main Activity.
Will you please help me, how to use #CustomBuildAction to delete a specific file before APK install.

Thanks in Advance.

Regards,
Anuj
 

Anuj_Singh

Member
Licensed User
Longtime User
On Device..

What I want to do, as I install first release of my App.
I made coding changes also made Database changes and made updated release.
While installing updated release I have to use new database, that's why want to delete old database file which is on SD card of Device.

Hope you understand my issue.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
When you run the program you can check if the file does exist and :
If yes :
- Either delete it and copy the new one from DirAssets.
- If you have a version in it, check the version and delete and copy the new one if needed.
If no: Copy the file.
 
Upvote 0

Similar Threads

D
  • Article
Android Code Snippet CustomBuildAction
Replies
0
Views
4K
Deleted member 103
D
Cookies are required to use this site. You must accept them to continue using the site. Learn more…