How to use the ionic-native.Device.device 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.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github apppresser / ap3 / app / app.ts View on Github external
maybeDoAds() {

    if(!Device.device.platform ) return;

    let ad_units: { ios: any, android: any } = null;
    ad_units.ios  = { banner: this.apppSettings.admob_ios_banner,
      interstitial: this.apppSettings.admob_ios_interstitial };
    ad_units.android = { banner: this.apppSettings.admob_android_banner,
      interstitial: this.apppSettings.admob_android_interstitial };

    // If we don't have any ads set, stop
    if( ad_units.ios.banner + ad_units.ios.interstitial + ad_units.android.banner + ad_units.android.interstitial === '' ) {
      console.log('no ads, bail');
      return;
    }

    this.appads.setOptions( this.apppSettings );

    // If we have a banner id, show on the proper platform
github apppresser / ap3 / app / app.ts View on Github external
this.platform.ready().then(() => {
      // Okay, so the platform is ready and our plugins are available.
      // Here you can do any higher level native things you might need.
      StatusBar.styleDefault();

      Splashscreen.hide();

      this.loggedin_msg = window.localStorage.getItem( 'logged_in_msg' );

      this.attachListeners();

      if( Device.device.platform === 'iOS' || Device.device.platform === 'Android' )
        this.pushService.register();

      setTimeout( () => {
        // run this in the background, then we can update the data on next app load if needed
        this.appdata.checkForUpdates( this.apiurl );
      }, 5000 );
      

    });
github apppresser / ap3 / app / providers / camera / app-camera.ts View on Github external
uploadPhoto(imageURI) {

    let fileTransfer = new Transfer();

    this.iframedoc = document.getElementById('ap3-iframe').contentWindow.document;
    let iframewin = document.getElementById('ap3-iframe').contentWindow.window;

    console.log('imageURI', imageURI);

    let image = imageURI.substr(imageURI.lastIndexOf('/') + 1);

    let name = image.split("?")[0];
    let anumber = image.split("?")[1];
    let ajaxurl = iframewin.apppCore.ajaxurl;

    if ('Android' === Device.device.platform) {
      image = anumber + '.jpg';
    }

    console.log(image);

    let options = new FileUploadOptions();
    options.fileKey = 'appp_cam_file';
    options.fileName = imageURI ? image : '';
    options.mimeType = 'image/jpeg';

    let params = {};
    let form_fields = [];
    let form_values = [];
    let iterator;
    let form_elements = this.iframedoc.getElementById('appp_camera_form').elements;
github srehanuddin / Teaching-Ionic-MeanStack-SSUET-2015-May-ModuleB / ionic2 / pluginsapp / app / pages / home / home.ts View on Github external
getDeviceInfo(){
      alert('Device UUID is: ' + Device.device.uuid);
      console.log(Device);
      console.log(Device.device);
  }
github zyra / ionic-native-playground / app / pages / main / main.ts View on Github external
constructor(private nav : NavController, private platform: Platform) {
        console.log("platform is", Device.device);
        this.platform.ready().then(()=> {

            this.googleMap = new GoogleMap("gmap");
            console.log("gmap is ", this.googleMap);
            let myPosition = new GoogleMapsLatLng(43.536476, -79.7304218);
            console.log("My position is", myPosition);
            let markerOptions: GoogleMapsMarkerOptions = {
                position: myPosition,
                title: 'Custom thing'
            };

            //marker.showInfoWindow();

            this.googleMap.on(GoogleMapsEvent.MAP_CLICK)
                .map(data=>data)
                .subscribe(
github srehanuddin / Teaching-Ionic-MeanStack-SSUET-2015-May-ModuleB / ionic2 / pluginsapp / app / pages / home / home.ts View on Github external
getDeviceInfo(){
      alert('Device UUID is: ' + Device.device.uuid);
      console.log(Device);
      console.log(Device.device);
  }