Thanks to above posts, here's the main lines - distilled from the longer code answers - that are necessary to connect a notification with click listener set to open some app Activity.
private Notification getNotification(String messageText) {
Notification.Builder builder = new Notification.Builder(this);
builder.setContentText(messageText);
// ...
Intent appActivityIntent = new Intent(this, SomeAppActivity.class);
PendingIntent contentAppActivityIntent =
PendingIntent.getActivity(
this, // calling from Activity
0,
appActivityIntent,
PendingIntent.FLAG_UPDATE_CURRENT);
builder.setContentIntent(contentAppActivityIntent);
return builder.build();
}