Re: [android-developers] Re: database connectivity on real device

2011-12-04 Thread Narendra Singh Rathore
Now that you achieved that, do the following test:  Take out the SD card
> and run your app.
>
>
I will definitely give that test later, and hopefully will achieve that.
anyways thanx for the challenging test. :)

-- 
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

Re: [android-developers] Re: database connectivity on real device

2011-12-04 Thread lbendlin
Now that you achieved that, do the following test:  Take out the SD card 
and run your app.

-- 
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

Re: [android-developers] Re: database connectivity on real device

2011-12-03 Thread Narendra Singh Rathore
Yo, I achieved my goal by following steps..

1) Storing the database in assets folder.

2) Then from there, writing it to sdcard *programatically.*
**
3) Accessing it from SDCard.

Thnx all for directing me.

-- 
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

Re: [android-developers] Re: database connectivity on real device

2011-12-01 Thread Nikolay Elenkov
On Fri, Dec 2, 2011 at 3:05 PM, Narendra Singh Rathore
 wrote:
>
>
>> Create you database in code, when app is first run. Load data from
>> assets. If there is a lot of data load it from internet.
>>
>> Regards
>>
>
> So, isn't it possible to use already made database from assets.
> There should be some way to do this.
>

Yes, it is. Create an empty database in the app's private folder, get
it's filename
and overwrite it with the database stored in assets. If the database
file is big
(more than 1MB), you'll have to split it or store it as a raw asset.

-- 
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


Re: [android-developers] Re: database connectivity on real device

2011-12-01 Thread Ajmer Singh
Hi

Your database file need to be less then 1 MB(as assets folder support file
less then 1 MB), You can split your database using hjsplit and then in
runtime combined the split files and put it in your package folder.

On Fri, Dec 2, 2011 at 11:35 AM, Narendra Singh Rathore <
nsr.curi...@gmail.com> wrote:

>
>
> Create you database in code, when app is first run. Load data from
>> assets. If there is a lot of data load it from internet.
>>
>> Regards
>>
>>
> So, isn't it possible to use already made database from assets.
> There should be some way to do this.
>
> --
> 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
>



-- 
Thanks and Regards
Ajmer Singh

-- 
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

Re: [android-developers] Re: database connectivity on real device

2011-12-01 Thread Narendra Singh Rathore
Create you database in code, when app is first run. Load data from
> assets. If there is a lot of data load it from internet.
>
> Regards
>
>
So, isn't it possible to use already made database from assets.
There should be some way to do this.

-- 
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: database connectivity on real device

2011-12-01 Thread gjs
Hi,

Create you database in code, when app is first run. Load data from
assets. If there is a lot of data load it from internet.

Regards

On Dec 2, 2:07 pm, Narendra Singh Rathore 
wrote:
> Hi again, my problem solved by storing my database in sdcard, but even now
> I have to push my database for the first time I m using it.
>
> Now, I want something likestoring my database in assets folder, so that
> it can directly be installed with the apk directly, without using push.
>
> Here is what I did.
> 1) Copied the database in assets folder.
>
> Now, for accessing that database, I m doing---
>
> 2) 
> db=*SQLiteDatabase.openDatabase*("file:android_assets/MY_DATABASE //android_assets/MY_DATABASE>",
> null, SQLiteDatabase.CREATE_IF_NECESSARY);
>
> Am I doing something wrong here, let me know if I m wrong.
>
> I hope, u all got my problem..
>
> Narendra :(

-- 
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