Hi,
I'm an italian android application publisher.
In my free and paid applications, i use database files.
I have database file with extension ".sqlite". I change this extension
in ".db".
I add the table "android_metadata" with the command CREATE TABLE
"android_metadata" ("locale" TEXT DEFAULT 'en_US') and then I add a
single row
in this table with the command INSERT INTO "android_metadata" VALUES
('en_US').
After these changes, I put the database files in my application assets
folder.
At the first use of the application, i copy these database files in
the filesystem device, in the folder "/data/data/myapp/databases/".
This is the java code of the function that i use to copy file from
assets folder to filesystem device:

    private void copyDataBase(String dbpath, String dbname) throws
IOException {
        InputStream myInput = myContext.getAssets().open(dbname);
        String outFileName = dbpath + dbname;
        OutputStream myOutput = new FileOutputStream(outFileName);

        byte[] buffer = new byte[1024];
        int length;
        while ((length = myInput.read(buffer))>0){
                myOutput.write(buffer, 0, length);
        }

        myOutput.flush();
        myOutput.close();
        myInput.close();
    }

I try my application with Acer beTouch E400 (Android 2.1), HTC
Wildfire (Android 2.1) and Samsung GalaxyTab (Android 2.2) and i don't
have problems or errors (I prepare my application with target Android
2.2 and MinSDKVersion=4).
In the last fifteen days, i have received, in the application android
control panel, an error notice and 9 reports for the free application
(900 downloads) and an errore notice and 2 reports for the paid
applications (60 downloads).
The stack trace is the same: "android.database.sqlite.SQLiteException:
no such table: tabella, while compiling: SELECT....";
I think that the database file is in the filesystem device, but it is
damaged. The free application has received also many beautiful
comments and the same user buy many paid applications: so they work
correctly... i don't understand
How can i solve this problem? Are there some errors in my java code?
Can this kind of error depend from Android Market temporary download
problems or Android version or Android system update or kind of
device?
Thanks and sorry for my english...
Bye

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

Reply via email to