I wrote my first Android app and am now wondering if I did something wrong...
It's an app that just receives bluetooth messages so it mostly runs in the background. Now my colleague told me that after maybe 2 hours of using my app there is an error message (I think it's the The application <task name> has stopped unexpectedly message) and the app is closed.
Not all of the users have the problem.
So... I assume that it happens when Android tries to close the app because of memory issues. I can't find out, what should ideally happen when an app is closed. Just nothing? Or is it common that there is an error message? Or is it bad coding?
I'm afraid it's the last one...
I use a BroadcastReceiver which is listening to BluetoothAdapter.ACTION_STATE_CHANGED, maybe that's the source of that error.
But I'm not sure. If someone knows something - please tell me.