[android-developers] Re: Using my own SQLite database
the problem is not whether you can write to it, it is WHEN you can write to it. you can do it for testing, but if you want to INSTALL a db that way, then you must first package it with your application, which means the space is used TWICE. the alternative is to download it after installation - into the data/ data/YOUR_PACKAGE/databases dir - which is what i do with one of my apps. if only we could access a db that is inside the apk. On Mar 3, 9:30 pm, gymshoe gyms...@bresnan.net wrote: While you can read other databases, if you want to update it, you may have problems because the directory: /data/data/YOUR_PACKAGE/ databases/ does not give permission to write. (It has permissions of drwxrwx-- x). Jim On Mar 3, 12:12 am, fluxa jmfl...@gmail.com wrote: Check out this post herehttp://www.reigndesign.com/blog/using-your-own-sqlite-database-in-and... hope be helpful for you. On Feb 14, 3:51 am, Moons moone...@gmail.com wrote: Hello Android Developers, I'm new to Android, I just finished the Notepad Tutorials, where we can createSQLiteDatabases to save notes. So I wanted to know if it was possible to import my ownSQLite database (not created with my App but with a 3rd-party software) to my project, and if the answer is yes, where should I save mySQLite databse and how can I have access to it. Thank you for your help.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Using my own SQLite database
Check out this post here http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/ hope be helpful for you. On Feb 14, 3:51 am, Moons moone...@gmail.com wrote: Hello Android Developers, I'm new to Android, I just finished the Notepad Tutorials, where we can createSQLiteDatabases to save notes. So I wanted to know if it was possible to import my ownSQLite database (not created with my App but with a 3rd-party software) to my project, and if the answer is yes, where should I save mySQLite databse and how can I have access to it. Thank you for your help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Using my own SQLite database
While you can read other databases, if you want to update it, you may have problems because the directory: /data/data/YOUR_PACKAGE/ databases/ does not give permission to write. (It has permissions of drwxrwx-- x). Jim On Mar 3, 12:12 am, fluxa jmfl...@gmail.com wrote: Check out this post herehttp://www.reigndesign.com/blog/using-your-own-sqlite-database-in-and... hope be helpful for you. On Feb 14, 3:51 am, Moons moone...@gmail.com wrote: Hello Android Developers, I'm new to Android, I just finished the Notepad Tutorials, where we can createSQLiteDatabases to save notes. So I wanted to know if it was possible to import my ownSQLite database (not created with my App but with a 3rd-party software) to my project, and if the answer is yes, where should I save mySQLite databse and how can I have access to it. Thank you for your help.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Using my own SQLite database
hi,gus. let me tell you the db path. /data/data/YOUR_PACKAGE/databases/ just copy your db file to that directory. i successly copy note_pad.db to that dir, and successly read the data in note_pad.db using SQLiteDatabase API. but ,when i copy another db file which is larger (about 16Mb), i encounter IOException. I try many times. always IOException. Maybe the file is too large. is there a limit size in YOUR_PACKAGE directory? On 2月21日, 上午4时27分, burton miller burton.mil...@gmail.com wrote: yeah - same problem here. i determined that (2 months ago) it was impossible. here are your options: 1) copy the db from your apk (as a raw resource) to the file system at run time, and access it there - which doubles the size of your db footprint. 2) download your db upon installation my db is 5MB, so i had to go with option 2, which results in a ~1 minute installation when you first run the app. this is a shitty solution, but right now that seems to be it. if your db is small, use option 1. On Feb 18, 3:56 pm, mcssys mcs...@gmail.com wrote: I have the same need. Any help would be greatly appreciated. And... 1. When an application is installed on a device, is the same directory structure that is used on the Emulator duplicated on the device. When I try to view the device directory structure, I get a opendir failed, permission denied so I cannot verify if it is the same structure. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Using my own SQLite database
i know the reason. there is max size 1048576bytes 02-23 11:11:55.037: DEBUG/asset(16273): Data exceeds UNCOMPRESS_DATA_MAX (37623808 vs 1048576) it's too small. On 2月23日, 上午11时00分, 冰咖啡不加糖 xinyu...@gmail.com wrote: hi,gus. let me tell you the db path. /data/data/YOUR_PACKAGE/databases/ just copy your db file to that directory. i successly copy note_pad.db to that dir, and successly read the data in note_pad.db using SQLiteDatabase API. but ,when i copy another db file which is larger (about 16Mb), i encounter IOException. I try many times. always IOException. Maybe the file is too large. is there a limit size in YOUR_PACKAGE directory? On 2月21日, 上午4时27分, burton miller burton.mil...@gmail.com wrote: yeah - same problem here. i determined that (2 months ago) it was impossible. here are your options: 1) copy the db from your apk (as a raw resource) to the file system at run time, and access it there - which doubles the size of your db footprint. 2) download your db upon installation my db is 5MB, so i had to go with option 2, which results in a ~1 minute installation when you first run the app. this is a shitty solution, but right now that seems to be it. if your db is small, use option 1. On Feb 18, 3:56 pm, mcssys mcs...@gmail.com wrote: I have the same need. Any help would be greatly appreciated. And... 1. When an application is installed on a device, is the same directory structure that is used on the Emulator duplicated on the device. When I try to view the device directory structure, I get a opendir failed, permission denied so I cannot verify if it is the same structure. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Using my own SQLite database
yeah - same problem here. i determined that (2 months ago) it was impossible. here are your options: 1) copy the db from your apk (as a raw resource) to the file system at run time, and access it there - which doubles the size of your db footprint. 2) download your db upon installation my db is 5MB, so i had to go with option 2, which results in a ~1 minute installation when you first run the app. this is a shitty solution, but right now that seems to be it. if your db is small, use option 1. On Feb 18, 3:56 pm, mcssys mcs...@gmail.com wrote: I have the same need. Any help would be greatly appreciated. And... 1. When an application is installed on a device, is the same directory structure that is used on the Emulator duplicated on the device. When I try to view the device directory structure, I get a opendir failed, permission denied so I cannot verify if it is the same structure. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Using my own SQLite database
I have the same need. Any help would be greatly appreciated. And... 1. When an application is installed on a device, is the same directory structure that is used on the Emulator duplicated on the device. When I try to view the device directory structure, I get a opendir failed, permission denied so I cannot verify if it is the same structure. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---