new gradle version and implemented StateReceiver which repeats in background and is safe regarding to the application lifecycle