hello all,

Just to let you know, I included this code in my version of my games
'Word Prospector' and 'Chasseur de mots', and I don't have any more
bug report with this issue !

Emmanuel
http://androidblogger.blogspot.com/
http://www.alocaly.com/



On Apr 28, 2:01 am, Emmanuel <[email protected]> wrote:
> Hello all,
>
> I had the same issue recently, and after the reading of this thread, I
> try this thing :
>
> public class SQLHelper extends SQLiteOpenHelper
>         {
>                 private File m_DBFile;
>                 public SQLHelper(Context context, String name) {
>                         super(context, name, null, 1);
>                         m_DBFile  = context.getDatabasePath( name );
>                 }
>
>                 public void onCreate(SQLiteDatabase db)
>                 {
>
>                         // My stuff here :
>                         CreateTableWithDefaultValues(db);
>                 }
>
>                 @Override
>                 public void onUpgrade(SQLiteDatabase db, int oldVersion, int
> newVersion)
>                 {
>                         return;
>                 }
>                 public synchronized SQLiteDatabase getWritableDatabase ()
>                 {
>                         SQLiteDatabase db;
>                         if ( m_DBFile.exists() )
>                                 db = SQLiteDatabase.openDatabase( 
> m_DBFile.toString(), null,
> SQLiteDatabase.NO_LOCALIZED_COLLATORS );
>                         else
>                                 db = super.getWritableDatabase();
>                         return db;
>                 }
>         }
>
> Actually, it runs OK on the emulator, so I hope it doesn't bring any
> more issues, ... And that it solves the first crash !
>
> Does it seem reasonable ?
>
> Emmanuel /Alocalyhttp://androidblogger.blogspot.com/http://www.alocaly.com/
>
> On Apr 14, 7:24 pm, Mariano Kamp <[email protected]> wrote:
>
>
>
>
>
> > I had a look into it and this approach doesn't work for me.
>
> > When using the SQLiteOpenHelper you cannot pass in this flag.
>
> > I tried to work around the SQLiteOpenHelper first, but then it delegates to
> > the context, which itself uses private API and now have to copy/patch at
> > least four classes. I also found a reference to private API (FileUtils) that
> > uses some obscure modes that I don't want to touch as I don't really
> > understand them.
> > I fear to take a problem that a couple of hundred users of my app have to a
> > problem that will affect every user ;)
>
> > But thanks for your hint anyway.
>
> > On Mon, Apr 12, 2010 at 10:39 PM, Mariano Kamp 
> > <[email protected]>wrote:
>
> > > Skink,
>
> > > awesome. That sounds fantastic. I will try that.
>
> > > Cheers,
> > > Mariano
>
> > > On Mon, Apr 12, 2010 at 7:45 PM, skink <[email protected]> wrote:
>
> > >> On Apr 9, 2:36 pm, Mariano Kamp <[email protected]> wrote:
> > >> > *bump*
>
> > >> > On Fri, Apr 2, 2010 at 12:53 PM, Mariano Kamp <[email protected]
> > >> >wrote:
>
> > >> > > Hi,
>
> > >> > > recently I very often get error reports from users that upgrade their
> > >> OS.
> > >> > > This includes at least 1.5, 1.6, 2.1 and custom ROMs.
>
> > >> > > Anybody else seeing these? Any idea what to do about it?
>
> > >> > > Cheers,
> > >> > > Mariano
>
> > >> i had similar problem too, i solved it by adding flag
> > >> SQLiteDatabase.NO_LOCALIZED_COLLATORS when calling
> > >> SQLiteDatabase.openDatabase
>
> > >> hth
> > >> pskink
>
> > >> --
> > >> You received this message because you are subscribed to the Google
> > >> Groups "Android Developers" group.
> > >> To post to this group, send email to [email protected]
> > >> To unsubscribe from this group, send email to
> > >> [email protected]<android-developers%2Bunsubs
> > >>  [email protected]>
> > >> For more options, visit this group at
> > >>http://groups.google.com/group/android-developers?hl=en
>
> > >> To unsubscribe, reply using "remove me" as the subject.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to