Skip to content
StopApp-Disable-SDK
Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
app
gradle/wrapper
stopapp_sdk
.gitignore
README.md
build.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

StopApp-Disable-SDK

此份 sdk 仅限于小黑屋设备管理员模式使用,其他模式暂无(也不需要)可用 sdk. 小黑屋支持版本:1.8.8(200)以上.

添加依赖

Add it in your root build.gradle at the end of repositories:

   	allprojects {
   		repositories {
   			...
   			maven { url 'https://jitpack.io' }
   		}
   	}

Add the dependency

   	dependencies {
   	        implementation 'com.github.web1n:stopapp-sdk:0.01'
   	}

调用

1.判断小黑屋是否已安装

StopApp.isAppInstalled(Context))

2.判断小黑屋是否为 device owner

StopApp.isStopappDeviceOwner(Context))

3.判断是否有权限调用 sdk

 if (!StopApp.checkPermission(this)) {
        StopApp.requestPermission(Activity, 0x233); //没有权限,去申请.
  }

4.冻结 or 解冻

冻结 "com.catchingnow.icebox":
StopApp.setAppEnabledSettings(Context, false, "com.catchingnow.icebox");
解冻 "com.catchingnow.icebox":
StopApp.setAppEnabledSettings(Context, true, "com.catchingnow.icebox");
You can’t perform that action at this time.