Search code examples
javascriptjavaandroidcsvintel-xdk

Database for 2 android apps (one Java, the other Javascript)


I'm currently developing an app (via Intel XDK) that reads a .csv file that was created by another app (via Android Studio). The Android Studio app is mainly for capturing sensor data, whereas the Intel XDK app should display the data fancily. Since saving everything as .csv and reading it all later on is incredibly naive performance and storage-wise, I was thinking about creating a database that manages the data. Now, setting up a database for each app seems easy enough, and there are also solutions for two Android Studio apps. But how can I create and manage a database that can be used by an Android Studio as well as by an Intel XDK app?


Solution

  • OK, I think you want to have your Native Android Database to be accessible from another Application so your solution will be ContentProviders.

    You should build a ContentProvider layer above your SQLite database in the native android application then you can easily contact the ContentProvider from any other application included PhoneGap or any cross platform one.

    To learn more about ContentProviders in android check that. To learn how to expose or use ContentProvider from CrossPlatform phonegapp applications check that.