How to use the ionic-native.AppVersion.getVersionNumber function in ionic-native

To help you get started, we’ve selected a few ionic-native examples, based on popular ways it is used in public projects.

github NorthMcCormick / Polyonic / src / src / pages / page1 / page1.ts View on Github external
ready() {

    console.log('Device from app: ', Device);

    this.version = Device.version;
    this.deviceModel = Device.model;
    this.dplatform = Device.platform;

    AppVersion.getVersionNumber().then((value) => {
      this.appVersion = value;
      console.log(value);
    }, (error) => {
      console.error(error);
    })

    AppVersion.getPackageName().then((value) => {
      this.appPackageName = value;
      console.log(value);
    }, (error) => {
      console.error(error);
    })

    AppVersion.getAppName().then((value) => {
      this.appName = value;
      console.log(value);
github gigocabrera / MoneyLeash2 / src / pages / mysettings / settings / settings.ts View on Github external
platform.ready().then(() => {
      AppVersion.getVersionNumber().then(ver => {
        this.appversion = ver;
      }).catch(function(error) {
        console.log(error);
      });
    });
  }
github bnjjj / my-infra / app / pages / login / login.ts View on Github external
constructor(private loginService: LoginService,
                private keyboard: Keyboard, private analytics: AnalyticsService,
                 private toast: ToastService, private nav: NavController) {

    this.analytics.trackView('Login');
    AppVersion.getVersionNumber()
      .then(
        (version) => this.version = version,
        (err) => console.log(err)
      );
  }
github bnjjj / my-infra / app / modals / about / about.ts View on Github external
constructor(private viewCtrl: ViewController, private analytics: AnalyticsService) {
    this.analytics.trackView('About-page');
    AppVersion.getVersionNumber()
      .then(
        (version) => this.version = version,
        (err) => console.log(err)
      );
  }
github RioBus / ionic-app / src / pages / settings / page.ts View on Github external
public ionViewLoaded(): void {
        AppVersion.getVersionNumber().then(version => this.version = version);
        this.preferences.getKey<boolean>(HIDE_TRAJECTORY_KEY).then(value => this.hideTrajectory = !!value);
        this.preferences.getKey<boolean>(HIDE_OLD_BUSES_KEY).then(value => this.hideOldBuses = !!value);
    }
github zyra / ionic-native-playground / app / pages / main / main.ts View on Github external
"<br>App Version: " + version_number + "" +
                "<br>Version Code: " + version_code);
        }
        AppVersion.getAppName().then((data) => {
            _resolved_count++;
            name = data;
            output();
        }, ()=>output());

        AppVersion.getPackageName().then((data) => {
            _resolved_count++;
            package_name = data;
            output();
        }, ()=>output());

        AppVersion.getVersionNumber().then(data=>{
            _resolved_count++;
            version_number = data;
            output();
        }, ()=>output());

        AppVersion.getVersionCode().then(data=>{
            _resolved_count++;
            version_code = data;
            output();
        }, ()=>output());

    }