Example #1
0
 public void onEventMainThread(ConnectSuccessEvent event) {
   if (timer != null) {
     timer.cancel();
     timer = null;
     loadingLenght = 99;
     tv_connecting.setVisibility(View.GONE);
   }
   isPhoneIsAp = false;
   //        statrtPlay();
   DeviceInfo.getInstance()
       .setContext(new WeakReference<Context>(CameraFragment.this.getActivity()));
   DeviceInfo.getInstance().getDeviceInfo();
   bt_take_photo.setEnabled(true);
   bt_go_photo.setEnabled(true);
 }
Example #2
0
 @AfterViews
 void init() {
   mPlayer = MedIaPlayerManager.createPlayer();
   admin = new WifiAdminV2(mActivity.getApplicationContext());
   com.leautolink.leautocamera.config.Constant.isLive = true;
   mPlayer.initPlayer(mActivity, video_layout, MedIaPlayerManager.PLAY_TYPE_LIVE);
   remoteCamHelper = RemoteCamHelper.getRemoteCam();
   mPlayer.setPlayerListener(this);
   ll_connect_to_camera.setVisibility(View.GONE);
   if (RemoteCamHelper.isStartSessionSuccess) {
     DeviceInfo.getInstance()
         .setContext(new WeakReference<Context>(CameraFragment.this.getActivity()));
     DeviceInfo.getInstance().getDeviceInfo();
   }
 }
Example #3
0
 /**
  * 初始化成功 startSession成功 , 获取sd卡的状态成功
  *
  * @param event
  */
 public void onEventMainThread(ConnectToCameraEvent event) {
   Logger.e("onEventMainThread isConnectCamera=" + event.isConnectCamera());
   if (event.isConnectCamera() && admin.isWifiEnabled()) {
     statrtPlay();
     connectSuccess();
     startReFreshAnimation();
     DeviceInfo.getInstance()
         .setContext(new WeakReference<Context>(CameraFragment.this.getActivity()));
     DeviceInfo.getInstance().getDeviceInfo();
     bt_take_photo.setEnabled(true);
     bt_go_photo.setEnabled(true);
     Logger.e("onEventMainThread FRAGMENTISHIDEN=" + FRAGMENTISHIDEN);
     autoDownLoadDataTask();
   } else {
     resumeConnectPage();
     if (mPlayer != null) {
       //                if (mPlayer.isPlaying()){
       mPlayer.stop();
       //                }
     }
   }
 }