hello, i have a problem with my program,
i need to inport file db in internal directory of the app
i usa this code:
the app exit
in logs i read this:java.io.FileNotFoundException: /storage/emulated/0/Android/data/com.partannasoftware.takeaway10Asporto/files/comande.db: open failed: ENOENT (No such file or directory)
i need to inport file db in internal directory of the app
i usa this code:
inportb database:
Sub btnimportadb_Click
Dim Selection As Short
Selection = Msgbox2("Sei sicuro di voler eliminare il database esistente e di volerlo sostituire con un'altro? se premi si elimini il database esistente".ToUpperCase, "A T T E N Z I O N E !!", "Si", "", "No", Null)
Select Selection
Case DialogResponse.POSITIVE
mp1.Load(File.DirAssets,"eseguito.mp3")
mp1.Play
'rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
rp.CheckAndRequest(rp.PERMISSION_READ_EXTERNAL_STORAGE)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
If Result Then
mp1.Load(File.DirAssets,"eseguito.mp3")
mp1.Play
'File.Delete(File.DirInternal,"comande.db")
File.Copy(File.DirDefaultExternal, "comande.db", File.DirInternal, "comande.db")
MsgboxAsync("Importazione del database effettuata correttamente, riavviare l'applicazione.","DATABASE IMPORTATO")
Else
Log("no permission")
End If
Case DialogResponse.CANCEL, DialogResponse.NEGATIVE
End Select
'mp1.Load(File.DirAssets,"txmessaggio.mp3")
'mp1.Play
'File.Delete(File.DirInternal,"comande.db")
'File.Copy(File.DirRootExternal, "comande.db", File.DirInternal, "comande.db")
'MsgboxAsync("Importazione del database effettuata correttamente, riavviare l'applicazione.","DATABASE IMPORTATO")
End Sub
the app exit
in logs i read this:java.io.FileNotFoundException: /storage/emulated/0/Android/data/com.partannasoftware.takeaway10Asporto/files/comande.db: open failed: ENOENT (No such file or directory)