| | |
| | | import androidx.appcompat.content.res.AppCompatResources; |
| | | |
| | | import android.Manifest; |
| | | import android.content.Intent; |
| | | import android.content.pm.PackageManager; |
| | | import android.os.Bundle; |
| | | import android.os.Process; |
| | |
| | | import com.hdl.photovoltaic.bean.MqttInfo; |
| | | import com.hdl.photovoltaic.config.UserConfigManage; |
| | | import com.hdl.photovoltaic.databinding.ActivityMyPowerStationBinding; |
| | | import com.hdl.photovoltaic.internet.HttpServer.MyNanoHttpServer; |
| | | import com.hdl.photovoltaic.internet.HttpServer.MyNanoHttpService; |
| | | import com.hdl.photovoltaic.listener.CloudCallBeak; |
| | | import com.hdl.photovoltaic.other.HdlDeviceLogic; |
| | | import com.hdl.photovoltaic.other.HdlLogLogic; |
| | |
| | | |
| | | @Override |
| | | public void onBindView(Bundle savedInstanceState) { |
| | | |
| | | //初始化 |
| | | initView(); |
| | | //初始化界面监听器 |
| | |
| | | initMqttClient(); |
| | | |
| | | |
| | | //实例化 获取ip 地址 |
| | | MyNanoHttpServer.getInstance(AppManagerUtils.getAppManager().getIPAddress(this)); |
| | | // MyNanoHttpServer.getInstance("127.0.0.1"); |
| | | Intent intent = new Intent(); |
| | | intent.setClass(this, MyNanoHttpService.class); |
| | | //启动服务监听 |
| | | startService(intent); |
| | | } |
| | | |
| | | private void initEvent() { |