greenDAO 3 Beta released

We just released greenDAO 3 beta: it makes the generator project optional and moves to Java annotations. Before the final release however, we want to get your feedback. In particular, we experimented with alternative annotation processing that gives greenDAO more power while it avoids byte code manipulation.Our goal with greenDAO3 is to put the developer in control over entity classes while augmenting the entity code with a little bit of generated code.

Continue reading

greenDAO 2.2 with Database Encryption

Encryption is the central feature of today’s greenDAO 2.2 release. Actually, greenDAO seems to be the first Android ORM to officially support SQLCipher (non-beta). Since it’s first (source-only) release in August 2015, greenDAO’s encryption support has been successfully tested in a complex setup for months. So, if you want to store sensitive data in your database, give it a try!
Continue reading

Avoid NoClassDefFoundError during EventBus registration

There is an obscure scenario causing some older Android versions to throw java.lang.NoClassDefFoundError when trying to register subscribers in EventBus. It was reported often in connection to the class  PersistableBundle, which was introduced in Android API level 21. It seems like an Android bug with reflection, but of course you don’t want your app to crash. Thus, we just added an FAQ entry with covering some background and a couple of solutions. One preferred solution is to update to EventBus 3 along with the subscriber index. Because the index is created during build time, it avoids problematic (and slow) reflection altogether!

EventBus 3 released, now based on @Annotations

EventBus3
Today, we are pleased to release EventBus 3. Previous versions of EventBus rejected to use annotations for performance reasons. Now, version 3 embraces annotations to improve performance. How does that make sense? Unfortunately, Android’s performance did not get any better. Reflection on annotations is still very bad compared to Desktop Java, even on Android 6 and ART. EventBus 3 resolves this problem by introducing a new annotation processor, which will index all annotations at build time. It generates a class containing all the data that would be expensive to get at run time. Build-time indexing makes EventBus 3 the fastest EventBus ever.

Continue reading

Why did Parse fail?

drowing_duck_1600x446
On January, 28th, Facebook announced the retirement of Parse. Parse was one of the leaders in the “mobile backend as a service” (MBaaS) space. It gave app developers a hosted alternative to building a custom backend from scratch for data storage and some logic around that data. Parse was acquired in 2013 by Facebook for $85 million and was powering 500,000 apps in 2014 according to Wikipedia. So what turned the success story into a failure?

Continue reading

Android Architecture with EventBus

Google’s Android Dev Summit 2015 covered a talk on Android Application Architecture. Android Apps often have complex interactions among data models, application logic, UI views and controllers, and networking. A solid architecture is the key to get this right. Watch the two Googlers Yigit Boyar and Adam Powell using EventBus as an important app’s component:

Continue reading

greenrobot-common 2.3 with improved ObjectCache

Version 2.3 of greenrobot-common was just released and brings a new cache implementation: as the class ObjectCache suggests, caches a number of objects in memory. The API is used in a key-value like fashion, very much like a Map. It comes with a couple of cache-specific features though:
Continue reading

Multimaps in greenrobot-common 2.2

We just released greenrobot-common 2.2, a small utility library that we use in almost every project. This version adds multimaps, which are absent from standard Java and Android.  Unlike a regular map, multimaps allow multiple values for a single key.
Continue reading