Skip to content

Instantly share code, notes, and snippets.

@yakdere
Created April 1, 2015 00:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yakdere/21dcaa2f1256233d902b to your computer and use it in GitHub Desktop.
Save yakdere/21dcaa2f1256233d902b to your computer and use it in GitHub Desktop.
Wearables
void sendLocalNotification() {
PendingIntent pendingIntent = PendingIntent.getActivity(this, id , launcherIntent, 0);
Notification notification = new NotificationCompat.Builder(this)
.setContentTitle(title)
.setContentText(body)
.setSmallIcon(_icon_small)
.setLargeIcon(_icon_large)
.addAction(R.drawable.action, “action title”, pendingIntent).build();
NotificationManagerCompat.from(this).notify(id, notification);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment