How To Show A Screen If Sony Smartwatch Is Locked
How to show a screen in sony smartwatch 2 when screen is locked like we does with a call application. even if the screen is locked when we receive a call it shows upfront. I am abl
Solution 1:
To start a ControlExtension on SmartWatch2, there is a startRequest
command, which can be sent this way:
protectedvoidstartRequest() {
Intent intent = new Intent(Control.Intents.CONTROL_START_REQUEST_INTENT);
sendToHostApp(intent);
}
where
protectedvoidsendToHostApp(final Intent intent){
ExtensionUtils.sendToHostApp(mContext, mHostAppPackageName, intent);
}
mContext
is the Context of your activity or service, from where you are sending the commandmHostAppPackageName
is the name of the invoked device host application, in this case for SmartWatch2:"com.sonymobile.smartconnect.smartwatch2"
This command will start and show the ControlExtension
, which is registered in your application.
Post a Comment for "How To Show A Screen If Sony Smartwatch Is Locked"