[android-developers] sqlite on sdcard

2010-12-29 Thread Nikola
Hi,

I would like to store sqlite databse on sdcard.

Is is possible to tell system somehow to put it on sdcard?

Thanks.

-- 
God is Real, unless declared Integer.
J. Allan Toogood, FORTRAN programmer

-- 
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] sqlite on sdcard

2010-12-29 Thread Kostya Vasilyev
You'll have to write your own SQliteOpenHelper-type class for that, as 
the built-in implementation always calls context.getDatabasePath.


If you are not using SQliteOpenHeper, just call 
SQLiteDatabase.openOrCreateDatabase() with a path of your choice.


-- Kostya

29.12.2010 20:10, Nikola пишет:

Hi,

I would like to store sqlite databse on sdcard.

Is is possible to tell system somehow to put it on sdcard?

Thanks.

--
God is Real, unless declared Integer.
J. Allan Toogood, FORTRAN programmer
--
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 



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

--
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] sqlite on sdcard

2010-12-29 Thread Nikola
On Wed, Dec 29, 2010 at 6:17 PM, Kostya Vasilyev kmans...@gmail.com wrote:

 You'll have to write your own SQliteOpenHelper-type class for that, as the
 built-in implementation always calls context.getDatabasePath.

 If you are not using SQliteOpenHeper, just call
 SQLiteDatabase.openOrCreateDatabase() with a path of your choice.

 -- Kostya


Thanks for quick reply.

Are there any doc on that. I still struggling with all of it.





-- 
God is Real, unless declared Integer.
J. Allan Toogood, FORTRAN programmer

-- 
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] sqlite on sdcard

2010-12-29 Thread Kostya Vasilyev

Docs:

http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html

I pasted my code here:

http://pastebin.com/1hKWffeu

It doesn't differentiate between read-only and writable database open 
modes (SqliteOpenHelper does), and probably lacks some error handling 
here and there (this is work in progress).


However, it should be enough to get you on the way.

-- Kostya

29.12.2010 20:23, Nikola ?:



On Wed, Dec 29, 2010 at 6:17 PM, Kostya Vasilyev kmans...@gmail.com 
mailto:kmans...@gmail.com wrote:


You'll have to write your own SQliteOpenHelper-type class for
that, as the built-in implementation always calls
context.getDatabasePath.

If you are not using SQliteOpenHeper, just call
SQLiteDatabase.openOrCreateDatabase() with a path of your choice.

-- Kostya


Thanks for quick reply.

Are there any doc on that. I still struggling with all of it.





--
God is Real, unless declared Integer.
J. Allan Toogood, FORTRAN programmer
--
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 



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

--
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] sqlite on sdcard

2010-12-29 Thread Nikola
On Wed, Dec 29, 2010 at 6:33 PM, Kostya Vasilyev kmans...@gmail.com wrote:

  Docs:


 http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html

 I pasted my code here:

 http://pastebin.com/1hKWffeu

 It doesn't differentiate between read-only and writable database open modes
 (SqliteOpenHelper does), and probably lacks some error handling here and
 there (this is work in progress).

 However, it should be enough to get you on the way.

 -- Kostya


Thank you Kostya.

-- 
God is Real, unless declared Integer.
J. Allan Toogood, FORTRAN programmer

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