Android Question How to delete file in android 13 (File.DirInternal )

nickysuwandi

Member
Licensed User
Longtime User
Dear All

I have some problem with file sqllite, when i develop the android apps, i had add table base onprogress in developing (call dbpos.db).
In Android below 12, i had no problem, when add table in sqllite. i just delete data file and uninstall my apps in android phone.

But this make me some problem when my phone upgrade to android 13, i had add table in sqllite, (i had delete my apps data and uninstall my apps in adroid phone), and install my apps in that phone.
when i check to sqllite database, i got table that i had add doesn't exist (my database still the old one) .

How to delete my old database in android 13 ?

This is my code when copy new sqllite database

code copy file dbpos.db to android:
If File.Exists(File.DirInternal ,"dbpos.db") = False Then
        File.Copy(File.DirAssets,"dbpos.db",File.DirInternal,"dbpos.db")
    End If

Thanks

Nicky
 
Top