This might be a really simple question, but I can't seem to find an answer to it.
I created a watch face for Wear OS 2.0 and all I need to do is start an app like Flashlight or some other third party app on the watch when I tap the watch face. I know the code has to go here:
@Override
public void onTapCommand(int tapType, int x, int y, long eventTime) {
switch (tapType) {
case TAP_TYPE_TAP:
**Code to start an app goes here**
break;
default:
super.onTapCommand(tapType, x, y, eventTime);
break;
}
invalidate();
I'm also pretty sure that I have to use an Intent and startActivity() to do it. I just have no idea how.
Any help or code sample is appreciated.