notifications

Getting 400 Bad Request Error for MSGraph's create subscription api [Error Code - ExtensionError]

自作多情 提交于 2020-07-08 00:45:31
问题 Trying to create a subscription to get a channel for msgraph one drive notifications for file creation/upload. I am hitting the URL - https://graph.microsoft.com/v1.0/subscriptions with proper headers and the following body - { "changeType": "updated", "notificationUrl": "https://xxxxx.xxxxxxxxx.com/zzzz/qwertqwert", "resource": "/users/{user-id}/drive/root", "expirationDateTime": "2017-02-18T19:49:40.000Z", "clientState": "justsomerandomstring" } I am getting the following response : 400 Bad

Getting 400 Bad Request Error for MSGraph's create subscription api [Error Code - ExtensionError]

点点圈 提交于 2020-07-08 00:45:06
问题 Trying to create a subscription to get a channel for msgraph one drive notifications for file creation/upload. I am hitting the URL - https://graph.microsoft.com/v1.0/subscriptions with proper headers and the following body - { "changeType": "updated", "notificationUrl": "https://xxxxx.xxxxxxxxx.com/zzzz/qwertqwert", "resource": "/users/{user-id}/drive/root", "expirationDateTime": "2017-02-18T19:49:40.000Z", "clientState": "justsomerandomstring" } I am getting the following response : 400 Bad

Keeping notification from dismissing when service is destroyed in Oreo

流过昼夜 提交于 2020-07-05 03:29:29
问题 Okay. I had a question regaurding keeping Media Player Services in Android Oreo. Based on the discussion here: Android Oreo: Keep started background service alive without setting it foreground (but with a notification)? It seems the proper way to handle Media player services in Android Oreo is to store state information when the media player is paused so if it is destroyed, pressing play will create a new media player and start where it left off. My question is how do I create a notification

Android samsung custom notification heads up view

偶尔善良 提交于 2020-06-29 14:08:45
问题 When notifications from some applications are displaying on Samsung S8 Touchwiz there is a custom view with nice animation and ellipsized text. For example message notifications in Telegram. Any ideas how to make my notification work like this on samsung? Tried all parameters in NotificationCompat.Builder but no success yet. Thanks. It look's like this: 回答1: I managed to figure out how you can make the notifications appear in such way on Samsung devices. The Samsung have "Edge lighting"

Android samsung custom notification heads up view

岁酱吖の 提交于 2020-06-29 14:03:17
问题 When notifications from some applications are displaying on Samsung S8 Touchwiz there is a custom view with nice animation and ellipsized text. For example message notifications in Telegram. Any ideas how to make my notification work like this on samsung? Tried all parameters in NotificationCompat.Builder but no success yet. Thanks. It look's like this: 回答1: I managed to figure out how you can make the notifications appear in such way on Samsung devices. The Samsung have "Edge lighting"

Chrome web extension not showing notification even though it is working fine in Firefox

感情迁移 提交于 2020-06-29 04:59:08
问题 I have a simple call to the chrome.notifications.create(id,options) function and I have checked the arguments ten times already. The id argument is a string. The options argument is an object like this: {type:"basic",message:"message",title:"message",iconUrl:chrome.extension.getURL("icons/icon.png")} It is only working in Firefox though. Edge Opera and Chrome all fail to display the notification. Edge just crashes! I've checked everything. There are no errors and the iconUrl is correct. Also

Swift Local push notification action view

亡梦爱人 提交于 2020-06-25 06:30:40
问题 I'm trying to create a notification with two possible action buttons like "Quick reply" and "Cancel", but I can't find any code examples for this. Please could someone explain how to do this in Swift 3. 回答1: It's difficult to give a precise example of what you are looking for. Here's a quick UNUserNotificationCenter implementation with an action. import UserNotifications Define a category ID constant private let categoryID = "Category" Setup and register UNUserNotificationCenter // MARK: -

Swift Local push notification action view

匆匆过客 提交于 2020-06-25 06:30:26
问题 I'm trying to create a notification with two possible action buttons like "Quick reply" and "Cancel", but I can't find any code examples for this. Please could someone explain how to do this in Swift 3. 回答1: It's difficult to give a precise example of what you are looking for. Here's a quick UNUserNotificationCenter implementation with an action. import UserNotifications Define a category ID constant private let categoryID = "Category" Setup and register UNUserNotificationCenter // MARK: -

Notification multiline

浪子不回头ぞ 提交于 2020-06-22 06:53:49
问题 How to make a long notification multiline. I am using the below code snippet but its not working: NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context) .setContentTitle(title) .setSmallIcon(R.drawable.icon) .setStyle(new NotificationCompat.BigTextStyle().bigText(message)) .setContentText(message) .setContentIntent(pIntent); return mBuilder.build(); 回答1: Add this : NotificationCompat.Builder builder = new NotificationCompat.Builder( context); Notification notification =

Notification multiline

两盒软妹~` 提交于 2020-06-22 06:53:15
问题 How to make a long notification multiline. I am using the below code snippet but its not working: NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context) .setContentTitle(title) .setSmallIcon(R.drawable.icon) .setStyle(new NotificationCompat.BigTextStyle().bigText(message)) .setContentText(message) .setContentIntent(pIntent); return mBuilder.build(); 回答1: Add this : NotificationCompat.Builder builder = new NotificationCompat.Builder( context); Notification notification =