We have upgraded our continuous test environment from Android 2.x to Android 3.2. In the process we have fixed the following two issues:
db4o used to generate its unique signature for a new database file by asking the device for it's host name. With newly introduced behaviour in Android 3.x, this call would trigger a NetworkOnMainThreadException if executed in the UI thread and database creation would fail. We fixed the issue by creating the database signature on Android from random numbers only.
http://tracker.db4o.com/browse/COR-2269
The built-in serialization architecture has changed with Android 3.x and db4o's method of instantiating objects without constructor invocation by calling ObjectInputStream#newInstance() would no longer work. We have found an alternative, we now use ObjectStreamClass#newInstance() to keep the functionality available.
http://tracker.db4o.com/browse/COR-2271
Android continues to be a very important platform for db4o. Every build runs all tests against an Android 3.2 emulator before it goes live.
Enjoy using db4o on Android!
Popular tags: Android
-
Posted by samjayathilaka on 8/17/2012 2:10 PM
Hi,
I started having this problem of ObjectInputStream newInstance method when we moved up to using Android API 15 devices. I looked at how to use the ObjectStreamClass newInstance method to create objects without constructors. I found that there is a method that takes Class and int parameters as input.
What is this int parameter? Any help on how you managed to use this ObjectStreamClass method would be a godsend.
Thanks in advance.
Loading, please waiting...