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

v1.1.3

Published

Cordova android app update plugin.

Downloads

2

Readme

cordova-plugin-log2c-app-update

一个基于AutoUpdateProject开发的Android更新库

安装

cordova plugin add cordova-plugin-log2c-app-update

使用

在项目中,先执行setConfig,再调用checkUpdate

API


var typeConfig = {
    /**
     * 更新信息的来源
     */
    DATA_SOURCE_TYPE_MODEL: 10,//调用方提供信息model
    DATA_SOURCE_TYPE_URL: 11,//通过配置链接供sdk自主请求
    DATA_SOURCE_TYPE_JSON: 12,//调用方提供信息json

    /**
     * 请求方式类型
     */
    METHOD_GET: 20, //GET请求
    METHOD_POST: 21, //POST请求

    /**
     * UI样式类型
     */
    UI_THEME_AUTO: 300,//sdk自主决定,随机从十几种样式中选择一种,并保证同一个设备选择的唯一的
    UI_THEME_CUSTOM: 399,//用户自定义UI
    UI_THEME_A: 301,//类型A,具体样式效果请关注demo
    UI_THEME_B: 302,//类型B,具体样式效果请关注demo
    UI_THEME_C: 303,//类型C,具体样式效果请关注demo
    UI_THEME_D: 304,//类型D,具体样式效果请关注demo
    UI_THEME_E: 305,//类型E,具体样式效果请关注demo
    UI_THEME_F: 306,//类型F,具体样式效果请关注demo
    UI_THEME_G: 307,//类型G,具体样式效果请关注demo
    UI_THEME_H: 308,//类型H,具体样式效果请关注demo
    UI_THEME_I: 309,//类型I,具体样式效果请关注demo
    UI_THEME_J: 310,//类型J,具体样式效果请关注demo
    UI_THEME_K: 311,//类型K,具体样式效果请关注demo
    UI_THEME_L: 312,//类型K,具体样式效果请关注demo
};

var defaultConfig = {
    //设置使用sdk请求的时候的请求链接地址
    baseUrl: '',
    //boolean是否是debug状态 打印log
    debug: false,

    //int设置样式类型 默认是随意一个样式类型
    uiThemeType: typeConfig.UI_THEME_AUTO,
    //int请求方式 默认GET请求
    methodType: typeConfig.METHOD_GET,
    //int更新信息的数据来源方式 默认用户自己提供更新信息
    dataSourceType: typeConfig.DATA_SOURCE_TYPE_JSON,
    //boolean是否在通知栏显示进度 默认显示 显示的好处在于 如果因为网络原因或者其他原因导致下载失败的时候,可以点击通知栏重新下载
    showNotification: true,
    //int通知栏下载进度提醒的Icon图标 默认为0 就是app的logo
    // notificationIconRes, // 弃用,转为使用 (iconRes + resourceName) 组合
    //Map<String, Object> 请求头信息
    requestHeaders: {},
    //Map<String, Object> 请求参数信息
    requestParams: {},
    //boolean是否需要进行文件的MD5校验
    isNeedFileMD5Check: false,
    //boolean是否静默下载
    isAutoDownloadBackground: false,
    iconRes: 'ic_launcher',
    resourceName: 'mipmap'
};

var downloadInfo = {
    apkUrl,
    apkSize,
    logs,    // 更新日志
    versionCode,
    versionName,
    isForceUpdate,
    affectCodes,// 影响范围
    md5  // APK MD5信息
};

/**
 * 设置配置规则
 */
setConfig (config, successCallback, errorCallback){};

/**
 * 开始检查更新
 */
checkUpdate (downloadInfo, successCallback, errorCallback) {};

具体信息参考AutoUpdateProject README

多语言

iOS

| key | 对应位置 | | --- | --- | | app_update_cancel_text | 取消按钮 | | app_update_update_text | 升级按钮 | | app_update_new_version_text | alert标题 |