Question

As part of the free SmartWatch promotion I got a watch from Sony and have published an app for it. It is called SoundCheck and is found through the LiveWare Manager on the Google Play Market. A customer recently sent email for support. They installed Sound Check but did not see it on the watch since widgets are not enabled by default when they are installed. Is there any way to programmatically enable a widget when an app is installed? It might be nice for users if the widget was enabled by default rather than force them to navigate through the LiveWare manager to find the setting. This would be quite helpful for "widget-only" apps like Sound Check that do not have a control extension.

This week I created a pro version of my SmartWatch app to actually change the values displayed by the widget. Is it possible to open a control extension from a widget extension? Here is the use case. Short taps navigate through different screens of the widget. I want to use the long tap event type on the widget to open the 'editing' function in the control extension. Is this possible?

Thanks in advance for your help with these questions.

Was it helpful?

Solution

The question of how to enable a widget programmatically is still open. Here is code to open the control from a widget. This answer helped: How should I do to start SmartWatch Extension from the program code?

if (type == Widget.Intents.EVENT_TYPE_SHORT_TAP) {
    updateWidget();
} else {
    //this code will launch the control and allow the user to change volume settings?
    Intent intent = new Intent(Control.Intents.CONTROL_START_REQUEST_INTENT);
    intent.putExtra(Control.Intents.EXTRA_AEA_PACKAGE_NAME, "com.mezcode.soundcheckpro");
    intent.setPackage(mHostAppPackageName);
    mContext.sendBroadcast(intent, Registration.HOSTAPP_PERMISSION);
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top