0

嗯,我有一個問題在這裏...我願意通過通知啓動Web瀏覽器。
下面是我有:無法啓動服務Intent {act = android.intent.action.VIEW ...}

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); 

因此,它似乎確定我也...我有一個faulous「無法啓動服務等等等等..」

我真的不知道如何解決這個問題,因爲這項服務是Google服務,不是由我創建的!

謝謝!

回答

3

使用

PendingIntent.getActivity 

,而不是

PendingIntent.getService 
+0

以及感謝夥計!缺點愚蠢的錯誤 – Cehm

相關問題