| | |
| | | package com.basic.security.fragment; |
| | | |
| | | import android.content.Intent; |
| | | import android.view.View; |
| | | |
| | | import com.alfeye.a1io.DeviceControl; |
| | | import com.basic.security.R; |
| | | import com.basic.security.base.BaseApplication; |
| | | import com.basic.security.base.BaseFragment; |
| | | import com.basic.security.manager.impl.cblite.AccountManager; |
| | | import com.basic.security.utils.Constants; |
| | | |
| | | import org.androidannotations.annotations.AfterViews; |
| | | import org.androidannotations.annotations.Click; |
| | |
| | | login, |
| | | logout, |
| | | admin_msg, |
| | | call, |
| | | menu; |
| | | |
| | | List<View> toolbarButtons = new ArrayList<>(); |
| | | |
| | | public static void openWebRtc() { |
| | | Intent launchIntent = BaseApplication.getApplication().activity.getPackageManager().getLaunchIntentForPackage("org.appspot.apprtc"); |
| | | if (launchIntent != null) { |
| | | launchIntent.putExtra("ip", "0.0.0.0"); |
| | | launchIntent.putExtra("cameraIndex", "1"); |
| | | launchIntent.putExtra("isServer", "true"); |
| | | launchIntent.putExtra("orientation", "portrait"); |
| | | launchIntent.putExtra("localCameraRotation", "270"); |
| | | launchIntent.putExtra("remoteCameraRotation", "0"); |
| | | BaseApplication.getApplication().activity.startActivity(launchIntent); |
| | | } |
| | | } |
| | | |
| | | @AfterViews |
| | | public void afterViews() { |
| | |
| | | login, |
| | | logout, |
| | | admin_msg, |
| | | call, |
| | | menu)); |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | @Click |
| | | public void update_apk() { |
| | | // UpdateApk.installApk("/sdcard/download/"+Constants.updateApkFileName); |
| | | DeviceControl.startInstallApk( |
| | | BaseApplication.getApplication(), |
| | | "com.basic.security", |
| | | "/sdcard/download/" + Constants.updateApkFileName, |
| | | true, |
| | | true |
| | | ); |
| | | } |
| | | |
| | | @Click |
| | | public void call() { |
| | | // if (1==1) { |
| | | // Intent launchIntent = new Intent(mainActivity(), ConnectActivity.class); |
| | | // if (launchIntent != null) { |
| | | // launchIntent.putExtra("ip", "0.0.0.0"); |
| | | // launchIntent.putExtra("cameraIndex", "1"); |
| | | // launchIntent.putExtra("isServer", "true"); |
| | | // launchIntent.putExtra("orientation", "portrait"); |
| | | // launchIntent.putExtra("localCameraRotation", "270"); |
| | | // launchIntent.putExtra("remoteCameraRotation", "90"); |
| | | // startActivity(launchIntent); |
| | | // } |
| | | // return; |
| | | // } |
| | | // throw new RuntimeException("a"); |
| | | openWebRtc(); |
| | | } |
| | | |
| | | } |