|
|
@@ -0,0 +1,496 @@
|
|
|
+package com.silence.commonframe.activity.device.activity.camera;
|
|
|
+
|
|
|
+import android.content.DialogInterface;
|
|
|
+import android.content.Intent;
|
|
|
+import android.graphics.Bitmap;
|
|
|
+import android.graphics.BitmapFactory;
|
|
|
+import android.media.MediaPlayer;
|
|
|
+import android.net.Uri;
|
|
|
+import android.os.Bundle;
|
|
|
+import android.os.Handler;
|
|
|
+import android.os.Message;
|
|
|
+import android.provider.ContactsContract;
|
|
|
+import android.text.TextUtils;
|
|
|
+import android.view.LayoutInflater;
|
|
|
+import android.view.MotionEvent;
|
|
|
+import android.view.View;
|
|
|
+import android.widget.ImageButton;
|
|
|
+import android.widget.ImageView;
|
|
|
+import android.widget.LinearLayout;
|
|
|
+import android.widget.RelativeLayout;
|
|
|
+import android.widget.TextView;
|
|
|
+import android.widget.Toast;
|
|
|
+
|
|
|
+import com.lib.EPTZCMD;
|
|
|
+import com.lib.FunSDK;
|
|
|
+import com.silence.commonframe.Dialog.BaseDialog;
|
|
|
+import com.silence.commonframe.Dialog.CDialog;
|
|
|
+import com.silence.commonframe.R;
|
|
|
+import com.silence.commonframe.activity.MainActivity;
|
|
|
+import com.silence.commonframe.activity.device.activity.camera.Interface.NewCameraPlayListener;
|
|
|
+import com.silence.commonframe.activity.device.activity.camera.presenter.NewCameraPlayPresenter;
|
|
|
+import com.silence.commonframe.activity.mine.activity.CoustomerActivity;
|
|
|
+import com.silence.commonframe.activity.mine.activity.HistoryActivity;
|
|
|
+import com.silence.commonframe.activity.mine.activity.NewSiteDetailActivity;
|
|
|
+import com.silence.commonframe.activity.mine.activity.QuesstionActivity;
|
|
|
+import com.silence.commonframe.base.basemvp.BaseActivity;
|
|
|
+import com.silence.commonframe.base.basemvp.TitleBar;
|
|
|
+import com.silence.commonframe.bean.CameraDetailBean;
|
|
|
+import com.silence.commonframe.lib.funsdk.support.FunDevicePassword;
|
|
|
+import com.silence.commonframe.lib.funsdk.support.FunLog;
|
|
|
+import com.silence.commonframe.lib.funsdk.support.FunPath;
|
|
|
+import com.silence.commonframe.lib.funsdk.support.FunSupport;
|
|
|
+import com.silence.commonframe.lib.funsdk.support.OnFunDeviceListener;
|
|
|
+import com.silence.commonframe.lib.funsdk.support.models.FunDevStatus;
|
|
|
+import com.silence.commonframe.lib.funsdk.support.models.FunDevType;
|
|
|
+import com.silence.commonframe.lib.funsdk.support.models.FunDevice;
|
|
|
+import com.silence.commonframe.lib.funsdk.support.models.FunLoginType;
|
|
|
+import com.silence.commonframe.lib.funsdk.support.models.FunStreamType;
|
|
|
+import com.silence.commonframe.lib.funsdk.support.utils.FileUtils;
|
|
|
+import com.silence.commonframe.lib.funsdk.support.widget.FunVideoView;
|
|
|
+import com.silence.commonframe.utils1.DeviceActivitys;
|
|
|
+import com.silence.commonframe.utils1.GoSystemSetting;
|
|
|
+
|
|
|
+import java.io.File;
|
|
|
+
|
|
|
+import butterknife.BindView;
|
|
|
+import butterknife.ButterKnife;
|
|
|
+import butterknife.OnClick;
|
|
|
+import butterknife.OnTouch;
|
|
|
+
|
|
|
+public class NewCameraPlayActivity extends BaseActivity implements NewCameraPlayListener.View,
|
|
|
+ OnFunDeviceListener,MediaPlayer.OnInfoListener {
|
|
|
+ @BindView(R.id.base_title_bar)
|
|
|
+ TitleBar baseTitleBar;
|
|
|
+ @BindView(R.id.img_btn_right)
|
|
|
+ ImageButton imgBtnRight;
|
|
|
+ @BindView(R.id.img_btn_left)
|
|
|
+ ImageButton imgBtnLeft;
|
|
|
+ @BindView(R.id.img_btn_down)
|
|
|
+ ImageButton imgBtnDown;
|
|
|
+ @BindView(R.id.img_btn_top)
|
|
|
+ ImageButton imgBtnTop;
|
|
|
+ @BindView(R.id.rl_keyboard)
|
|
|
+ RelativeLayout rlKeyboard;
|
|
|
+ @BindView(R.id.funVideoView)
|
|
|
+ FunVideoView funVideoView;
|
|
|
+ @BindView(R.id.tv_start_video)
|
|
|
+ TextView tvStartVideo;
|
|
|
+ @BindView(R.id.ll_recording)
|
|
|
+ LinearLayout llRecording;
|
|
|
+ @BindView(R.id.btn_camera)
|
|
|
+ ImageButton btnCamera;
|
|
|
+ @BindView(R.id.textStreamStat)
|
|
|
+ TextView textStreamStat;
|
|
|
+ @BindView(R.id.iv_sound)
|
|
|
+ ImageView ivSound;
|
|
|
+ @BindView(R.id.iv_definition)
|
|
|
+ ImageView ivDefinition;
|
|
|
+ @BindView(R.id.iv_video)
|
|
|
+ ImageView ivVideo;
|
|
|
+ @BindView(R.id.iv_cut)
|
|
|
+ ImageView ivCut;
|
|
|
+ @BindView(R.id.iv_full_screen)
|
|
|
+ ImageView ivFullScreen;
|
|
|
+ @BindView(R.id.btnFishEyeInfo)
|
|
|
+ ImageView btnFishEyeInfo;
|
|
|
+ @BindView(R.id.layoutChannelBtn)
|
|
|
+ LinearLayout layoutChannelBtn;
|
|
|
+ @BindView(R.id.btn_quit_voice)
|
|
|
+ ImageButton btnQuitVoice;
|
|
|
+ @BindView(R.id.ll_talk)
|
|
|
+ RelativeLayout llTalk;
|
|
|
+ @BindView(R.id.ll_take_photo)
|
|
|
+ LinearLayout llTakePhoto;
|
|
|
+ @BindView(R.id.ll_foot)
|
|
|
+ LinearLayout llFoot;
|
|
|
+
|
|
|
+ BaseDialog baseDialog;
|
|
|
+ String deviceId="";
|
|
|
+ NewCameraPlayPresenter presenter;
|
|
|
+ FunDevice mFunDevice = null;
|
|
|
+ String mCurrDevSn="";//序列号 uuid
|
|
|
+ private Boolean isSoundPlay = false;
|
|
|
+
|
|
|
+ private final int MESSAGE_PLAY_MEDIA = 0x100;
|
|
|
+ private final int MESSAGE_AUTO_HIDE_CONTROL_BAR = 0x102;
|
|
|
+ private final int MESSAGE_TOAST_SCREENSHOT_PREVIEW = 0x103;
|
|
|
+ private final int MESSAGE_OPEN_VOICE = 0x104;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int getLayoutId() {
|
|
|
+ return R.layout.activity_camera_detail_new;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void initPresenter() {
|
|
|
+ presenter=new NewCameraPlayPresenter(this,this);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void initView() {
|
|
|
+ clickTitle(this,"设备详情",R.drawable.setup,true).setRightClickListener(view -> {
|
|
|
+ Intent intent = new Intent(NewCameraPlayActivity.this, CameraSetupActivity.class);
|
|
|
+ intent.putExtra("deviceId", deviceId);
|
|
|
+ intent.putExtra("FUN_DEVICE_ID",mCurrDevSn);
|
|
|
+ startActivity(intent);
|
|
|
+ });
|
|
|
+ deviceId=getIntent().getStringExtra("deviceId");
|
|
|
+ presenter.getCameraDetail();
|
|
|
+
|
|
|
+ baseDialog=new BaseDialog();
|
|
|
+ // 设置登录方式为网络
|
|
|
+ FunSupport.getInstance().setLoginType(FunLoginType.LOGIN_BY_INTENTT);
|
|
|
+ // 监听设备类事件
|
|
|
+ FunSupport.getInstance().registerOnFunDeviceListener(this);
|
|
|
+
|
|
|
+ funVideoView.setOnInfoListener(this);
|
|
|
+ }
|
|
|
+ @OnClick({R.id.iv_sound,R.id.iv_definition,R.id.iv_video,R.id.iv_cut,R.id.iv_full_screen,R.id.ll_take_photo})
|
|
|
+ public void onClick(final View view) {
|
|
|
+ switch (view.getId()) {
|
|
|
+ case R.id.iv_sound:
|
|
|
+ //播放停止声音
|
|
|
+ if (isSoundPlay) {
|
|
|
+ funVideoView.setMediaSound(false); //关闭本地音频
|
|
|
+ isSoundPlay = false;
|
|
|
+ ivSound.setImageResource(R.mipmap.sound_close);
|
|
|
+ } else {
|
|
|
+ funVideoView.setMediaSound(true); //打开本地音频
|
|
|
+ isSoundPlay = true;
|
|
|
+ ivSound.setImageResource(R.mipmap.sound);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case R.id.iv_definition:
|
|
|
+ //清晰度
|
|
|
+ switchMediaStream();
|
|
|
+ break;
|
|
|
+ case R.id.iv_video:
|
|
|
+
|
|
|
+ break;
|
|
|
+ case R.id.iv_cut:
|
|
|
+ tryToRecord();
|
|
|
+ break;
|
|
|
+ case R.id.iv_full_screen:
|
|
|
+
|
|
|
+ break;
|
|
|
+ case R.id.ll_take_photo:
|
|
|
+ tryToCapture();
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ @OnTouch({R.id.img_btn_left,R.id.img_btn_right,R.id.img_btn_down,R.id.img_btn_top})
|
|
|
+ public boolean onTouch(View v, MotionEvent event) {
|
|
|
+ boolean bstop = true;
|
|
|
+ int nPTZCommand = -1;
|
|
|
+ switch (event.getAction()) {
|
|
|
+ case MotionEvent.ACTION_DOWN: //手指按下
|
|
|
+ bstop = false;
|
|
|
+ nPTZCommand=clickWhichKeyboard(nPTZCommand,v);
|
|
|
+ break;
|
|
|
+ case MotionEvent.ACTION_MOVE: //手指移动(从手指按下到抬起 move多次执行)
|
|
|
+ nPTZCommand=clickWhichKeyboard(nPTZCommand,v);
|
|
|
+ bstop = Math.abs(event.getX()) > v.getWidth()
|
|
|
+ || Math.abs(event.getY()) > v.getHeight();
|
|
|
+ break;
|
|
|
+ case MotionEvent.ACTION_UP: //手指抬起
|
|
|
+ bstop = true;
|
|
|
+ nPTZCommand=clickWhichKeyboard(nPTZCommand,v);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ onContrlPTZ1(nPTZCommand, bstop);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ private int clickWhichKeyboard(int nPTZCommand,View v){
|
|
|
+ if (v.getId()==R.id.img_btn_right){
|
|
|
+ nPTZCommand = EPTZCMD.PAN_LEFT;
|
|
|
+ }else if (v.getId()==R.id.img_btn_left){
|
|
|
+ nPTZCommand = EPTZCMD.PAN_RIGHT;
|
|
|
+ }else if (v.getId()==R.id.img_btn_down){
|
|
|
+ nPTZCommand = EPTZCMD.TILT_DOWN;
|
|
|
+ }else if (v.getId()==R.id.img_btn_top){
|
|
|
+ nPTZCommand = EPTZCMD.TILT_UP;
|
|
|
+ }
|
|
|
+ return nPTZCommand;
|
|
|
+ }
|
|
|
+ private void onContrlPTZ1(int nPTZCommand, boolean bStop) {
|
|
|
+ FunSupport.getInstance().requestDevicePTZControl(mFunDevice,
|
|
|
+ nPTZCommand, bStop, mFunDevice.CurrChannel);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public String getDeviceId() {
|
|
|
+ return deviceId;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onCameraSuccess(CameraDetailBean bean) {
|
|
|
+ if (bean.getId().length() == 0) {
|
|
|
+ baseDialog.BaseDialog(this, "温馨提示:", "摄像头信息获取失败", "取消", "确定", dialogCallBack);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ mFunDevice = null;
|
|
|
+ mCurrDevSn = bean.getUuid();
|
|
|
+ FunSupport.getInstance().requestDeviceStatus(FunDevType.EE_DEV_NORMAL_MONITOR, mCurrDevSn);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onFile(String msg) {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onDeviceListChanged() {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ private void switchMediaStream() {
|
|
|
+ if (null != funVideoView) {
|
|
|
+ if (FunStreamType.STREAM_MAIN == funVideoView.getStreamType()) {
|
|
|
+ funVideoView.setStreamType(FunStreamType.STREAM_SECONDARY);
|
|
|
+ ivDefinition.setImageResource(R.mipmap.lowview);
|
|
|
+ } else {
|
|
|
+ funVideoView.setStreamType(FunStreamType.STREAM_MAIN);
|
|
|
+ ivDefinition.setImageResource(R.mipmap.highview);
|
|
|
+ }
|
|
|
+ // 重新播放
|
|
|
+ funVideoView.stopPlayback();
|
|
|
+ playRealMedia();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 视频截图,并延时一会提示截图对话框
|
|
|
+ */
|
|
|
+ private void tryToCapture() {
|
|
|
+ if (!funVideoView.isPlaying()) {
|
|
|
+ Toast.makeText(NewCameraPlayActivity.this,R.string.media_capture_failure_need_playing,Toast.LENGTH_SHORT).show();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ final String path = funVideoView.captureImage(null); //图片异步保存
|
|
|
+ if (!TextUtils.isEmpty(path)) {
|
|
|
+ Message message = new Message();
|
|
|
+ message.what = MESSAGE_TOAST_SCREENSHOT_PREVIEW;
|
|
|
+ message.obj = path;
|
|
|
+ mHandler.sendMessageDelayed(message, 200); //此处延时一定时间等待图片保存完成后显示,也可以在回调成功后显示
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private void tryToRecord() {
|
|
|
+ if (!funVideoView.isPlaying() || funVideoView.isPaused()) {
|
|
|
+ Toast.makeText(NewCameraPlayActivity.this,R.string.media_record_failure_need_playing,Toast.LENGTH_SHORT).show();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (funVideoView.bRecord) {
|
|
|
+ funVideoView.stopRecordVideo();
|
|
|
+ llRecording.setVisibility(View.GONE);
|
|
|
+ ivCut.setImageResource(R.mipmap.cut);
|
|
|
+ String cutVideoFilePath=funVideoView.getFilePath();
|
|
|
+ baseDialog.BaseDialog(this, getResources().getString(R.string.device_sport_camera_record_success),
|
|
|
+ getString(R.string.media_record_stop)+cutVideoFilePath, "取消", "打开", dialogFileCallBack,cutVideoFilePath);
|
|
|
+ } else {
|
|
|
+ funVideoView.startRecordVideo(null);
|
|
|
+ llRecording.setVisibility(View.VISIBLE);
|
|
|
+ ivCut.setImageResource(R.mipmap.recording_blue);
|
|
|
+ Toast.makeText(NewCameraPlayActivity.this,R.string.media_record_start,Toast.LENGTH_SHORT).show();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public void onDeviceStatusChanged(FunDevice funDevice) {
|
|
|
+ // 设备状态变化,如果是当前登录的设备查询之后是在线的,打开设备操作界面
|
|
|
+ if (null != mCurrDevSn && mCurrDevSn.equals(funDevice.getDevSn())) {
|
|
|
+ mFunDevice = funDevice;
|
|
|
+ stopLoading();
|
|
|
+ if (funDevice.devStatus == FunDevStatus.STATUS_ONLINE) {
|
|
|
+ // 如果设备在线,获取设备信息
|
|
|
+ if ((funDevice.devType == null || funDevice.devType == FunDevType.EE_DEV_UNKNOWN)) {
|
|
|
+ funDevice.devType = FunDevType.EE_DEV_NORMAL_MONITOR;
|
|
|
+ }
|
|
|
+ //播放视频
|
|
|
+ playRealMedia();
|
|
|
+ } else {
|
|
|
+ // 设备不在线
|
|
|
+ baseDialog.BaseDialog(this, "温馨提示:", "摄像头设备不在线", "取消", "确定", dialogCallBack);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //播放视频
|
|
|
+ private void playRealMedia() {
|
|
|
+ // 显示状态: 正在打开视频...
|
|
|
+ tvStartVideo.setText("正在打开视频...");
|
|
|
+ tvStartVideo.setVisibility(View.VISIBLE);
|
|
|
+
|
|
|
+ if (mFunDevice.isRemote) {
|
|
|
+ funVideoView.setRealDevice(mFunDevice.getDevSn(), mFunDevice.CurrChannel);
|
|
|
+ } else {
|
|
|
+ String deviceIp = FunSupport.getInstance().getDeviceWifiManager().getGatewayIp();
|
|
|
+ funVideoView.setRealDevice(deviceIp, mFunDevice.CurrChannel);
|
|
|
+ }
|
|
|
+ // 默认关闭声音
|
|
|
+ funVideoView.setMediaSound(false);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public boolean onInfo(MediaPlayer arg0, int what, int extra) {
|
|
|
+ if (what == MediaPlayer.MEDIA_INFO_BUFFERING_START) {
|
|
|
+ tvStartVideo.setText("正在缓冲...");
|
|
|
+ tvStartVideo.setVisibility(View.VISIBLE);
|
|
|
+ } else if (what == MediaPlayer.MEDIA_INFO_BUFFERING_END) {
|
|
|
+ tvStartVideo.setVisibility(View.GONE);
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ private void stopMedia() {
|
|
|
+ if (null != funVideoView) {
|
|
|
+ funVideoView.stopPlayback();
|
|
|
+ funVideoView.stopRecordVideo();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ BaseDialog.DialogCallBack dialogCallBack = new BaseDialog.DialogCallBack() {
|
|
|
+ @Override
|
|
|
+ public void leftBtn() {
|
|
|
+ finish();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void rightBtn() {
|
|
|
+ finish();
|
|
|
+ }
|
|
|
+ };
|
|
|
+ BaseDialog.DialogVideoCallBack dialogFileCallBack = new BaseDialog.DialogVideoCallBack() {
|
|
|
+ @Override
|
|
|
+ public void leftBtn() {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void rightBtn(String path) {
|
|
|
+ startActivity(new Intent().putExtra("videoPath",path).setClass(NewCameraPlayActivity.this,FullPlayVideoActivity.class));
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ private Handler mHandler = new Handler() {
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void handleMessage(Message msg) {
|
|
|
+ switch (msg.what) {
|
|
|
+ case MESSAGE_PLAY_MEDIA: {
|
|
|
+ playRealMedia();
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case MESSAGE_AUTO_HIDE_CONTROL_BAR: {
|
|
|
+
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case MESSAGE_TOAST_SCREENSHOT_PREVIEW: {
|
|
|
+ String path = (String) msg.obj;
|
|
|
+ toastScreenShotPreview(path);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case MESSAGE_OPEN_VOICE: {
|
|
|
+ funVideoView.setMediaSound(true);
|
|
|
+ isSoundPlay = true;
|
|
|
+ }
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 显示截图成功对话框
|
|
|
+ *
|
|
|
+ * @param path
|
|
|
+ */
|
|
|
+ private void toastScreenShotPreview(final String path) {
|
|
|
+ BitmapFactory.Options options = new BitmapFactory.Options();
|
|
|
+ options.inJustDecodeBounds = false;
|
|
|
+ options.inPreferredConfig = Bitmap.Config.RGB_565;
|
|
|
+ options.inDither = true;
|
|
|
+ Bitmap bitmap = BitmapFactory.decodeFile(path);
|
|
|
+
|
|
|
+ CDialog.Builder builder = new CDialog.Builder(this);
|
|
|
+ View view_picture = LayoutInflater.from(NewCameraPlayActivity.this).inflate(R.layout.dialog_camera_cutpicture, null);
|
|
|
+ ImageView cutPicture = (ImageView) view_picture.findViewById(R.id.camera_cutpicture);
|
|
|
+ TextView cutPicture_text = (TextView) view_picture.findViewById(R.id.camera_cutpicture_text);
|
|
|
+ cutPicture_text.setText("预览"); //设置标题
|
|
|
+ cutPicture.setImageBitmap(bitmap); //设置图片
|
|
|
+ builder.setView(view_picture);
|
|
|
+ builder.setCancelable(false);
|
|
|
+ builder.setPositiveButton(getResources().getString(R.string.device_socket_capture_save), new DialogInterface.OnClickListener() {
|
|
|
+ @Override
|
|
|
+ public void onClick(DialogInterface dialog, int which) {
|
|
|
+ File file = new File(path);
|
|
|
+ File imgPath = new File(FunPath.PATH_PHOTO + File.separator
|
|
|
+ + file.getName());
|
|
|
+ if (imgPath.exists()) {
|
|
|
+ Toast.makeText(NewCameraPlayActivity.this,R.string.device_socket_capture_exist,Toast.LENGTH_SHORT).show();
|
|
|
+ } else {
|
|
|
+ FileUtils.copyFile(path, FunPath.PATH_PHOTO + File.separator
|
|
|
+ + file.getName());
|
|
|
+ Toast.makeText(NewCameraPlayActivity.this,R.string.device_socket_capture_save_success,Toast.LENGTH_SHORT).show();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ builder.setNegativeButton(getResources().getString(R.string.device_socket_capture_delete), new DialogInterface.OnClickListener() {
|
|
|
+ @Override
|
|
|
+ public void onClick(DialogInterface dialog, int which) {
|
|
|
+ FunPath.deleteFile(path);
|
|
|
+ Toast.makeText(NewCameraPlayActivity.this,R.string.device_socket_capture_delete_success,Toast.LENGTH_SHORT).show();
|
|
|
+ dialog.dismiss();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ builder.show();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onDeviceAddedSuccess() {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onDeviceAddedFailed(Integer errCode) {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onDeviceRemovedSuccess() {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onDeviceRemovedFailed(Integer errCode) {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onAPDeviceListChanged() {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onLanDeviceListChanged() {
|
|
|
+
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ protected void onDestroy() {
|
|
|
+
|
|
|
+ stopMedia();
|
|
|
+
|
|
|
+ // FunSupport.getInstance().removeOnFunDeviceOptListener(this);
|
|
|
+
|
|
|
+// if ( null != mFunDevice ) {
|
|
|
+// FunSupport.getInstance().requestDeviceLogout(mFunDevice);
|
|
|
+// }
|
|
|
+
|
|
|
+ /* if (null != mHandler) {
|
|
|
+ mHandler.removeCallbacksAndMessages(null);
|
|
|
+ mHandler = null;
|
|
|
+ }*/
|
|
|
+
|
|
|
+ super.onDestroy();
|
|
|
+ }
|
|
|
+
|
|
|
+}
|