npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-plugin-android-kiosk-nohome

v0.0.1

Published

setup single-use (COSU) devices for android that are not meant to be the home screen

Downloads

14

Readme

cordova-plugin-android-kiosk

Cordova single purpose applicaion plugin for Android. This is a fork of https://github.com/shougao/cordova-plugin-android-kiosk, with the only notable change being that the app can no longer act as the home screen.

install

cordova plugin add cordova-plugin-android-kiosk-nohome

usage

Kiosk is a cordova.plugin.kiosk.Kiosk to lock or unlock you app to the Only one app.

lock or unlock the app to Single Pourse device

function success(message){
    console.log("success");
}

function error(message){
    console.log("error: reason is " + message);
}

Kiosk.lock(success, error, boolean enable); // the boolean parameter is enable or disable this mode.

check the current lock state.

function success(message){
    console.log("locked = " + message); //true or false.
}
Kiosk.isLocked(success)

you have to set you app to the device owner forllow google AOSP design.

adb shell dpm set-device-owner com.example.template/.kiosk.plugin.MyAdmin

the setting will sotren at /data/system/device_policy.xml(before android 6.0) /data/system/device_policy_2.xml(> android 6.0)

First, create a file device_owner.xml with following content:

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<root>
    <device-owner package="com.myDomain.myPackage" name="" component="com.example.template/com.example.template.kiosk.plugin.MyAdmin" userRestrictionsMigrated="true" />
</root>

on android 8.0

/data/system # cat device_owner_2.xml
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<root>
<device-owner package="com.example.template" name="" component="com.example.template/com.example.template.kiosk.plugin.MyAdmin" userRestrictionsMigrated="true" />
<device-owner-context userId="0" />
</root>

chown system:system device_owner.xml

the cordova plugin source and target tag in plugin.xml is sutable for my project, the package name is com.example.template, if your project name is different, please using your pakcage name instand of it.