Skip to content

Instantly share code, notes, and snippets.

@ssaurel
Created June 7, 2018 10:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssaurel/5b9dceaf388cb5fcf85791eb4b41fd0f to your computer and use it in GitHub Desktop.
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
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