waleedAhmad1 / google-glass-api

Automatically exported from code.google.com/p/google-glass-api
0 stars 0 forks source link

App is forced to exit when Glass overheats #471

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
[XE12]

When the device overheats (e.g. when I use the camera/display a lot), the 
system forces my app to exit. This is unacceptable for the fully immersive 
apps. It would be better if Glass device management layer managed the power 
consumption bette (e.g. not start the app if resources are already under heavy 
use)

Original issue reported on code.google.com by eug...@wearableintelligence.com on 16 Apr 2014 at 6:53

GoogleCodeExporter commented 9 years ago
Hello,

While this is unfortunate, it is actually working as intended and part of 
Android's process management:
  http://developer.android.com/reference/android/app/Activity.html#ProcessLifecycle

Best,
Alain

Original comment by ala...@google.com on 16 Apr 2014 at 7:56

GoogleCodeExporter commented 9 years ago
Would it be possible to register a callback that notifies me that device is 
heating up? I can then use this callback to shutdown some of the services 
gracefully

Original comment by eug...@wearableintelligence.com on 18 May 2014 at 10:54

GoogleCodeExporter commented 9 years ago
You should be able to get the information that your app is being forced killed 
with the Activity#onDestroy() callback:
  http://developer.android.com/reference/android/app/Activity.html#onDestroy()

Original comment by ala...@google.com on 19 May 2014 at 4:01

GoogleCodeExporter commented 9 years ago
I'd have to check if it is me closing it. That's very cumbersome. Is there
a way to get the reason/source of closing?

Original comment by eug...@wearableintelligence.com on 19 May 2014 at 4:14