Code example for DatagramChannel

Methods: close

0
    } 
 
    @Override 
    protected void onDestroy() { 
        try { 
            mChannel.close();
        } catch (IOException e) {
        } 
        super.onDestroy(); 
    } 
 
    @Override 
    protected void onResume() { 
        super.onResume(); 
        mSensorManager.registerListener(this, mSensorManager.getDefaultSensor(Sensor.TYPE_GRAVITY),
                SensorManager.SENSOR_DELAY_GAME);
        new DiscoverTask().execute();
    } 
 
    @Override 
    protected void onPause() {