-3

I want to do the following,

I want to create a sqlite database in my java swing application and to load it with all data that I will need. After that I want to push this database to my Android App.

Is it possible with no so much trouble?

I mean, can I simply to create this database and after that only push it to my Android App and open it calling its name. For example "MySQLite.bd".

Thanks a lot.

Levi
  • 1

3 Answers3

1

Yes, You can do it easily. Once you are ready with your SQLite database, you can load that pre-filled database in your android app.

Check following link for detailed steps for this :

http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/

Umang9
  • 117
  • 1
  • 9
  • I decided to follow the approach above, my only question is, is it really necessary create in all my sqlite tables the "_id" field? – Levi Mar 11 '13 at 18:54
  • @Levi, actually you can omit that part. You simply need to create sqlite database and just follow the steps : - check database (if its exists or not?) - if db not exists then create is -> using Copying database (like file copy of java) - after creating it open it and you will get the db object. – Umang9 Mar 12 '13 at 06:30
0

Yes it is possible, just make sure your Android's SQLite engine version is compatible with the SQLite DB you're using in your Swing application.

Community
  • 1
  • 1
m0skit0
  • 25,268
  • 11
  • 79
  • 127
0

If you can create such a db yes!

See Using your own SQLite database in Android applications on how to code in android in order to use the DB.

Edit: one more link mentioning also the problem with large external DBs.

madlymad
  • 6,367
  • 6
  • 37
  • 68