No se puede iniciar el intento de servicio {act=android.intent.action.VIEW...}

Well, I've got a problem here... I'm willing to start the web browser via a notification.
Here's what I've got :

notifIntent = new Intent(Intent.ACTION_VIEW);
                Uri u = Uri.parse("http://www.google.com");
                notifIntent.setData(u);
                pendingIntent = PendingIntent.getService(context, 0, notifIntent, PendingIntent.FLAG_UPDATE_CURRENT);
                notification = buildNotification(context, pendingIntent, "MY TITEL",
                        "Heres some text", false, false);
                notificationManager.notify(NOTIF_ID, notification);

So, it seems ok to me but still... I'm having a faulous "unable to start service blah blah.."

I really don't know how to solve this since this service is a Google service, not created by me !

Gracias !

preguntado el 28 de agosto de 12 a las 15:08

1 Respuestas

Utilice las

PendingIntent.getActivity 

en lugar de

PendingIntent.getService

Respondido 28 ago 12, 15:08

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.