I'm brand new to android (let alone android wear) development and I have something like this in my watchface tap handler:
Uri.Builder builder = CalendarContract.CONTENT_URI.buildUpon();
builder.appendPath("time");
ContentUris.appendId(builder, startMillis);
Intent intent = new Intent(Intent.ACTION_VIEW)
.setData(builder.build())
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
On tap I get the No application can handle this action message.
Of course, the Agenda app is there, and I have installed a few other calendar apps (eg google).
String's answer is definitely the more correct way of doing this in general. However, on a Moto360, I looked into what activity is being launched when the Agenda app is started. Starting from that I've managed to get the code:
ComponentName component = new ComponentName("com.google.android.wearable.app", "com.google.android.clockwork.home.calendar.AgendaActivity");
Intent intent = new Intent()
.setComponent(component)
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
to work to achieve what you are after.
WARNING: Launching any app this way is actually asking for trouble. Just note that the other application can change package names, activities can get renamed, etc which would all break this way of launching activities. However, failing a good way to launch the app you want with generic Intent
s, this might be one way to do it.