On Thu, Jun 11, 2009 at 10:37 AM, CodePupil <[email protected]> wrote:
> > > If I use this approach(i.e. using ContentProviders), I will have to > port all my code to Java. :( All your code, really ? Can't you just write a tiny Java wrapper to access the data and send it to your native code instead? Moreover, there are no native-only applications on Android, you will need a Java wrapper to properly respond to system events, so better add the capability into it. > Can't this be done thru Native layer? How can I overcome this external > db permission stuff ? No, the security model prevents you peeking and poking at other application's data directly, and for good reason. It's the application which decides what it wants to expose to the rest of the system, and it uses a ContentProvider to do just that. This also allows it to change its internal implementation as needed without modifying the interface used by other clients. And if an application doesn't want to expose its database this way, you have no business looking at it. (Of course unsecure applications store their data into /sdcard, where anybody can read/write/corrupt it at will, but that's a different problem). > or How can I make UI in the same group where media app is? If I'm able > to make my UI in the same group as of media app, I think, I can access > external db thru native app which will be triggerred by my UI ! > Nope, applications cannot get system-level permissions. > > Thanks! > > On Jun 5, 11:56 pm, David Turner <[email protected]> wrote: > > Why don't you try to access the corresponding ContentProvider instead ? > > > > > > > > On Tue, Jun 2, 2009 at 4:15 PM, CodePupil <[email protected]> wrote: > > > > > Hi All, > > > > > I need to access media's(which is stored on SDCard) metadata which > > > android keeps in database file created by its media app. Android > > > keeps > > > separate db file for each sdcard at the location /data/data/ > > > com.android.providers.media/databases by associating sdcard id to > > > filenames e.g. external-<sdcard-id>.db > > > > > Now I need to read this db file but due to permissions(rw-rw----) I > > > dont be able to do that. If I excecute Native code as a root then > > > Obviously I'm able to access it but when I trigger my Native code > > > using some UI It's not able to access this db. > > > > > Could anybody throw some light on this? > > > How can I be able to access the db associated to sdcard using Native > > > code(which is triggerred thru some UI) ? > > > > > Thanks!- Hide quoted text - > > > > - Show quoted text - > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
