언어 설정

Menu
Sites
Language
[wearable] Not able to open the app using Status notification in tizen wearable 2.3.2

Hi,

I'm kind of new to Tizen Web application development. I'm trying to create a simple status notification. And when I tap the notification in the notification area, it opens up another screen (outside the app) with the same content. I want to open the application which created the notification and display some content. Any help would be really appreciated. Thanks in advance.

Edited by: John Ixion on 18 7월, 2017
답변 바로가기

Responses

4 댓글
Armaan-Ul- Islam

StatusNotification has attributes called appId and appControl along with other useful attributes.

https://developer.tizen.org/development/api-references/web-application?redirect=/dev-guide/latest/org.tizen.web.apireference/html/device_api/wearable/tizen/notification.html#StatusNotification

 

appId attribute can be used to launch an application with it's application Id.

appControl attribute can be used to launch an application control operation.

 

Sample app launch using appId with notification code snippet:

 

var myappId = tizen.application.getAppInfo().id;    // The app posting the notification 
var otherAppId = "org.tizen.clocksetting ";        //'settings' appId for example

var notificationDict =
   {
      content: "Notification App Launch",
      vibration: true,
      appId: myappId             // or otherAppId
   };

var notification = new tizen.StatusNotification("SIMPLE", "Simple notification", notificationDict);
tizen.notification.post(notification);

 

 

For more advanced appControl you can check these Guides:

https://developer.tizen.org/development/guides/web-application/application-management/application-information-and-controls/application-controls

https://developer.tizen.org/development/guides/web-application/application-management/application-information-and-controls/application-controls/common-application-controls

 

 

 

 

Krishna Rohit

Hi,

Thanks for the reply. I tried with a code similar to the one mentioned above but still it doesn't open the app.

Please find the screenshots here:

When notification appears:

res.cloudinary.com/dssjniwed/image/upload/v1500378425/W-2.3.2-circle-2017-07-18-124147_zpgytq.png

After clicking:

res.cloudinary.com/dssjniwed/image/upload/v1500378425/W-2.3.2-circle-2017-07-18-124203_dwhmht.png

When the notification appears: I tap on the notification (it appears with a notification count from the app) it opens a details screen with same content as the notification but doesn't open the app.

Please let me know if I'm going wrong anywhere. Thanks in advance.

Mark as answer
Armaan-Ul- Islam

You are not going wrong here. My finding is such problem occurs in Tizen Emulators only, When you deploy the app to real Gear Device it works just fine.

AppId or AppControl is not working in Emulators.

 

Screenshot of notification on my GearS3 device:

 

But for Wearable Emulator, the Screenshot is same as your's for the same notification.

Krishna Rohit

Thanks for the reply. Will try to test it in the real device.