I am developing a buissness-application that is essentially a Home-screen, and is supposed to be used as a Default Homescreen (being a "kiosk"-application).
Is there any way of checking if my Launcher is the default Launcher? Thanks!
Ps. Similar example, but for checking GPS-settings
LocationManager alm = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);
if (alm.isProviderEnabled(android.location.LocationManager.GPS_PROVIDER)) {
Stuffs&Actions;
}
Found my answer here:
Which launcher is running?
It tells me if my activity is the default launcher or not..
Kotlin version:
You can get list of preferred activities from
PackageManager
. UsegetPreferredActivities()
method.