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-app-update-fork

v1.6.0

Published

Cordova App Update (Temporary Fork)

Downloads

11

Readme

cordova-plugin-app-update-fork

Temporary fork of cordova-plugin-app-update until the following pull-requests are integrated.

  • https://github.com/vaenow/cordova-plugin-app-update/pull/95

Everything below is from the original README.md

travis

NPM

cordova-plugin-app-update

App updater for Cordova/PhoneGap

Demo

Try it yourself:

Just clone and install this demo. cordova-plugin-app-update-DEMO :tada:

  • 如果喜欢它,请别忘了给我一颗鼓励的星
  • Support me a Star if it is necessary. :+1:

Preview

enter image description here

enter image description here

Install

Latest published version on npm (with Cordova CLI >= 5.0.0)

"cordova-android": "6.3.0"

cordova plugin add cordova-plugin-app-update --save

Usage

  • Simple:
var updateUrl = "http://192.168.0.1/version.xml";
window.AppUpdate.checkAppUpdate(onSuccess, onFail, updateUrl);
  • Verbose
var appUpdate = cordova.require('cordova-plugin-app-update.AppUpdate');
var updateUrl = "http://192.168.0.1/version.xml";
appUpdate.checkAppUpdate(onSuccess, onFail, updateUrl);
appUpdate.checkAppUpdate(onSuccess, onFail, updateUrl, {
    'authType' : 'basic',
    'username' : 'test',
    'password' : 'test'
})
  • Skip dialog boxes
appUpdate.checkAppUpdate(onSuccess, onFail, updateUrl, {
    'skipPromptDialog' : true,
    'skipProgressDialog' : true
})

server version.xml file

<update>
    <version>302048</version>
    <name>name</name>
    <url>http://192.168.0.1/android.apk</url>
</update>

checkAppUpdate code

    /**
     * 对比版本号
     */
    int VERSION_NEED_UPDATE = 201; //检查到需要更新; need update
    int VERSION_UP_TO_UPDATE = 202; //软件是不需要更新;version up to date
    int VERSION_UPDATING = 203; //软件正在更新;version is updating

    /**
     * 版本解析错误
     */
    int VERSION_RESOLVE_FAIL = 301; //版本文件解析错误 version-xml file resolve fail
    int VERSION_COMPARE_FAIL = 302; //版本文件对比错误 version-xml file compare fail

    /**
     * 网络错误
     */
    int REMOTE_FILE_NOT_FOUND = 404;
    int NETWORK_ERROR = 405;

    /**
     * 没有相应的方法
     */
    int NO_SUCH_METHOD = 501;

    /**
     * Permissions
     */
    int PERMISSION_DENIED = 601;

    /**
     * 未知错误
     */
    int UNKNOWN_ERROR = 901;

Languages

  • 🇨🇳 zh
  • 🇺🇸 en
  • 🇩🇪 de
  • 🇫🇷 fr
  • 🇵🇹 pt
  • 🇧🇩 bn
  • 🇵🇱 pl
  • 🇮🇹 it
  • 🇪🇸 es
  • 🇷🇺 ru
  • 🇰🇷 ko

Platforms

Android only

License

MIT

:snowflake: :beers:

  • Please let me know if you have any questions.