当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript ionic-native.StatusBar类代码示例

本文整理汇总了TypeScript中ionic-native.StatusBar的典型用法代码示例。如果您正苦于以下问题:TypeScript StatusBar类的具体用法?TypeScript StatusBar怎么用?TypeScript StatusBar使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了StatusBar类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1:

 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();
 });
开发者ID:ttowncompiled,项目名称:MyTeam,代码行数:5,代码来源:app.ts

示例2: initializeApp

  initializeApp(global, alertCtrl, navCtrl) {
    let retryCount = 0;

    StatusBar.styleBlackTranslucent();
    global.socket = io('https://io-test.remaxthailand.co.th');

    let storage = new Storage(LocalStorage);
    storage.get('langCode').then((langCode) => {
      if (langCode == undefined)
        storage.set('langCode', 'th');
      else
        global.langCode = langCode;
    });

    storage.get('message').then((message) => {
      if (message != null || message != undefined)
        global.message = JSON.parse(message);
    });

    storage.get('memberInfo').then((memberInfo) => {
      if (memberInfo != null && memberInfo != undefined && memberInfo != ''){
        global.member = JSON.parse(memberInfo);
        if( global.member.type != 'guest' ){
          storage.get('token').then((token) => {
            this.global.socket.emit('api', {
              token: token,
              module: 'member',
              action: 'profile'
            });
          });
        }
      }
      else {
        global.member = {
          id: '0', type: 'guest', typeMessage: 'roleGuest', picture: 'build/img/remax.png',
          name: 'Remax Thailand', shopName: ''
        };
        storage.set('memberInfo', global.member);
      }
    });

    /*LocalNotifications.schedule({
      id: 1,
      title: "หัวข้อหลัก",
      text: "Remax Thailand",
      //sound: isAndroid? 'file://sound.mp3': 'file://beep.caf',
      data: { meetingId:"123#fg8" },
      icon: 'file://icon.png'
    });

    LocalNotifications.on("click", function (notification) {
      let data = notification.data;
      alert(data.id);
      alert(data.meetingId);
      alert(data['meetingId']);
      alert(data);
    });*/


    /*var push = Push.init({
      android: {
        senderID: "3066538051"
      },
      ios: {
        alert: "true",
        badge: true,
        sound: 'false'
      },
      windows: {}
    });
    push.on('registration', (data) => {
      console.log(data.registrationId);
      global.deviceToken = data.registrationId.toString();
      //alert(data.registrationId.toString());
    });
    push.on('notification', (data) => {
      console.log(data);
      alert("Hi, Am a push notification");
    });
    push.on('error', (e) => {
      console.log(e.message);
      alert(e.message);
    });*/

    storage.get('token').then((token) => {
      if (token != undefined && token.trim() != '') {
        global.socket.emit('access', { token: token });
      }
      else {
        global.socket.emit('access', { token: '' });
      }

    });

    /*## ข้อมูล Token ##*/
    global.socket.on('access', function (data) {
      if (data.success) {
        storage.set('token', data.token);
        global.socket.emit('api', {
          token: data.token,
//.........这里部分代码省略.........
开发者ID:RemaxThailand,项目名称:RemaxMobile,代码行数:101,代码来源:app.ts

示例3:

 platform.ready().then(() => {
   StatusBar.styleDefault();
   Splashscreen.hide();
 });
开发者ID:wuangyalin,项目名称:ionic2_login_template,代码行数:4,代码来源:app.component.ts

示例4: setTimeout

 setTimeout(() => {
   StatusBar.backgroundColorByHexString("#202020")
 },100);
开发者ID:debasiskar-devel-007,项目名称:mealplansplus,代码行数:3,代码来源:app.ts


注:本文中的ionic-native.StatusBar类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。