Friday, October 19, 2018

ROOM ORM on Sqlite database



Room persistence library is an object-relational mapping used on top of SQLite database.  Which is mainly introduced to save the app developer time on database. In olden day's every developer used to write 1000+ lines of code to create a database with multiple tables in it.

Google I/O 2017 has come up with ORM methodology in Android for SQLite, It saves the developer time by just using the Model(Pojo) classes a table's and DAO interface for CRUD operations.

ROOM is the part of android Jetpack, which is Android Software components can be used to build great Android Apps


Wednesday, October 17, 2018

What's new in Kotlin 1.3 and Kotlin/Native multiplatform

On watching online streaming KotlinConf 2018 Keynote, which I was expected to see only updates in terms of mobile apps, I become excited when I see they bring the multiplatform Kotlin/Native-1.3(Beta), which is really going to bring quite challenges to the mobile developers, Here some things which I am going explain in brief.

What're the Kotlin updates?
  1. 1.5+ million users as of October within 2years(Open source)
  2. Autoscaling backend for your mobile apps
  3. Write Kotline using your favorite JAVA framework and libraries 
  4. Use fully-managed MySQL/PostgreSQL or Firebase for your application database
  5. Use IntelliJ with Google Cloud Tools Plugins to add Google Cloud API libraries and deploy to App Engine 
Some of the top companies using the Kotlin
  1. Allegro Tech
  2. N 26
  3. American Express
  4. OLX Group
What changes in Mobile apps?
  1. Reduced the build time from 50sec to 36sec
  2. Multiplatform projects: iOS and Android









Saturday, October 13, 2018

Job Scheduler in Android API 21(5.0 Lolipop)

Currently, Android System has two main means to schedule tasks :

  1. AlarmManager
  2. JobScheduler API

The latest apps should use the JobScheduler API. When the system is optimizing based on memory, power, connectivity conditions, APPs can still schedule jobs.
JobScheduler always runs in main UI thread: This means we should use run JobScheduler on Thread or AsyncTask

Advantages :

  1. JobScheduler API helps the batch jobs when devices has more resources
  2. JobScheduler API can be used to schedule everything that is not time critical for the user.
  3. The Android System can combine jobs so that battery consumptions can be reduced.
  4. It helps them during the application restart
  5. JobManager makes handling uploads easier as it handles automatically unreliability of the network.


When to use JobScheduler :
  1. Tasks that require WIFI or Data Connection
  2. Tasks that are not critical or not facing
  3. Tasks that should be running on a regular basis as batch where the time is not critical.
How to use JobScheduler