Using database file built by another app - java

So I am working on an app that looks up data in a database. To populate the database, I built an app that read a text and added the data to that database. Now I want to use the populated database for another app that will look for the data required by the user and the database. Where is the database file saved on the phone and how can I add it to another app?

I think you should consider using ContenProvider.
Content providers are the standard interface that connects data in one process with code running in another process
see this:
http://developer.android.com/guide/topics/providers/content-providers.html

Related

Sqlite data with desktop application

I am creating java desktop application. I have created exe of my jar file using exe4j. Now i am binding my sqlite database with my exe using easy binder software. But when i run my application the data is getting saved properly but when i rerun the application the data is not there which i have saved before. Please help
I have tried using the specific path i.e. stored the sqlite db file at specific location, it is working but it is not secure as any one can open the file.
I need to embed the database along with my application but the database is not saving the data when i rerun my application.
It sounds like your data is only getting temporarily stored because SQLite is using a transient in-memory database due to the fact that it can't find the specified database. Please specify what version of SQLite driver you are using, as well as an example of its use in your code.
Is you are worried about the security of someone accessing the database, then you may wish to consider another database besides SQLite.

google app engine : switch sql cloud database instance , keeping the source code same java eclipse

The application is hosted in google app engine, we are using google cloud sql as database.
we are in testing phase of our application,
so we have to database
live database
test database.
so can anyone please suggest a way to switch from live database to test database without changing the source code,
for now we have created 2 different source code with different urls to connect to different database instances and have created 2 instance of application but we want to keep the source code same.
there are many ways to do this. you could pass a url parameter to indicate which db to use. you could also have an admin page where you select which db all will use.

Property data is not updated accordingly as compared to data in the web

Issue:
To fully summarise the functionality of the app is; the application consists both web and mobile environment. However, the PROPERTY data that has been updated in the web version is not updated continuously within the mobile environment, hence, the PROPERTY data that the user access is always outdated. The PROPERTY data will only be updated when the user starts/restarts the application.
The PROPERTY data that has been initially downloaded when the user startup the app is stored within the apps local file directory [SQlite], and the activity will constantly point to the file directory to retrieve the dataId; which is not the updated PROPERTY data as compared to the PROPERTY data within the web environment.
Therefore, I would like to ask: How will I be able to enable the PROPERTY data to updated accordingly with the updated version in the web.
I was planning to use SyncAdapter method & Refresh button method to allow user to refresh and view the updated version. Any suggestions?
You could use the Push Notifications API to notify users of updated property pages?
Push Notifications in Android Platform

Accessing existing SQLite database using Eclipse

I have created an android app in java using eclipse which creates a SQLite database and lets the user add data to it.
I would like to know how to access an already existing SQLite database (say, in our web server) to view and add data to it ?
I Googled it and didn't get any clear picture. Do I need to install JDBC driver for doing this ?
Thanks.
SQLite is not a client/server database.
That said, the SQLite wiki mentions some alternatives.
If you want to access a remote database from your app, you will need an interface (like a web service) that will take requests from your app and actually do the database manipulation. If you just want to access a local database from your computer, there are several utilities for it to do it graphically or you can use sqlite3 to do it from the command line. If you want to access the database through your browser, I think you need a web service for that too.

is it possible to create a SQLite DB using .Net Framework/Java and Push the DB to iPhone using Web Service?

I have created a app that will have a large set of data in the form of XML files inside documents folder. The data size is so large and its growing data by day so planning to move it to SQLLite DB. Also, i want it to be moved to SQLLite DB for security purposes. I have around 1000 XML files currently, it may grow in future. My primary issue is i want all the data inside XML files to be moved into SQLLite DB using a Backend System(.Net Framework or Java) and can i push this complete Database into the iPhone using a Web Service. So that no XML parsing happens in iPhone. Because i heard XML parsing is resource intensive than reading from SQLLite DB inside iPhone. Whether this is a feasible solution or any better approach is available?
Don't transport the entire set of data each time. Have the iOS client request only the changes since it last synced, and have it update its local database. Processing multiple XML documents should be fine so long as the app can synchronize in the background while the user continues to use it.

Categories