Disable stopping the service if it wasnot explicitelly requested by user.
--- a/src/com/beem/project/beem/BeemService.java Sun Jan 06 18:27:57 2013 +0100
+++ b/src/com/beem/project/beem/BeemService.java Wed Nov 28 13:51:45 2012 +0100
@@ -218,7 +218,9 @@
public boolean onUnbind(Intent intent) {
Log.d(TAG, "ONUNBIND()");
if (mConnection != null && !mConnection.getAdaptee().isConnected()) {
- this.stopSelf();
+ // Disable stopping the service if it was not explicitely requested by the user
+ // by changing status or disconnect
+ // this.stopSelf();
}
return true;
}
--- a/src/com/beem/project/beem/service/XmppConnectionAdapter.java Sun Jan 06 18:27:57 2013 +0100
+++ b/src/com/beem/project/beem/service/XmppConnectionAdapter.java Wed Nov 28 13:51:45 2012 +0100
@@ -577,7 +577,9 @@
Intent intent = new Intent(BeemBroadcastReceiver.BEEM_CONNECTION_CLOSED);
intent.putExtra("message", exception.getMessage());
mService.sendBroadcast(intent);
- mService.stopSelf();
+ // Disable stopping the service if it was not explicitely requested by the user
+ // by changing status or disconnect
+ // mService.stopSelf();
resetApplication();
}
--- a/src/com/beem/project/beem/utils/BeemBroadcastReceiver.java Sun Jan 06 18:27:57 2013 +0100
+++ b/src/com/beem/project/beem/utils/BeemBroadcastReceiver.java Wed Nov 28 13:51:45 2012 +0100
@@ -86,7 +86,9 @@
if (intent.getBooleanExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, false)) {
Toast.makeText(context, context.getString(R.string.BeemBroadcastReceiverDisconnect),
Toast.LENGTH_SHORT).show();
- context.stopService(new Intent(context, BeemService.class));
+ // Disable stopping the service if it was not explicitely requested by the user
+ // by changing status or disconnect
+// context.stopService(new Intent(context, BeemService.class));
}
}
}