ii
This commit is contained in:
parent
39af7e815e
commit
5092d120a7
|
@ -126,7 +126,7 @@ public class BluetoothChatFragment extends Fragment {
|
||||||
mChatService.stopBT();
|
mChatService.stopBT();
|
||||||
}
|
}
|
||||||
Log.d(TAG, "onDestroy()");
|
Log.d(TAG, "onDestroy()");
|
||||||
|
doUnbindService();
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,7 @@ public class MainActivity extends FragmentActivity {
|
||||||
transaction.commit();
|
transaction.commit();
|
||||||
}
|
}
|
||||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||||
|
|
||||||
ComponentName componentName = startService(new Intent(this, BluetoothChatService.class));
|
ComponentName componentName = startService(new Intent(this, BluetoothChatService.class));
|
||||||
if (componentName == null)
|
if (componentName == null)
|
||||||
Log.e(TAG, "componentName == null");
|
Log.e(TAG, "componentName == null");
|
||||||
|
@ -119,4 +120,11 @@ public class MainActivity extends FragmentActivity {
|
||||||
Log.i(TAG, "Ready");
|
Log.i(TAG, "Ready");
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDestroy() {
|
||||||
|
stopService(new Intent(this, BluetoothChatService.class));
|
||||||
|
|
||||||
|
super.onDestroy();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue