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

v1.0.9

Published

jurisdiction plugin

Downloads

4

Readme

cordova-plugin-achievejurisdiction

Getting started

$ npm install cordova-plugin-achievejurisdiction --save

How to debug:

1.获取存储权限。 下载内容的存储,在6.0以上适用,6.0以下不需要获取权限(静态注册的权限还是需要的)

cordova.plugins.achievejurisdiction.storage(result => {
}, error => {
	if (error === 'success') {
		<!-- 已有存储权限 -->
	} else if (error === 'error') {
		<!-- 需要在设置中手动开启(这种情况属于软件申请权限时用户拒绝了) -->
	} else {
		<!-- 低版本系统,不需要申请 -->
	}
});

2.安装应用插件,适用于所有android版本。 须传入app名字,默认为根目录文件。暂未加更改目录的功能。 如果不是8.0系统--->安装apk--->7.0以上(含7.0),使用FileProvider打开文件。7.0以下,直接用uri打开文件--->跳往安装 如果是8.0系统--->判断是否已获取权限(8.0才能使用的api,canRequestPackageInstalls(),8.0以下不能使用) --->没有权限--->跳往获取权限界面 --->有权限--->直接安装(与android7.0一样) cordova.plugins.achievejurisdiction.installApp("android.apk", result => { }, error => { })

3.检测是否有安装未知来源应用权限

cordova.plugins.achievejurisdiction.isPermission("isPermission", result => {

}, error => {
	console.log(error)
	if (error == "noPermission") {
		<!-- 没有权限 -->
	}else if(error == "havePermission"){
		<!-- 有权限 -->
	}
})

4.退出app

关掉app进程,退出app。没有返回数据
cordova.plugins.achievejurisdiction.exitApp("exitApp", result => {
}, error => {
})