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-kiosk

v0.2.2

Published

Cordova Kiosk Mode Plugin

Downloads

10

Readme

Cordova Kiosk Mode

Cordova plugin to create Cordova application with "kiosk mode". App with this plugin can be set as Android launcher. If app starts as launcher, it will block hardware buttons and statusbar, which would allow escape from application.

Escape from app will be possible only by javascript call KioskPlugin.exitKiosk() or by uninstallation app using adb. (Keeping USB debug allowed recommended.) If applications starts as usual (not as launcher), no restrictions will be applied.

Plugin website: https://github.com/honza889/cordova-plugin-kiosk Example app: https://github.com/honza889/cordova-kiosk-demo

Note for iOS: This plugin is for Android for now. Support of iOS would be useless, becase this feature is builded in iOS as Guided Access - see Settings - General - Accessibility - Guided Access

About

By adding this Cordova plugin the Cordova app becomes the the homescreen (also known as launcher) of Android device and will block any atempt of user to escape.

To add plugin into existing Cordova / Phonegap application:

cordova plugin add https://github.com/honza889/cordova-plugin-kiosk.git

The AndroidManifest.xml should be updated immediately. If not, you can force it by removing and re-adding Android platform:

cordova platform rm android
cordova platform add android

To it work user have to set this application as launcher (see below) and start it by pressing Home button.

WARNING Before installation ensure you have USB debug mode enabled. Without it you can have problem to remove app from device.

Exiting from Kiosk mode using Javascript:

KioskPlugin.exitKiosk();

For using example see: https://github.com/honza889/cordova-kiosk-demo

Tips

  • To remove this application use adb: (Do not install it without USB debug mode enabled!) (com.example.hello replace with package of your app from your config.xml)

      $ANDROID_HOME/platform-tools/adb uninstall com.example.hello
  • To change launcher (reset setting which launcher is default):

  • Alcatel: Settings - Applications - All - (This Application) / Launcher - Clear defaults, after Home press will be asked for default to set

  • Xiaomi: Settings - Installed apps - Defaults - Launcher

  • To disable screenlock: ("slide to unlock")

  • Alcatel: Settings - Security - Set up screen lock - None

  • Xiaomi: Settings - Additional settings - Developer options - Skip screen lock

"Application Error - The connection to the server was unsuccessful. (file:///android_asset/www/index.html)" occured

  • This can occure when Cordova's MainActivity is started too soon after system bootup. Because this is native HomeActivity here - if you will see this error message, try increase delay in timer.schedule in HomeActivity.java.

  • Another reason can be the index.html is missing.

  • Another reason can be too long loading of index.html -- you can set timeout of Cordova's WebView in config.xml of application: (value is in miliseconds)

      <preference name="loadUrlTimeoutValue" value="60000" />