第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

通過標(biāo)準(zhǔn) SDK 在 Android 8 上顯示應(yīng)用圖標(biāo)徽章

通過標(biāo)準(zhǔn) SDK 在 Android 8 上顯示應(yīng)用圖標(biāo)徽章

喵喵時(shí)光機(jī) 2021-10-13 15:51:04
根據(jù)https://developer.android.com/training/notify-user/badges 從 Android 8 開始,操作系統(tǒng)允許設(shè)置應(yīng)用程序圖標(biāo)通知徽章,但我無法讓它工作。            NotificationManagerCompat nm = NotificationManagerCompat.from(activityContext);            if (Build.VERSION.SDK_INT >= 26) {                NotificationChannel nc = new NotificationChannel("ab", "chanelName", NotificationManager.IMPORTANCE_DEFAULT);                nc.setDescription("A chanel description here");                nc.setShowBadge(true);                NotificationManager nmm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);                nmm.createNotificationChannel(nc);            }            NotificationCompat.Builder nb = new NotificationCompat.Builder(App.instance, "ab");            nb.setSmallIcon(R.drawable.accept_icon);            nb.setTicker("here is the ticker");            nb.setContentText("Here content text");            nb.setContentTitle("Here content title");            nb.setNumber(5);            nb.setBadgeIconType(NotificationCompat.BADGE_ICON_SMALL);            nm.notify(1, nb.build());我正在使用 Nexus 6P 和 android 8.1 。它在系統(tǒng)欄中顯示通知,但不在應(yīng)用程序圖標(biāo)上顯示徽章。我錯(cuò)過了什么?
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 242 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)