android-notifications

    0熱度

    1回答

    我剛剛在我的Android應用中實施了FCM推送通知,我收到一個奇怪的行爲,因爲它似乎只在應用打開時加載剪影圖標,但當它關閉時或最小化我得到一個白色的圓圈。我認爲它向我展示了ic_launcher圖標,而不是我的ic_stat_white圖標。我在photoshop中創建了我的基本圖標,並使用Android Asset Studio獲取所有尺寸(https://romannurik.github.

    2熱度

    2回答

    隨着Android的26(O)引入通知渠道我一直在調查谷歌提供的com.example.android.notificationchannels 此示例按預期工作,直到我試圖添加一個Action到示例應用中定義的輔助通知。 我的代碼類似於此: - /** * Build notification for secondary channel. * * @param ti

    2熱度

    2回答

    是否有任何方式通過編程方式在應用程序通知中打開橫幅設置(在狀態欄頂部顯示)? <pre><code> // send notification to NotificationManager Notification.Builder notificationBuilder =new Notification.Builder(context); notificationBuilder.setSm

    1熱度

    1回答

    我看到,應用程序可以請求通知訪問,其中聲明他們可以關閉應用程序通知和類似的東西。但是,這是什麼意思?就像在應用程序中如何解除應用程序通知和類似的東西一樣。

    0熱度

    3回答

    已解決,謝謝大家的貢獻。 這是我用來向用戶顯示通知的函數。但是,由於某種原因,它看起來像通知不會被刪除了......不知道爲什麼。請注意,變量通知被初始化爲: public static int NOTIFICATION = 1; public void displayNotification(String title, String message, Intent intent) {

    2熱度

    1回答

    我正在嘗試顯示Android應用的通知。通知在通知區域中完美顯示,但即​​使將優先級設置爲「最大」後也不會顯示heads up notification。 這裏是我的通知建設者 Intent intent = new Intent(this, MainActivity.class); PendingIntent pIntent = PendingIntent.getActivity(th

    0熱度

    1回答

    我想爲我的Android應用程序創建交互式通知,如iOS中的應用程序:https://news.dueapp.com/ios-10-notifications-one-step-forward-one-step-back-fe712469184e。我知道android從Jellybean推出了交互式通知功能(4.1) 我的問題是:我可以在交互式通知中定義多少個動作? 在此先感謝。

    0熱度

    1回答

    我想使用服務每小時或特定秒顯示本地通知,我試圖實現此功能,但是我沒有取得成功。 我的代碼看起來像下面 AlarmManager alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE); Intent notificationIntent = new Intent("android.media.acti

    0熱度

    2回答

    我有一個顯示通知的服務,通知在Android 6.0和之前版本中可用,但它不會在7.0中顯示。 相關代碼: NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE); PendingIntent pendingIntentMain = Pe

    0熱度

    1回答

    我希望在更新ListView時通知用戶通知。在我的應用中,管理員發佈消息,並且應該通知用戶有關該消息。我怎樣才能做到這一點? 在Android Docs的幫助下,我能夠構建通知,但無法在我的應用中實現它。請指導我。 我用於通知該代碼在我的應用程序的活動之一: mBuilder = (NotificationCompat.Builder) new NotificationCompat.Bu