| | |
| | | import android.support.v4.app.ActivityCompat; |
| | | import android.widget.Toast; |
| | | |
| | | import com.callBack.IAddCamera; |
| | | import com.common.openapi.ClassInstanceManager; |
| | | import com.lechange.demo.tools.MediaPlayHelper; |
| | | import com.mm.android.deviceaddmodule.CommonParam; |
| | |
| | | import com.usermodule.net.IUserDataCallBack; |
| | | import com.usermodule.net.UserNetManager; |
| | | |
| | | import org.greenrobot.eventbus.EventBus; |
| | | import org.greenrobot.eventbus.Subscribe; |
| | | import org.greenrobot.eventbus.ThreadMode; |
| | | |
| | | public class HdlToLcUtils { |
| | | |
| | | private Activity activity; |
| | | private Activity activity; |
| | | private String homeId; |
| | | private String token; |
| | | private String subAccessToken; |
| | | private IAddCamera iAddCamera; |
| | | |
| | | public Activity getActivity() { |
| | | public Activity getActivity() { |
| | | return activity; |
| | | } |
| | | |
| | |
| | | // mUrl = CONST.Envirment.CHINA_TEST.url; |
| | | // ProviderManager.getAppProvider().setAppType(0); |
| | | // } else { |
| | | // mAppSecret = "017fc27bb987496f9a677e4e6f0c88"; |
| | | // mAppid = "lc0285433bc7e8423d"; |
| | | // mUrl = CONST.Envirment.OVERSEAS_PRO.url; |
| | | // secretKey = "017fc27bb987496f9a677e4e6f0c88"; |
| | | // appKey = "lc0285433bc7e8423d"; |
| | | // url = CONST.Envirment.OVERSEAS_PRO.url; |
| | | ProviderManager.getAppProvider().setAppType(1); |
| | | // } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | public void addCamera() { |
| | | public void addCamera(IAddCamera iAddCamera) { |
| | | if(!EventBus.getDefault().isRegistered(this)){ |
| | | EventBus.getDefault().register(this); |
| | | } |
| | | //开启添加页面 |
| | | activity.startActivity(new Intent(activity.getApplication(), DeviceAddActivity.class)); |
| | | |
| | | } |
| | | |
| | | @Subscribe(threadMode = ThreadMode.MAIN) |
| | | public void onGetMessage(String obj) { |
| | | if(obj.equals("backXamarin")){ |
| | | iAddCamera.back(); |
| | | |
| | | if(EventBus.getDefault().isRegistered(this)){ |
| | | EventBus.getDefault().unregister(this); |
| | | } |
| | | } |
| | | } |
| | | |
| | | public void play(String deviceId){ |