Created
February 25, 2019 03:26
-
-
Save amsanjeev/b38967f62088f5406f1f501bb1d93f61 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
public String[] getSplitNames(Context context){ | |
try { | |
PackageManager packageManager = context.getPackageManager(); | |
PackageInfo packageInfo = packageManager.getPackageInfo(context.getPackageName(), 0); | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { | |
return packageInfo.splitNames; | |
} | |
}catch (Exception e ){ | |
e.printStackTrace(); | |
} | |
return new String[0]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment