1 Reply Latest reply on Dec 5, 2011 5:52 PM by mattcom

    Getting Data from Another App


      I'm writing an Android app and let's say that I want to access the database of another application.


      For example if my app was test, my storage directory would be /data/data/AIR.test.debug/test.debug/Local Store/ etc...


      But I want to access the database via SQLite of /data/data/org.otherapp.blah/databases/data.db


      Does anyone know how to do this?  I thought I could use something like 'file:///data/data/org.otherapp.blah/databases/data.db' 

        • 1. Re: Getting Data from Another App
          mattcom Level 1

          Ok.  So I have made some progress with this.  You can point to the file on Android like this new File('/data/data/{package_name}/databases/{database_name}')


          One thing to note is that the database that I was trying to access did not have the .db extension.  It still worked though.


          Perhaps someone can lend me some insight on the following.


          The chmod on the database was originally something like rw- rw- ---. 

          I rooted my phone and had to change the permissions to rw- rw- rw.  However, after a while the file permissions were set back again to rw- rw- ---.  It doesn't seem to be based on rebooting, or accessing the original application.  It almost seems random.  Sometimes it happens after a few minutes, other times it can be days.


          Does anyone know how I can check to see if the user has their phone rooted or not and how to change permissions via flex?