GreeDao is one of the fastest and most efficient ORM libraries to access the SQLite database in Android. But as of now (Aug 2019), it doesn’t support saving a simple list of data in the dao object table.
A very simple use case that I had was to save a list of string in my Dao object table class. One possible way to save that list is to have a one-to-many relationship between two tables but building such a relationship just to save a list of String (or some other object) is too much of a work.
Fortunately, a much easier way to do that is to convert the unsupported data into something that GreenDao supports already. In my case, it was to convert List<String> into String while saving and vice-versa at the time of retrieving it back. …
A Gradle plugin could help your SDK users in integration.
It happened to be that when we @ M800 were developing our new SDK, we needed some configuration file to be added to project root by the app developer. This config file will then be processed by our SDK, so we can initialize it properly. Something like what Google does with
google-services.json via a plugin:
apply plugin: 'com.android.application'
In this article, I’m going to explain about building a very simple plugin which will read a
jsonfile and build some Android
stringresources from it.
Truth be told, none of us here had any experience building a Gradle plugin before, so I was entrusted with the research and development task. I was driven by the excitement of building and learning something new. …
The primary role of a service is as a flag to the operating system, letting it know that your process is still doing work, despite the fact that it is in the background.
You can clone this project from this Github repository.
As I was working on my app update (Earthquake App), I realized that the native JSON package available in android sdk is just not good enough in terms of performance and memory consumption. So, I started looking for some other option and very soon I found myself in a hard place deciding between GSON and Jackson (most popular JSON parsing libraries in java).
As my use of JSON parsing is very performance centric, I kept on searching until I stumbled upon LoganSquare (a relatively new library) which claims to be the fastest JSON parsing and serializing library available for Android outperforming GSON and Jackson’s Databind library by 400% or more. …