1.0.4 • Published 4 years ago
capacitor-check-app-update v1.0.4
Capacitor Check App Update
Check the App and Play store for app updates!
Installation
npm install capacitor-check-app-update
Android
Add the plugin to the MainActivity in the Android project
import com.abitofsoftware.capacitorappupdate.CheckAppUpdate;
public class MainActivity extends BridgeActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Initializes the Bridge
this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{
// Additional plugins you've installed go here
add(AppUpdate.class);
}});
}
}
Usage
import { Plugins } from '@capacitor/core';
const { CheckAppUpdate } = Plugins;
CheckAppUpdate.canUpdate()
.then({value: boolean} => {
if(value) {
// ... prompt user to update
}
})