Last active
April 23, 2018 13:57
-
-
Save chrislacy/5646240 to your computer and use it in GitHub Desktop.
Icon pack makers wanting to implement 'apply icon pack' functionality for Action Launcher should just include this snippet as appropriate.
This file contains 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
Button actionLauncherButton = (Button) findViewById(R.id.action_launcher_button); | |
actionLauncherButton.setOnClickListener(new View.OnClickListener() { | |
@Override | |
public void onClick(View v) { | |
// Check Action Launcher is installed | |
Intent intent = getPackageManager().getLaunchIntentForPackage("com.actionlauncher.playstore"); | |
if (intent != null) { | |
// TODO BY YOU: set this package name as appropriate. Eg "kov.theme.stark" | |
String yourPackageName = ; | |
intent.putExtra("apply_icon_pack",yourPackageName); | |
startActivity(intent); // Action Launcher will take it from here... | |
} else { | |
// Direct users to get Action Launcher Pro | |
String playStoreUrl = "https://play.google.com/store/apps/details?id=com.actionlauncher.playstore"; | |
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(playStoreUrl))); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment