I need to create alerts with two buttons (Analogue in VK, when the request for adding friends comes). Googling, found this:
Notification n = new Notification.Builder(this) .setContentTitle("New mail from " + "test@gmail.com") .setContentText("Subject") .setSmallIcon(R.drawable.icon) .setContentIntent(pIntent) .setAutoCancel(true) .addAction(R.drawable.icon, "Call", pIntent) .addAction(R.drawable.icon, "More", pIntent) .addAction(R.drawable.icon, "And more", pIntent).build(); The problem is that by creating this way, an error is displayed. Eclipse doesn't even suggest using addAction.