8000 GitHub - luisfelipeas5/saori-loki
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

luisfelipeas5/saori-loki

Repository files navigation

SaoriLoki

When you opens this app, it will ask for a permission to be a Admin app because just with it, SaoriLoki can lock your screen without the button on the side of your device.

First create a Receiver

Create a class that extends DeviceAdminReceiver to receive the events when the user gives the permission to the app to be a admin.

In this case, we just need the permission itself and not to be warned when this happens. So the receiver needs to be created, but it can be "empty":

import android.app.admin.DeviceAdminReceiver

class MyDeviceAdminReceiver: DeviceAdminReceiver()

Second declare the receiver on AndroidManifest

<receiver android:name="br.com.luisfelipeas5.saoriblock.MyDeviceAdminReceiver"
          android:label="@string/sample_device_admin"
          android:description="@string/sample_device_admin_description"
          android:permission="android.permission.BIND_DEVICE_ADMIN">
    <meta-data android:name="android.app.device_admin"
               android:resource="@xml/device_admin_sample" />
    <intent-filter>
        <action android:name="android.app.action.DEVICE_ADMIN_ENABLED" />
    </intent-filter>
</receiver>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0