Пример #1
0
 public void GetActiveRoom() {
   if (PersistentStorage.isRegistered()) {
     if (DBStor.get_setting().isTest()) {
       InetConn.getWebData(Util.GetURLChat() + "getactiveRoom.php?pin=" + pin, this);
       setShowLoader(true);
     }
   } else if (DeviceInfo.isSimulator()) {
     InetConn.getWebData(Util.GetURLChat() + "getactiveRoom.php?pin=" + pin, this);
     setShowLoader(true);
   }
 }
Пример #2
0
 public void fieldChanged(Field f, int context) {
   if (f == showmaps) {
     UiApplication.getUiApplication().pushScreen(new MapScreen());
   } else if (f == settinng) {
     UiApplication.getUiApplication().pushScreen(new SettingScreen());
   } else if (f == addroom) {
     if (PersistentStorage.isRegistered()) {
       if (DBStor.get_setting().isTest()) {
         UiApplication.getUiApplication().pushScreen(new addRoomChat());
       } else {
         Dialog.alert("Please try Test Push, until get Success notification.");
       }
     } else {
       Dialog.alert("Please Activate room Chat");
     }
   } else if (f == refresh) {
     if (DeviceInfo.isSimulator()) {
       callbackLBS(DBStor.get_setting().getLat(), DBStor.get_setting().getLon());
     }
     if (PersistentStorage.isRegistered()) {
       if (DBStor.get_setting().isTest()) {
         GetActiveRoom();
         LBS.getLocation(this);
         setShowLoader(true);
       } else {
         Dialog.alert("Please try Test Push, until get Success notification.");
       }
     } else {
       Dialog.alert("Please Activate room Chat");
     }
   } else if (f instanceof TombolRoomField) {
     try {
       TombolRoomField tf = (TombolRoomField) f;
       addToActive(tf);
     } catch (Exception e) {
     }
   }
 }