Created
January 23, 2019 18:52
-
-
Save shishirthedev/cef31f25c19641b0b76e345081352a3b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private String getLauncherActivity(){ | |
| String activityName = ""; | |
| final PackageManager pm = getPackageManager(); | |
| Intent intent = pm.getLaunchIntentForPackage(getPackageName()); | |
| List<ResolveInfo> activityList = pm.queryIntentActivities(intent,0); | |
| if(activityList != null){ | |
| activityName = activityList.get(0).activityInfo.name; | |
| } | |
| return activityName; | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment