Android Question Default launcher chooser

jazzzzzzz

Active Member
Licensed User
Longtime User

Actually I dont know how to convert the code in that stackoverflow link.

any way I figure an easy fix by the code below and it works flawlessly.
B4X:
public void choose() {
     import android.content.Intent;
    String HOME_CHOOSER_PACKAGE_NAME = "android";
    String HOME_CHOOSER_CLASS_NAME = "com.android.internal.app.ResolverActivity";
   
    Intent i = new Intent(Intent.ACTION_MAIN);
    i.addCategory(Intent.CATEGORY_HOME);
    i.setClassName(HOME_CHOOSER_PACKAGE_NAME, HOME_CHOOSER_CLASS_NAME);
    startActivity(i);
}
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…