Android - Error en notificacion de barra de estado

 
Vista:

Error en notificacion de barra de estado

Publicado por Alberto (1 intervención) el 17/12/2012 14:34:24
Hola!

Cree una notificacion para la barra de estado

Anda muy bien con el Activity principal, pero con un Activity secundario que cree en el proyecto me da un error "The application... has stopped unexpectdly. Please try again. (Force Close)".
¿Alguien sabe?


Notification notification = new Notification(R.drawable.ic_launcher, "Reproductor", System.currentTimeMillis());
Intent intent = new Intent(this, Reproductor.class);
PendingIntent pendingIntent = PendingIntent.getActivity(getApplicationContext(), 0, intent, 0);
notification.setLatestEventInfo(getApplicationContext(), "Reproductor", "Reproductor esperando...", pendingIntent);
((NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE)).notify(0, notification);



Gracias
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder