1

When using setContentIntent() to add a default action to a notification, the action shows on old versions of Android Wear, but not on the 2.0 update. The action shows as "Open in phone" on the old versions, but no action appears at all on the new version.

Sample code:

Intent callIntent= new Intent(Intent.ACTION_DIAL, Uri.parse("tel:555123456"));
PendingIntent pendingIntent=
PendingIntent.getActivity(MainActivity.this, 0, callIntent,0);

Notification notificacion = new NotificationCompat.Builder(MainActivity.this)
    .setSmallIcon(R.mipmap.ic_launcher)
    .setContentTitle("Title")
    .setContentIntent(pendingIntent)
    .build();

Did anything else change in the 2.0 version that means we have to do extra steps to have this functionalities work or are they no longer supported? The exact same code is working as intended on Wear 1.x

The same happens with setBackground() added to a WearableExtender.

Jesús Tomás
  • 338
  • 3
  • 10
  • `setContentIntent()` is still supported for AW 2.0 (see [here](https://developer.android.com/wear/preview/features/notifications.html)). There weren't any advise or notices as to additional steps AFAIK. Have you tested this out on multiple AW devices? I'm thinking this is possibly a device specific issue. – AL. May 02 '17 at 10:46
  • >Have you tested this out on multiple AW devices? I have used only the AVD. – Jesús Tomás May 22 '17 at 10:50
  • I have exactly the same problem. I don't own any wear device, I'm testing with the Wear emulator (Android 7.1). Does anyone know how to trigger the ContentIntent action on a Wear 2.0 device? Is some part of the notification supposed to be clickable? – BladeCoder Jul 21 '17 at 11:51

0 Answers0