function initPushwoosh() {
  var pushNotification = cordova.require("pushwoosh-cordova-plugin.PushNotification");
  console.log('device.platform ' + device.platform);
  document.getElementById('devicePlatform').value=device.platform;
  //console.log('device.element' + document.getElementById('devicePlatform').value);
  if (device.platform == "Android") {
    registerPushwooshAndroid();
  }

  if (device.platform == "iPhone" || device.platform == "iOS") {
    registerPushwooshIOS();
  }
  // pushNotification.getLaunchNotification(
  //   function(notification) {
  //     if (notification != null) {
  //       if(localStorage.getItem("login_status")!="1") return;
  //       //alert(JSON.stringify(notification));
  //       var user_id = notification.userdata.user_id;
  //       var is_room = notification.userdata.is_room==true?'true':'';
  //       var url= 'chat.html#/board/chat/'+ user_id + '_' +is_room;   
  //       redirectTo(url);
  //     } else {
  //      alert("No launch notification");
  //     }
  //   }
  // );
}
