Created
June 7, 2018 10:21
-
-
Save ssaurel/5b9dceaf388cb5fcf85791eb4b41fd0f to your computer and use it in GitHub Desktop.
DeviceAdminReceiver implementation for the Lock Screen Device App on the SSaurel's Channel
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
package com.ssaurel.lockdevice; | |
import android.app.admin.DeviceAdminReceiver; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.widget.Toast; | |
public class MyAdmin extends DeviceAdminReceiver { | |
@Override | |
public void onEnabled(Context context, Intent intent) { | |
Toast.makeText(context, "Device Admin : enabled", Toast.LENGTH_SHORT).show(); | |
} | |
@Override | |
public void onDisabled(Context context, Intent intent) { | |
Toast.makeText(context, "Device Admin : disabled", Toast.LENGTH_SHORT).show(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment