Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
cordova-plugin-log2c-app-update
Advanced tools
一个基于AutoUpdateProject开发的Android
更新库
cordova plugin add cordova-plugin-log2c-app-update
在项目中,先执行setConfig
,再调用checkUpdate
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
FAQs
Cordova android app update plugin.
The npm package cordova-plugin-log2c-app-update receives a total of 0 weekly downloads. As such, cordova-plugin-log2c-app-update popularity was classified as not popular.
We found that cordova-plugin-log2c-app-update demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.