Anybody knows whether I can put control event in NotificationExtension in SmartWatch?
For example: if the notification is appear, I can swipe it down to delete it.
I have tried to add onSwipe:
public void onSwipe(int direction) {
switch (direction) {
case Control.Intents.SWIPE_DIRECTION_UP:
break;
case Control.Intents.SWIPE_DIRECTION_LEFT:
break;
case Control.Intents.SWIPE_DIRECTION_DOWN:
//something todo, forexample:
Toast.makeText(this, "Action 1", Toast.LENGTH_LONG).show();
break;
case Control.Intents.SWIPE_DIRECTION_RIGHT:
break;
default:
break;
}
}
In that sample code, I didn't receive the toast. I don't know where can I implement the control for the notification, so I thought with onSwipe I can handle the control in NotificationExtension. Anybody knows correct solution?Thank You