Database storage and retrieval
<p>I want to store my database file in drawable folder and then create its back up in SD-Card. While trying to do this i am findind problem in what path to be given for drawable folder. I am doing this:</p>

<p>try {</p>

<pre><code>        File sd = Environment.getExternalStorageDirectory();

        File data = Environment.getDataDirectory();

        if (sd.canWrite()) {
            //db = openOrCreateDatabase("demodatabase.sqlite",SQLiteDatabase.CREATE_IF_NECESSARY,null);
    currentDBPath = "//drawable//demodatabase.sqlite";



   db=openOrCreateDatabase(uri.toString(), 0, null);
        System.out.println("====="+ currentDBPath);
        backupDBPath = "{demodatabase.sqlite}";

        File currentDB = new File(data,  currentDBPath);

        File backupDB = new File(sd, backupDBPath);

        if (currentDB.exists()) {

        FileChannel src = new FileInputStream(currentDB).getChannel();

        FileChannel dst = new FileOutputStream(backupDB).getChannel();

        dst.transferFrom(src, 0, src.size());

        src.close();

        dst.close();

        }

        } }catch (Exception e) {}
</code></pre>

<p>Thanx in advance.</p>
