мой исходный код https://developer.android.com/training/wearables/notifications/creating.htmlViewEventActivity.class не распознается
в этом примере кода вторая часть NotificationCompat работает как charm..but у меня есть этот код в MainActivity.class и он дает ошибку, что «ViewEventActivity.class не признается»
Теперь то, что это ViewEventActivity.class, куда добавить и как реализовать эту
фрагмент кода ::
int notificationId = 001;
// Build intent for notification content
Intent viewIntent = new Intent(this, ViewEventActivity.class);
viewIntent.putExtra(EXTRA_EVENT_ID, eventId);
PendingIntent viewPendingIntent =
PendingIntent.getActivity(this, 0, viewIntent, 0);
NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_event)
.setContentTitle(eventTitle)
.setContentText(eventLocation)
.setContentIntent(viewPendingIntent);
// Get an instance of the NotificationManager service
NotificationManagerCompat notificationManager =
NotificationManagerCompat.from(this);
// Build the notification and issues it with notification manager.
notificationManager.notify(notificationId, notificationBuilder.build());
Любые предложения будут иметь большую помощь
Спасибо @ ρяσѕρєя K какой контент мы должны будем добавить в этом классе – Prabs
@PrathibhaKirthi: любая информация, которую вы хотите показать , для тестирования просто добавьте нормальный макет с TextView –
Отличная помощь ρяσѕρєя K ... дайте мне мгновение .. сделайте свое предложение – Prabs