I've got this very weird situation. I program my Sony SmartWatch, and use a Handler to schedule tasks. When I activate the app the Handler schedules a task which gets called a few seconds after the app activation.
But the Handler fails when the phone goes to sleep. The thing I don't get is that even though the phone is asleep, my SmartWatch app functions correctly, except for scheduling the mentioned task. As I understand, this means that the smart extension service is actually alive in the phone although the phone is asleep. So why doesn't the Handler work either?
Your help will be much appreciated!
Here is an example of the code:
static msgbox(String txt) {
showBitmap(txtToBitmap(txt));
// mHandler is global and was created by mHandler = new Handler();
mHandler.postDelayed(new Runnable() {
@Override
public void run() {
showBitmap(mOriginalBitmap); // "closes" the message
}
}, 3000); // in 3 seconds the message box will be closed
}