Posts

Showing posts from June, 2020

Published my First App - Coin Man

Image
I was going through App Development tutorial. During this tutorial, I learned about game app. I have published this app on Android Play Store. https://play.google.com/store/apps/details?id=com.rahuljain81.coinman In 4 days, approved by google and published. Source Code: https://github.com/rahuljain81/Android/tree/master/CoinGame

Android - How to use Timers?

[Android] 2 ways to use timers:- 1. Using Handler final Handler handler = new Handler(); Runnable runnable = new Runnable() {     @Override     public void run() {         Log.i("Timer", "A second has passed");         handler.postDelayed(this, 1000);     } }; handler.post(runnable); 2. Using  CountDownTimer new CountDownTimer(10000, 100) { public void onTick(long ms) { Log.i( "Seconds Left !!!", String.valueOf(ms/1000)); } public void onFinish(){ Log.i( "Seconds Left !!!", "We are done !!"); } }.start(); Ref Code: https://github.com/rahuljain81/Android/blob/master/TImersDemo/app/src/main/java/com/example/timersdemo/MainActivity.java App:  https://github.com/rahuljain81/Android/tree/master/TImersDemo