com.eloview.homesdk.packageManager

## Class Package

- java.lang.Object
- - com.eloview.homesdk.consts.Consts
  - - com.eloview.homesdk.accountManager.AccountManager
    - - com.eloview.homesdk.packageManager.Package

- All Implemented Interfaces:
    java.lang.Cloneable

      public class Package
      extends AccountManager

  Package class provides the below operations.
  - Install an apk file silently without any user interaction using `silentPackageInstall`.
  - Uninstall a package silently without any user interaction using `silentPackageUninstall`.
  - Enable a package silently using `enablePackage`.
  - Disable a package silently using `disablePackage`.
  - ForceStop a given package using `stopPackage`.
  - Whitelist the given package permissions using `setWhitelistAppPermission`. So it will allow runtime permission for the whitelisted package at installation.
  - Clear the whitelist packages using `clearWhitelistAppPermission`.
  - Clear all whitelisted packages so system doesn't allow runtime permissions on installation time `clearAllWhitelistAppPermission`
  - Enable/Disable Whitelisting rules for packages (using which we can give a list of packages to be enabled/disabled) using `enableWhitelistPackages` (new rule will be created or added to existing rule) and `disableWhitelistPackages` (all packages will be enabled)
  - Check if a package is enabled or disabled using `getPackageStatus`
  - Automatically start an app and pin it on every reboot in Android home mode using `setAppAutostartPinned`, remove this setting using `removeAppAutoStartPinned` and get status of the pinned app using `getAppAutoStartPinnedStatus`
  - APIs to unregister the broadcast receivers used by the package APIs such as `unregisterPackageInstallAPIListener`, `unregisterPackageStatusChangeListener`, `unregisterPackageUninstallAPIListener`, `unregisterWhitelistAPIListener`, `unregisterWhitelistAppPermissionListener`

  Application Install Example:
  1. Precondition: push the application package (apk file) to the sdcard partition on the device "adb push /sdcard/example.apk"
  2. Get an auth token using `getEloAccessToken`
  3. Install the application using `silentPackageInstall`. This process may take up to a minute. When complete, an install listener will register and will receive an update regarding the installation.
  4. The installation listener will be automatically unregistered upon success

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `APP_AUTO_START_PINNING_CODE` Response code for setting app pinning and app auto start on boot
    `static int` | `INSTALL_LISTENER_REGISTERED` Install listener has been registered and will be called when an app installation is complete
    `static int` | `INSTALL_LISTENER_UNREGISTERED` Install listener was unregistered, no callback will be issued when an install completes
    `static int` | `INSTALLER_RESULT_CODE` Used to send a response when a package installation is attempted.
    `static Package` | `instance`
    `static int` | `LISTENER_REGISTRATION_ERROR` There was an error while trying to register the listener
    `static int` | `PACKAGE_STATUS_CHANGE_CODE` Used to notify whether the package status changed successfully or not
    `static int` | `PACKAGE_STATUS_CHANGE_LISTENER_CODE` Used to notify whether the listener has been registered or not
    `static int` | `PACKAGE_STATUS_RESULT_CODE` Used to send the status of a given package (enabled or disabled)
    `static int` | `SET_PACKAGE_NAME_PERMISSION_RESULT_CODE` Used to notify whether the package app permission status changed successfully or not
    `static int` | `SET_WHITELIST_APP_PERMISSION_RESULT_CODE` Used to notify whether the package app permission status changed successfully or not
    `static int` | `SET_WHITELIST_RULE_RESULT_CODE` Used to notify whether package whitelist rule status change was successful or not
    `static int` | `STOP_PROCESS_CODE` Used to send a response when the package has been stopped
    `static int` | `UNINSTALL_LISTENER_REGISTERED` Uninstall listener has been registered and will be called when a package is uninstalled
    `static int` | `UNINSTALL_LISTENER_UNREGISTERED` Uninstall listener was unregistered, no callback will be issued when a package is uninstalled

    - ### Fields inherited from class com.eloview.homesdk.accountManager.AccountManager

      `ACCESS_TOKEN_INVALID, ACCESS_TOKEN_VALID, API_ACCESS_TOKEN_INVALID, API_ACCESS_TOKEN_VALID, IS_USER_LOGIN_OAUTH, isPolaris, KEY_SERVER_ELO_POLARIS_DEV, KEY_SERVER_PRODUCTION_POLARIS, KEY_SERVER_QA_POLARIS, KEY_SERVER_STAGING_POLARIS, OAUTH_TOKEN_INVALID, OAUTH_TOKEN_VALID, REQUEST_AUTH_LOGIN, REQUEST_AUTH_LOGOUT, SETUP_OAUTH_ERROR, SETUP_OAUTH_SUCCESS, TOKEN_VERIFY_FAIL, TOKEN_VERIFY_SUCCESS`

    - ### Fields inherited from class com.eloview.homesdk.consts.Consts

      `ACTION_SET_EST_REQUEST, ELO_FOLDER, ELO_NETWORK_CONF_CSV_FILE, ELO_WIFI_CONFIG_FOLDER, GENERIC_ERROR, isFROM, OAUTH_PATH_TOKEN, OAUTH_PATH_VERIFY, REQUEST_TOKEN, STR_CUSTOM_ANIM_IMAGE_FILE, STR_CUSTOM_ANIM_VIDEO_FILE, STR_CUSTOM_BRAND_LOGO_FILE, STR_CUSTOM_BRAND_NAME_FILE, STR_CUSTOM_BRAND_POWERED_BY_LOGO_FILE, STR_CUSTOM_LOCALE_NAME_FILE, STR_CUSTOM_WALLPAPER, STR_ELO_PATH_FOR_CUSTOM_ANIMATION, STR_SDCARD_ELO_DIR_PATH, VERIFY_TOKEN`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Package()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clearAllWhitelistAppPermission(android.content.Context context, java.lang.String accessToken, boolean clearAllPackage, android.os.Handler handler)` This method used to clear all whitelisted packages so system don't allow runtime permissions on installation time.
    `void` | `clearWhitelistAppPermission(android.content.Context context, java.lang.String accessToken, java.lang.String packageName, android.os.Handler handler)` This method used to clear whitelisted packages so system don't allow runtime permissions on installation time.
    `void` | `disablePackage(android.content.Context context, java.lang.String accessToken, java.lang.String packageName, android.os.Handler handler)` This method is used to disable a given package.
    `void` | `disableWhitelistPackages(android.content.Context context, java.lang.String accessToken, android.os.Handler handler)` This method is used to disable whitelisting rules for packages.
    `void` | `enableDisableSettingsPackage(java.lang.String accessToken, android.content.Context context, java.lang.String packageState, android.os.Handler handler)` This method is used to enable/disable a settings package(com.android.settings).
    `void` | `enablePackage(android.content.Context context, java.lang.String accessToken, java.lang.String packageName, android.os.Handler handler)` This method is used to enable the given package if it is currently installed and is disabled.
    `void` | `enableWhitelistPackages(android.content.Context context, java.lang.String accessToken, java.lang.String json, android.os.Handler handler)` This method is used to set rules for enabling/disabling packages.
    `void` | `getAppAutoStartPinnedStatus(android.content.Context context, java.lang.String accessToken, android.os.Handler handler)` API used to get information if the feature to auto start a task and lock it is currently enabled or not.
    `void` | `getPackageStatus(android.content.Context context, java.lang.String accessToken, java.lang.String packageName, android.os.Handler handler)` This method is used to check if a given package is enabled or disabled.
    `void` | `removeAppAutostartPinned(android.content.Context context, java.lang.String accessToken, java.lang.String password, boolean tempUnlock, android.os.Handler handler)` API used to remove starting a task on boot and locking it.
    `void` | `setAppAutostartPinned(android.content.Context context, java.lang.String accessToken, java.lang.String newPassword, java.lang.String oldPassword, java.lang.String packageName, android.os.Handler handler)` API used to start a task on boot and lock it.
    `void` | `SetPackageNameandPermission(android.content.Context context, java.lang.String accessToken, java.lang.String packageName, java.lang.String packagePermission, android.os.Handler handler)` This method is used to set Package name and Permission
    `void` | `setWhitelistAppPermission(android.content.Context context, java.lang.String accessToken, java.lang.String packageName, android.os.Handler handler)` This method used to whitelist the given package. On package installation system will automatically allow runtime permissions for the whitelisted packages. So application doesn't popup runtime permission dialog.
    `void` | `silentPackageInstall(android.content.Context context, java.lang.String accessToken, java.lang.String uri, android.os.Handler handler)` This method is used to install an APK silently in background
    `void` | `silentPackageUninstall(android.content.Context context, java.lang.String accessToken, java.lang.String packageName, android.os.Handler handler)` This method is used to uninstall package silently in background
    `void` | `stopPackage(android.content.Context context, java.lang.String accessToken, java.lang.String packageName, android.os.Handler handler)` This method is used to stop a running package.
    `void` | `unregisterPackageInstallAPIListener(android.content.Context context)` This method is used to unregister the broadcast receiver registered when the `silentPackageInstall(Context, String, String, Handler)` (Context, String, Handler)} API. is used in your application.
    `void` | `unregisterPackageStatusChangeListener(android.content.Context context)` This method is used to unregister the broadcast receiver registered when using the `enablePackage(Context, String, String, Handler)` and. `disablePackage(Context, String, String, Handler)` APIs in your application.
    `void` | `unregisterPackageUninstallAPIListener(android.content.Context context)` This method is used to unregister the broadcast receiver registered when the `silentPackageUninstall(Context, String, String, Handler)` API. is used in your application.
    `void` | `unregisterWhitelistAPIListener(android.content.Context context)` This method is used to unregister the broadcast receiver registered when the `enableWhitelistPackages(Context, String, String, Handler)` or `disableWhitelistPackages(Context, String, Handler)` APIs are used in your application is used in your App Please make sure to call this in the "onPause" and "onDestroy" methods in your activity Lifecycle if you made use of the two APIs.
    `void` | `unregisterWhitelistAppPermissionListener(android.content.Context context)` This method is used to unregister the broadcast receiver registered when using the `setWhitelistAppPermission(Context, String, String, Handler)` API. Please make sure to call this in the "onPause" and "onDestroy" methods in your activity Lifecycle if you made use of `setWhitelistAppPermission(Context, String, String, Handler)` API.

    - ### Methods inherited from class com.eloview.homesdk.accountManager.AccountManager

      `configureOAuthHostedUI, destroyOAuth, getBaseUri, getClientId, getEloAccessToken, getEloOAuthToken, getEnvironment, getProperty, isPolaris, isPolarisLocked, logoutOAuth, onOAuthActivityResult, selectEnvironment, setDefaultEnvironment, setProperty, stopOAuth, unregisterAccountManagerListener, verifyEloToken`

    - ### Methods inherited from class com.eloview.homesdk.consts.Consts

      `clone, getEloIntentWithFlag, getMigrate, isDevice7Inch, isDeviceM100`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### INSTALL_LISTENER_REGISTERED

          public static final int INSTALL_LISTENER_REGISTERED

      Install listener has been registered and will be called when an app installation is complete
      See Also:
        Constant Field Values

    - #### UNINSTALL_LISTENER_REGISTERED

          public static final int UNINSTALL_LISTENER_REGISTERED

      Uninstall listener has been registered and will be called when a package is uninstalled
      See Also:
        Constant Field Values

    - #### INSTALL_LISTENER_UNREGISTERED

          public static final int INSTALL_LISTENER_UNREGISTERED

      Install listener was unregistered, no callback will be issued when an install completes
      See Also:
        Constant Field Values

    - #### UNINSTALL_LISTENER_UNREGISTERED

          public static final int UNINSTALL_LISTENER_UNREGISTERED

      Uninstall listener was unregistered, no callback will be issued when a package is uninstalled
      See Also:
        Constant Field Values

    - #### LISTENER_REGISTRATION_ERROR

          public static final int LISTENER_REGISTRATION_ERROR

      There was an error while trying to register the listener
      See Also:
        Constant Field Values

    - #### INSTALLER_RESULT_CODE

          public static final int INSTALLER_RESULT_CODE

      Used to send a response when a package installation is attempted.
      See Also:
        Constant Field Values

    - #### STOP_PROCESS_CODE

          public static final int STOP_PROCESS_CODE

      Used to send a response when the package has been stopped
      See Also:
        Constant Field Values

    - #### PACKAGE_STATUS_CHANGE_LISTENER_CODE

          public static final int PACKAGE_STATUS_CHANGE_LISTENER_CODE

      Used to notify whether the listener has been registered or not
      See Also:
        Constant Field Values

    - #### PACKAGE_STATUS_CHANGE_CODE

          public static final int PACKAGE_STATUS_CHANGE_CODE

      Used to notify whether the package status changed successfully or not
      See Also:
        Constant Field Values

    - #### PACKAGE_STATUS_RESULT_CODE

          public static final int PACKAGE_STATUS_RESULT_CODE

      Used to send the status of a given package (enabled or disabled)
      See Also:
        Constant Field Values

    - #### SET_WHITELIST_APP_PERMISSION_RESULT_CODE

          public static final int SET_WHITELIST_APP_PERMISSION_RESULT_CODE

      Used to notify whether the package app permission status changed successfully or not
      See Also:
        Constant Field Values

    - #### SET_WHITELIST_RULE_RESULT_CODE

          public static final int SET_WHITELIST_RULE_RESULT_CODE

      Used to notify whether package whitelist rule status change was successful or not
      See Also:
        Constant Field Values

    - #### APP_AUTO_START_PINNING_CODE

          public static final int APP_AUTO_START_PINNING_CODE

      Response code for setting app pinning and app auto start on boot
      See Also:
        Constant Field Values

    - #### SET_PACKAGE_NAME_PERMISSION_RESULT_CODE

          public static final int SET_PACKAGE_NAME_PERMISSION_RESULT_CODE

      Used to notify whether the package app permission status changed successfully or not
      See Also:
        Constant Field Values

    - #### instance

          public static Package instance

  - ### Constructor Detail

    - #### Package

          public Package()

  - ### Method Detail

    - #### enableWhitelistPackages

          public void enableWhitelistPackages(android.content.Context context,
                                              java.lang.String accessToken,
                                              java.lang.String json,
                                              android.os.Handler handler)

      This method is used to set rules for enabling/disabling packages. This will create a list for the packages that will be enabled/disabled on the device.
      Parameters:
        `context` - A context object of the calling Class (Activity/Service).
        `accessToken` - An offline JWT Token.
        `json` - A json object containing the whitelist rules (eg: package name, type (package launching), action (allow, block). Refer test app for example)
        `handler` - A handler to receive one or more of the following callback messages:

        `AccountManager.TOKEN_VERIFY_FAIL`
        `Consts.GENERIC_ERROR`
        `SET_WHITELIST_APP_PERMISSION_RESULT_CODE`

    - #### disableWhitelistPackages

          public void disableWhitelistPackages(android.content.Context context,
                                               java.lang.String accessToken,
                                               android.os.Handler handler)

      This method is used to disable whitelisting rules for packages.
      Parameters:
        `context` - A context object of the calling Class (Activity/Service).
        `accessToken` - An offline JWT Token.
        `handler` - A handler to receive one or more of the following callback messages:

        `AccountManager.TOKEN_VERIFY_FAIL`
        `Consts.GENERIC_ERROR`
        `SET_WHITELIST_APP_PERMISSION_RESULT_CODE`

    - #### silentPackageInstall

          public void silentPackageInstall(android.content.Context context,
                                           java.lang.String accessToken,
                                           java.lang.String uri,
                                           android.os.Handler handler)

      This method is used to install an APK silently in background
      Parameters:
        `context` - A context object of the calling Class (Activity/Service).
        `accessToken` - An offline JWT Token.
        `uri` - A uri pointing to the apk file which needs to be installed silently
        `handler` - A handler to receive one or more of the following callback messages:

        `AccountManager.TOKEN_VERIFY_FAIL`
        `Consts.GENERIC_ERROR`
        `INSTALL_LISTENER_REGISTERED`
        `INSTALLER_RESULT_CODE`

    - #### SetPackageNameandPermission

          public void SetPackageNameandPermission(android.content.Context context,
                                                  java.lang.String accessToken,
                                                  java.lang.String packageName,
                                                  java.lang.String packagePermission,
                                                  android.os.Handler handler)

      This method is used to set Package name and Permission
      Parameters:
        `context` - A context object of the calling Class (Activity/Service).
        `accessToken` - An offline JWT Token.
        `packageName` - Provide PackageName
        `packagePermission` - Provide packagePermission
        `handler` - A handler to receive one or more of the following callback messages:

        `AccountManager.TOKEN_VERIFY_FAIL`
        `Consts.GENERIC_ERROR`
        `INSTALL_LISTENER_REGISTERED`
        `INSTALLER_RESULT_CODE`

    - #### silentPackageUninstall

          public void silentPackageUninstall(android.content.Context context,
                                             java.lang.String accessToken,
                                             java.lang.String packageName,
                                             android.os.Handler handler)

      This method is used to uninstall package silently in background
      Parameters:
        `context` - A context object of the calling Class (Activity/Service).
        `accessToken` - An offline JWT Token.
        `packageName` - The name of the package that needs to be uninstalled
        `handler` - A handler to receive one or more of the following callback messages:

        `AccountManager.TOKEN_VERIFY_FAIL`
        `Consts.GENERIC_ERROR`
        `UNINSTALL_LISTENER_REGISTERED`
        `INSTALLER_RESULT_CODE`

    - #### stopPackage

          public void stopPackage(android.content.Context context,
                                  java.lang.String accessToken,
                                  java.lang.String packageName,
                                  android.os.Handler handler)

      This method is used to stop a running package.
      Parameters:
        `context` - A context object of the calling Class (Activity/Service).
        `accessToken` - An offline JWT Token.
        `packageName` - The name of the package that needs to be stopped/killed
        `handler` - A handler to receive one or more of the following callback messages:

        `AccountManager.TOKEN_VERIFY_FAIL`
        `Consts.GENERIC_ERROR`
        `STOP_PROCESS_CODE`

    - #### disablePackage

          public void disablePackage(android.content.Context context,
                                     java.lang.String accessToken,
                                     java.lang.String packageName,
                                     android.os.Handler handler)

      This method is used to disable a given package. It will no longer be visible in the app drawer.
      Parameters:
        `context` - A context object of the calling Class (Activity/Service).
        `accessToken` - An offline JWT Token.
        `packageName` - package name that is to be disable
        `handler` - A handler to receive one or more of the following callback messages:

        `AccountManager.TOKEN_VERIFY_FAIL`
        `Consts.GENERIC_ERROR`
        `LISTENER_REGISTRATION_ERROR`
        `PACKAGE_STATUS_CHANGE_CODE`

        Note: Only the following system packages will be allowed to be disabled as disabling
        some of the system apps may interfere with the core OS functionality.
        com.android.providers.calendar
        com.android.wallpapercropper
        com.android.messaging
        com.oem.camera
        com.android.providers.userdictionary
        org.codeaurora.gallery
        com.android.dreams.phototable
        com.android.dialer
        com.elotouch.paypointdiagnostics
        org.codeaurora.bluetooth
        com.android.musicfx
        com.android.music
        com.android.providers.telephony
        com.android.phone
        com.android.mms.service
        com.android.providers.media
        com.android.wallpaper.livepicker
        com.android.keychain
        com.android.documentsui
        com.android.htmlviewer
        com.android.location.fused
        com.android.emergency
        com.example.eloViewSDKTestApp
        com.elo.peripheral
        com.elotouch.miami.testapp
        com.elo.homescreen
        com.android.providers.downloads.ui
        com.android.providers.downloads
        com.veniosg.dir
        com.android.bips
        com.android.systemui.theme.dark
        com.android.providers.contacts
        com.oem.location
        com.android.wallpaperbackup
        com.android.smspush
        com.android.carrierconfig
        com.android.deskclock
        com.android.cellbroadcastreceiver
        com.android.carrierdefaultapp
        com.android.server.telecom
        com.android.calllogbackup
        com.android.calendar
        com.android.calculator2
        com.android.bookmarkprovider
        com.android.bluetooth
        com.android.bluetoothmidiservice
        com.android.providers.blockednumber
        com.dsi.ant.server
        com.android.webview
        com.android.egg
        com.sis.autotool
        com.google.android.calendar

    - #### enableDisableSettingsPackage

          public void enableDisableSettingsPackage(java.lang.String accessToken,
                                                   android.content.Context context,
                                                   java.lang.String packageState,
                                                   android.os.Handler handler)

      This method is used to enable/disable a settings package(com.android.settings).
      Parameters:
        `accessToken` - An offline JWT Token.
        `context` - A context object of the calling Class (Activity/Service).
        `packageState` - package state that is to be true/false.
        `handler` - A handler to receive one or more of the following callback messages:

        `AccountManager.TOKEN_VERIFY_FAIL`
        `Consts.GENERIC_ERROR`
        `LISTENER_REGISTRATION_ERROR`
        `PACKAGE_STATUS_CHANGE_CODE`

    - #### enablePackage

          public void enablePackage(android.content.Context context,
                                    java.lang.String accessToken,
                                    java.lang.String packageName,
                                    android.os.Handler handler)

      This method is used to enable the given package if it is currently installed and is disabled.
      Parameters:
        `context` - A context object of the calling Class (Activity/Service).
        `accessToken` - An offline JWT Token.
        `packageName` - package name that is to be enable
        `handler` - A handler to receive one or more of the following callback messages:

        `AccountManager.TOKEN_VERIFY_FAIL`
        `Consts.GENERIC_ERROR`
        `LISTENER_REGISTRATION_ERROR`
        `PACKAGE_STATUS_CHANGE_CODE`

    - #### getPackageStatus

          public void getPackageStatus(android.content.Context context,
                                       java.lang.String accessToken,
                                       java.lang.String packageName,
                                       android.os.Handler handler)

      This method is used to check if a given package is enabled or disabled.
      Parameters:
        `context` - A context object of the calling Class (Activity/Service).
        `accessToken` - An offline JWT Token.
        `packageName` - PackageName of the package user needs to know is enabled or disabled
        `handler` - A handler to receive one or more of the following callback messages:

        `AccountManager.TOKEN_VERIFY_FAIL`
        `PACKAGE_STATUS_RESULT_CODE`

    - #### setAppAutostartPinned

          public void setAppAutostartPinned(android.content.Context context,
                                            java.lang.String accessToken,
                                            java.lang.String newPassword,
                                            java.lang.String oldPassword,
                                            java.lang.String packageName,
                                            android.os.Handler handler)

      API used to start a task on boot and lock it.
      Parameters:
        `context` - Context
        `newPassword` - new PIN to be set for unpinning an app
        `oldPassword` - old PIN which was set for unpinning an app. This is required while changing the pin. This can be empty if it's the first time setting the pin.
        `accessToken` - Offline or online token
        `packageName` - List of apps to use for auto start and pinning on boot in a decreasing order of priority
        `handler` - A handler to receive one of the following callback messages:

        `APP_AUTO_START_PINNING_CODE`
        `AccountManager.TOKEN_VERIFY_FAIL`
        `Consts.GENERIC_ERROR`

    - #### removeAppAutostartPinned

          public void removeAppAutostartPinned(android.content.Context context,
                                               java.lang.String accessToken,
                                               java.lang.String password,
                                               boolean tempUnlock,
                                               android.os.Handler handler)

      API used to remove starting a task on boot and locking it.
      Parameters:
        `context` - Context
        `password` - device pin required to unlock the task
        `accessToken` - Offline or online token
        `tempUnlock` - A boolean value indicating whether the task should be unlocked temporarily (true) or permanently (false).
        `handler` - A handler to receive one of the following callback messages:

        `APP_AUTO_START_PINNING_CODE`
        `AccountManager.TOKEN_VERIFY_FAIL`
        `Consts.GENERIC_ERROR`

    - #### getAppAutoStartPinnedStatus

          public void getAppAutoStartPinnedStatus(android.content.Context context,
                                                  java.lang.String accessToken,
                                                  android.os.Handler handler)

      API used to get information if the feature to auto start a task and lock it is currently enabled or not.
      Parameters:
        `context` - Context
        `accessToken` - Offline or online token
        `handler` - A handler to receive one of the following callback messages:

        `APP_AUTO_START_PINNING_CODE`
        `AccountManager.TOKEN_VERIFY_FAIL`
        `Consts.GENERIC_ERROR`

        The response will be in the form of a json string containing the following keys: "isAppPinningEnabled" - Will be true if app auto start and pinning is currently enabled. Will be false if app auto start and pinning is not enabled or if app was permanently unpinned. "isAppTemporarilyUnpinned" - Will be true if app is only temporarily unpinned and false if app is currently pinned. This key will not be present in the response if app pinning is not enabled or app was permanently unpinned. "pinnedAppPackageName" - Will contain the package name of the app that is currently pinned. This key will not be present in the response if app pinning is * not enabled or app was permanently unpinned.

    - #### setWhitelistAppPermission

          public void setWhitelistAppPermission(android.content.Context context,
                                                java.lang.String accessToken,
                                                java.lang.String packageName,
                                                android.os.Handler handler)

      This method used to whitelist the given package.
      On package installation system will automatically allow runtime permissions for the whitelisted packages.
      So application doesn't popup runtime permission dialog.

      After applying change on install time whitelisted package will grant all permissions automatically.

      Parameters:
        `context` - Context
        `accessToken` - String Offline Token
        `packageName` - WhiteListPackageName
        `handler` - A handler to receive one of the following callback messages:

        `AccountManager.TOKEN_VERIFY_FAIL`
        `RESPONSE_SET_WHITELIST_PKG_APP_PERMISSION`
        `Consts.GENERIC_ERROR`

    - #### clearWhitelistAppPermission

          public void clearWhitelistAppPermission(android.content.Context context,
                                                  java.lang.String accessToken,
                                                  java.lang.String packageName,
                                                  android.os.Handler handler)

      This method used to clear whitelisted packages so system don't allow runtime permissions on installation time.
      Parameters:
        `context` - Context
        `accessToken` - String Offline Token
        `packageName` - String
        `handler` - A handler to receive one of the following callback messages:

        `AccountManager.TOKEN_VERIFY_FAIL`
        `RESPONSE_SET_WHITELIST_PKG_APP_PERMISSION`
        `Consts.GENERIC_ERROR`

    - #### clearAllWhitelistAppPermission

          public void clearAllWhitelistAppPermission(android.content.Context context,
                                                     java.lang.String accessToken,
                                                     boolean clearAllPackage,
                                                     android.os.Handler handler)

      This method used to clear all whitelisted packages so system don't allow runtime permissions on installation time.
      Parameters:
        `context` - Context
        `accessToken` - String Offline Token
        `clearAllPackage` - Boolean
        `handler` - A handler to receive one of the following callback messages:

        `AccountManager.TOKEN_VERIFY_FAIL`
        `RESPONSE_SET_WHITELIST_PKG_APP_PERMISSION`
        `Consts.GENERIC_ERROR`

    - #### unregisterWhitelistAppPermissionListener

          public void unregisterWhitelistAppPermissionListener(android.content.Context context)

      This method is used to unregister the broadcast receiver registered when using the `setWhitelistAppPermission(Context, String, String, Handler)` API.
      Please make sure to call this in the "onPause" and "onDestroy" methods in your activity Lifecycle if you made use of `setWhitelistAppPermission(Context, String, String, Handler)` API. This ensures the receiver is not leaked.
      Parameters:
        `context` - Context in which the Network APIs were used

    - #### unregisterWhitelistAPIListener

          public void unregisterWhitelistAPIListener(android.content.Context context)

      This method is used to unregister the broadcast receiver registered when the `enableWhitelistPackages(Context, String, String, Handler)`
      or `disableWhitelistPackages(Context, String, Handler)` APIs are used in your application is used in your App Please make sure to call this in the "onPause" and "onDestroy" methods in your activity Lifecycle if you made use of the two APIs. This ensures the receiver is not leaked.
      Parameters:
        `context` - Context in which the Network APIs were used

    - #### unregisterPackageInstallAPIListener

          public void unregisterPackageInstallAPIListener(android.content.Context context)

      This method is used to unregister the broadcast receiver registered when the `silentPackageInstall(Context, String, String, Handler)` (Context, String, Handler)} API.
      is used in your application. Please make sure to call this in the "onPause" and "onDestroy" methods in your activity Lifecycle if you made use of `silentPackageInstall(Context, String, String, Handler)` API. This ensures the receiver is not leaked.
      Parameters:
        `context` - Context in which the Network APIs were used

    - #### unregisterPackageUninstallAPIListener

          public void unregisterPackageUninstallAPIListener(android.content.Context context)

      This method is used to unregister the broadcast receiver registered when the `silentPackageUninstall(Context, String, String, Handler)` API.
      is used in your application. Please make sure to call this in the "onPause" and "onDestroy" methods in your activity Lifecycle if you made use of `silentPackageUninstall(Context, String, String, Handler)` API. This ensures the receiver is not leaked.
      Parameters:
        `context` - Context in which the Network APIs were used

    - #### unregisterPackageStatusChangeListener

          public void unregisterPackageStatusChangeListener(android.content.Context context)

      This method is used to unregister the broadcast receiver registered when using the `enablePackage(Context, String, String, Handler)` and.
      `disablePackage(Context, String, String, Handler)` APIs in your application. Please make sure to call this in the "onPause" and "onDestroy" methods in your activity Lifecycle if you made use of any of these two APIs. This ensures the receiver is not leaked.
      Parameters:
        `context` - Context in which the Network APIs were used