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

v2.0.3

Published

An Android Cordova plugin that allows users to update app to letest version without leaving the application

Downloads

133

Readme

cordova-in-app-update

This pluging enabels In app update For cordova.

Supports

  • Flexible update
  • Immeidiate update
  • Stalneess days For both type of updates
  • Priority updates

Configs

  • type : Provides option to user which strategy to use IMMEDIATE or FLEXIBLE or MIXED (Required)
  • stallDays : Provides stalness day configuration for type IMMEDIATE and FLEXIBLE (Required for type IMMEDIATE and FLEXIBLE)
  • flexibleUpdateStalenessDays : Provide stalness days for flexible update in case of type MIXED (Required for type MIXED)
  • immediateUpdateStalenessDays : Provide stalness days for immeidiate update in case of type MIXED (Required for type MIXED)
  • alertTitle (only applicable in ios config) : Provides custom title for IOS alert box (default : "New Version")
  • alertMessage (only applicable in ios config) : Provides custom message for IOS alert box (defualt: "version <version> of <appName> is available on the AppStore.")
  • alertCancelButtonTitle (only applicable in ios config) : Provides custom cancel button title for IOS alert box (default: "Not Now")
  • alertUpdateButtonTitle (only applicable in ios config) : Provides custom update button title for IOS alert box (default: "Update")

Examples

Flexible update with 5 staleness days in both android and ios

window.plugins.updatePlugin.update(()=>{
//success callback
},()=>{
//error callback
},{
   IOS: {
       type: "FLEXIBLE",
       stallDays: 5
   },
   ANDROID: {
        type: "FLEXIBLE",
        stallDays: 5
    }
});

Immediate update with 5 staleness days in both android and ios

window.plugins.updatePlugin.update(()=>{
//success callback
},()=>{
//error callback
},{
   IOS: {
       type: "IMMEDIATE",
       stallDays: 5
   },
   ANDROID: {
        type: "IMMEDIATE",
        stallDays: 5
    }
});

Flexible update with 2 staleness days and Immediate update with 5 stalness days in both android and ios

window.plugins.updatePlugin.update(()=>{
//success callback
},()=>{
//error callback
},{
   IOS: {
        type: "MIXED",
        flexibleUpdateStalenessDays: 2,
        immediateUpdateStalenessDays: 5
   },
   ANDROID: {
        type: "MIXED",
        flexibleUpdateStalenessDays: 2,
        immediateUpdateStalenessDays: 5
    }
});

Flexible update with 2 staleness days and Immediate update with 5 stalness days in both android and ios and custom messages for ios

window.plugins.updatePlugin.update(()=>{
//success callback
},()=>{
//error callback
},{
   IOS: {
        type: "MIXED",
        flexibleUpdateStalenessDays: 2,
        immediateUpdateStalenessDays: 5,
        alertTitle: "Hola new update!",
        alertMessage: "Please update your app for new Features!",
        alertCancelButtonTitle: "Nope",
        alertUpdateButtonTitle: "Go ahead!"
   },
   ANDROID: {
        type: "MIXED",
        flexibleUpdateStalenessDays: 2,
        immediateUpdateStalenessDays: 5
    }
});

Priority (only applicable for android)

stalness will be ignored in this case

  • If priority of released app is >= 3 it will trigger Immediate update
  • If priority of released app is >= 1 it will trigger Flexible update

Note: To determine priority, Google Play uses an integer value between 0 and 5, with 0 being the default, and 5 being the highest priority. To set the priority for an update, use inAppUpdatePriority field under Edits.tracks.releases in the Google Play Developer API. Priority can only be set when rolling out a new release, and cannot be changed later.