當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript StatusBar.styleBlackTranslucent方法代碼示例

本文整理匯總了TypeScript中ionic-native.StatusBar.styleBlackTranslucent方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript StatusBar.styleBlackTranslucent方法的具體用法?TypeScript StatusBar.styleBlackTranslucent怎麽用?TypeScript StatusBar.styleBlackTranslucent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ionic-native.StatusBar的用法示例。


在下文中一共展示了StatusBar.styleBlackTranslucent方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: 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


注:本文中的ionic-native.StatusBar.styleBlackTranslucent方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。