Skip to content

Instantly share code, notes, and snippets.

@chrislacy
Last active April 23, 2018 13:57
Show Gist options
  • Save chrislacy/5646240 to your computer and use it in GitHub Desktop.
Save chrislacy/5646240 to your computer and use it in GitHub Desktop.

Revisions

  1. chrislacy revised this gist Dec 11, 2013. 1 changed file with 3 additions and 4 deletions.
    7 changes: 3 additions & 4 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,19 +1,18 @@


    Button actionLauncherButton = (Button) findViewById(R.id.action_launcher_button);
    actionLauncherButton.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
    // Check Action Launcher Pro is installed
    Intent intent = getPackageManager().getLaunchIntentForPackage("com.chrislacy.actionlauncher.pro");
    // 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.chrislacy.actionlauncher.pro";
    String playStoreUrl = "https://play.google.com/store/apps/details?id=com.actionlauncher.playstore";
    startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(playStoreUrl)));
    }
    }
  2. chrislacy created this gist May 24, 2013.
    20 changes: 20 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@


    Button actionLauncherButton = (Button) findViewById(R.id.action_launcher_button);
    actionLauncherButton.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
    // Check Action Launcher Pro is installed
    Intent intent = getPackageManager().getLaunchIntentForPackage("com.chrislacy.actionlauncher.pro");
    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.chrislacy.actionlauncher.pro";
    startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(playStoreUrl)));
    }
    }
    });