Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CharSequence contentText = "Capturing Route: " + highestRoute;
- Notification notification = new Notification();
- RemoteViews contentView = new RemoteViews(getPackageName(), R.layout.captureroutenotification);
- contentView.setImageViewResource(R.id.notificationIcon, R.drawable.ic_menu_capture);
- contentView.setTextViewText(R.id.notificationTitle, getString(R.string.app_name));
- contentView.setTextViewText(R.id.notificationText, contentText);
- notification.contentView = contentView;
- Intent notificationIntent = new Intent(getThis, CaptureRouteActivity.class);
- PendingIntent contentIntent = PendingIntent.getActivity(getThis, 0, notificationIntent, 0);
- notification.contentIntent = contentIntent;
- NotificationManager notificationManager = (NotificationManager) getSystemService(ns);
- notificationManager.notify(CAPTURING_ROUTE, notification);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement