I am trying to start an activity from a watchface in Android Wear on a click using:
Intent myIntent = new Intent(this, com.jorc.android.wearable.watchface.watchface.MainActivity.class);
getApplicationContext().startActivity(myIntent);
However, I get this error.
Error:(564, 39) error: no suitable constructor found for Intent(DigitalWatchFaceService.Engine,Class<MainActivity>)
constructor Intent.Intent(String,Uri) is not applicable
(argument mismatch; DigitalWatchFaceService.Engine cannot be converted to String)
constructor Intent.Intent(Context,Class<?>) is not applicable
(argument mismatch; DigitalWatchFaceService.Engine cannot be converted to Context)
My question is: "Is there a way to start an activity from a watchface"? Watchface uses CanvasWatchFaceService.Engine which extends CanvasWatchFaceService.