私はアンドロイドを使い慣れました。そして、Android携帯電話上の通知を表示するために、私は、コードアプリビューで通知回数を表示する方法android
Intent intent = new Intent(this, MainActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 /*Request code*/ , intent,
PendingIntent.FLAG_ONE_SHOT);
Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.mytune_default)
.setContentTitle("FCM Message")
.setContentText(messageBody)
.setAutoCancel(true)
.setSound(defaultSoundUri)
.setContentIntent(pendingIntent);
NotificationManager notificationManager =
(NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
int m = (int) ((new Date().getTime()/1000L) % Integer.MAX_VALUE);
notificationManager.notify(m /*ID of notification*/ , notificationBuilder.build());
の下にこれを得た。しかし事は、私はちょうどシステム上のコードAPPVIEWにその通知未読数をしたいが、通知に表示され、他のものロークメッセージ、タイトルなどをたくありませんさシステムトレイ。どのようにこれに慣れてください>
loke?また、私はあなたが尋ねようとしていることを本当に理解していません。 – Nabin
私はちょうどappviewの通知カウントを表示したいが、電話 – user7424166