public void onServiceBind(FtcRobotControllerService service) { DbgLog.msg("Bound to Ftc Controller Service"); controllerService = service; updateUI.setControllerService(controllerService); callback.wifiDirectUpdate(controllerService.getWifiDirectStatus()); callback.robotUpdate(controllerService.getRobotStatus()); requestRobotSetup(); }
@Override protected void onStart() { super.onStart(); // save 4MB of logcat to the SD card RobotLog.writeLogcatToDisk(this, 4 * 1024); Intent intent = new Intent(this, FtcRobotControllerService.class); bindService(intent, connection, Context.BIND_AUTO_CREATE); utility.updateHeader( Utility.NO_FILE, R.string.pref_hardware_config_filename, R.id.active_filename, R.id.included_header); callback.wifiDirectUpdate(WifiDirectAssistant.Event.DISCONNECTED); entireScreenLayout.setOnTouchListener( new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { dimmer.handleDimTimer(); return false; } }); wifiLock.acquire(); }