Skip to content

Instantly share code, notes, and snippets.

@sideffect0
Last active February 15, 2018 13:17
Show Gist options
  • Select an option

  • Save sideffect0/97be006a8dd74fce45a93719686e6bfc to your computer and use it in GitHub Desktop.

Select an option

Save sideffect0/97be006a8dd74fce45a93719686e6bfc to your computer and use it in GitHub Desktop.

Revisions

  1. sideffect0 revised this gist Feb 15, 2018. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions AppUtils.java
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,6 @@

    package com.pytenlabs.mailcastr.utils;

    public class AppUtils{

    public static changeIconToPro(Context mContext){
  2. sideffect0 created this gist Feb 15, 2018.
    21 changes: 21 additions & 0 deletions AppUtils.java
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    public class AppUtils{

    public static changeIconToPro(Context mContext){
    getPackageManager().setComponentEnabledSetting(

    new ComponentName("com.pytenlabs.mailcastr", "com.pytenlabs.mailcastr.MainActivityPro"),

    PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP);


    try {
    getPackageManager().setComponentEnabledSetting(
    new ComponentName("com.pytenlabs.mailcastr", "com.pytenlabs.mailcastr.MainActivity"),
    PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
    } catch (Exception e) {
    //oh oh
    }


    }
    }