So fügen Sie eine Dynamische Bild anstelle von Benachrichtigungs-Symbol in android?

Ich folgenden code für die Anzeige von Benachrichtigungen in der notification Bar.

es geklappt hat.

Aber ich muss display notification icon dynamisch, das sich aus dem web-service.

Wie kann ich das machen?

NotificationManager nm = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);

Notification note = new Notification(R.drawable.image,"status message", System.currentTimeMillis());

        Intent in = new Intent(Notify.this,CommentU.class);
        PendingIntent pi = PendingIntent.getActivity(Notify.this, 0, in, 0);
        note.setLatestEventInfo(Notify.this,"NotificationTitle", "You have a new Commentio", pi);
        note.number = ++count;
        note.vibrate = new long[] { 500l, 200l, 200l, 500l };
        note.flags |= Notification.FLAG_AUTO_CANCEL;
        nm.notify(NOTIFY_ME_ID, note);

Vielen Dank im Voraus.

InformationsquelleAutor user2159475 | 2013-04-01
Schreibe einen Kommentar