Thanks again
Hi Erel,
Thanks again for such a quick reply.
I've played around with content chooser already.
The thing is that, what you use to pick the content (eg. the standard audio picker or a file explorer controls what format you get the Filename (a reference to the database, or the actual file path)
In order to produce an accurate next control (that doesn't depend on the current playlist) or get the mp3's details, I ideally would like to get the information from this database:
"data/data/com.android.providers.media/databases/external-#card id in hex#.db" as shown:
Sub Activity_Create(FirstTime As Boolean)
'external-30333863.db is my memory cards database yours will be "external-" & cardid
'I found the value for cardid in "data/data/com.android.music/shared_prefs/Music.xml"
'code for finding cardid is included in this post
If File.Exists("","data/data/com.android.providers.media/databases/external-30333863.db") Then
File.Copy("","data/data/com.android.providers.media/databases/external-30333863.db",File.DirDefaultExternal,"test.db")
End If
End Sub
This returns the exception:
Java.IO.FileNotFound.Exception: data/data/com.android.providers.media/databases/external-30333863.db (Permission Denied)
similarly:
Sub Activity_Create(FirstTime As Boolean)
If File.Exists("","data/data/com.android.providers.media/databases/external-30333863.db") Then
File.OpenInput("","data/data/com.android.providers.media/databases/external-30333863.db")
End If
End Sub
returns the same error
and as expected:
Sub Activity_Create(FirstTime As Boolean)
If File.Exists("","data/data/com.android.providers.media/databases/external-30333863.db") Then
Dim SQL As SQL
SQL.Initialize ("","data/data/com.android.providers.media/databases/external-30333863.db",False)
End If
End Sub
returns
android.database.sqlite.SQlite.Exception: Unable to Open Database File
I put my issues here because anaylor01 was having similar problems accessing a similar database (however his where settings which are also included in the link below). I believe that a lot of these databases should be readable (even if they are not marked as), I'm pretty sure that there are classes that enable you to get information in java:
Content Providers | Android Developers
I wouldn't even know where to start using the reflections library, as the reason I'm using B4A is java is like Klingon to me.
I've included my project so far if you want to have a look (Its not really relavent, apart from showing how to find the database mentioned. It already has the content chooser implemented if you choose menu/load)