Photo by Bill Jelen on Unsplash

Nowadays, Every android app is using a splash screen in one way or another way. From Popular android apps like Whatsapp, Facebook to small apps.

Today I am going to write code for launching splash in different ways from the old Handler way to new coroutines.

Using Threads:

new Thread(new Runnable() {
public void run() {
try {
Thread.sleep(1700);
} catch (InterruptedException e) {
e.printStackTrace();
}
launchDashboard();
}
}).start();

Using Handler:

new Handler().postDelayed(new Runnable(){
@Override
public void run() {
launchDashboard
}
}, 1700);

Using Timer:

new Timer().schedule(new TimerTask() {          
@Override
public void run() {
launchDashboard();
}
}, 1700);

Using CounDownTimer:


Photo by v2osk on Unsplash

Since google realeased architecture componets, android developers adopting very quickly. and room is one this in architectural components.

first lets see how to delete all databases in sqlite without using room. for this you have to use below code. its works in all conditions.

context.deleteDatabase(DATABASE_NAME)

alternativly you can use this.

val cursor = appDatabase.openHelper.readableDatabase.query("SELECT name FROM sqlite_master WHERE type = \'table\'")
val sqlDatabase = appDatabase.openHelper.writableDatabase
if (cursor.moveToFirst()) {
while (!cursor.isAfterLast) {
val tableName = cursor.getString(0)
val result = sqlDatabase.delete(tableName, null, null)
cursor.moveToNext()
}
}

if you use this code with room, all tables will be deleted, but if you try…


Things I learnt while developing shareit clone of Android app

First I started this app https://play.google.com/store/apps/details?id=com.sharein.filetransfer with the goal of developing indian version of share it app.

  1. Socket programming in Android.
  2. Connect and disconnect wifi in different versions of android ( it’s really painful to connect wifi in Android 10 )
  3. Turning on/off hotspot in Android. As some versions of android devices doesn’t support turning on wifi hotspot programmatically and from Android 9 it requires location permission and gps has to on and it gives random wifi said, password everytime.
  4. Sending and receiving java objects, text and files using inputstream and outputstream.
  5. Usage of handler, as to update the file progress from service we can’t call activity or fragment methods directly ( alternatively we can use local broadcast managers ).

You can try this app from this link.

https://play.google.com/store/apps/details?id=com.sharein.filetransfer


“Designed by katemangostar / Freepik”

Recently I came across this app Work Log — Office Hours Tracking — Apps on Google Play for self employee attendance tracking system.

This app has the following features:

  1. self check-in
  2. self check-out
  3. mark as leave
  4. mark as holiday
  5. take a break in between the office hours


New Android call recorder app for Android 2018.

Hii, this is bhanupro, I am Android application developer. I have been developing Android apps from last one year. I have developed and gave a life to several Android applications. I am working in one of the best city i.e. Bengalguru in India.

I was started learning and developing Android apps last year.

Recently one of my colleague asked

“ what is the best call recorder for Android?”

I replied with “ wait for one day I will give you best Android call recorder for you”

So after one day I shared…

Bhanu Pro

Android developer @Airtel

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store