0

I have written a control extension for Sony's SmartWatch. I want to start it by sending a CONTROL_START_REQUEST_INTENT. This works fine when the watch is "active" as in displaying either a clock face or my extension. If the watch is not connected to the charger it will pause my extension eventually, even if I use it to control the screen state explicitly.

Sending a CONTROL_START_REQUEST_INTENT will result in onResume() being called, but the display of the watch doesn't change. The extension's onTouch() method is also being called for touch events, so I am fairly sure that the extension is in its "normal" working state. How can I get the watch to display my extension?

UPDATE: I have found a "solution" to this problem, though I can't imagine this to be the correct way to do it. At the end of my onResume() method I place another startRequest(). I found out this works by manually sending start requests after the extension was paused. It is beyond me why it would work like that though, which is why I would prefer to not accept it as an answer.

UPDATE2: Turns out my solution isn't so great, just as I expected. After the second startRequest() it appears the AHA just starts a second control extension.

1 Answers1

0

Sorry, but I cannot reproduce your problems. 1) Sending a START_REQUEST when the watch is inactive will still start the extension and put it in the foreground. And 2), when setting screen state to e.g. SCREEN_STATE_ON will leave the extension in the foreground.

Can you be a little bit more specific - e.g.

it will pause my extension eventually

How long do you get to have your extension in the foreground?

Are you sure that you are taking control of the screen state, i.e. setting the state to e.g. SCREEN_STATE_ON? SCREEN_STATE_AUTO will not give you what you need.

And a little more information on correctly sending a START_REQUEST here.

Community
  • 1
  • 1
Jerker
  • 805
  • 4
  • 9