notification

chrome.notifications.update() or create()

匿名 (未验证) 提交于 2019-12-03 01:18:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want my chrome extension to take a notification.id , and: Update an existing notification if it does exist. OR Create a new notification if it doesn't exist. Calling clear() then create() is not ideal, since the animation is visually jarring for both remove() and create() methods, where I want to update without animations. Plus, obviously, calling update() on a disappeared notification doesn't do anything. Is there an easy way to implement this? 回答1: Edit: This approach no longer works on any platform except ChromeOS due to the removal of

Push Notification -didFinishLaunchingWithOptions

匿名 (未验证) 提交于 2019-12-03 01:12:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When I send a push notification and my app is open or in the background and I click on the push notification, my application redirects to PushMessagesVc viewController ( as intended ) I use the code as below for this: -(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { UIStoryboard *mainstoryboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil]; PushMessagesVc *pvc = [mainstoryboard instantiateViewControllerWithIdentifier:@"PushMessagesVc"]; [self.window.rootViewController

Firebase notification is not working when activity is in background or not

匿名 (未验证) 提交于 2019-12-03 01:11:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have same coding as provided by firebase sample code. It works fine when activity is in foreground state or opened. But when activity is closed or in background state then it does not work properly. Problem is like that... App icon is not shown of application. By default take app name as a title of notification And when app is in background state or not opened on device that time notification occurs then LogCat shows following details : 09-16 15:55:56.056 12113-12113/com.testdemofb D/FirebaseApp: com.google.firebase.auth.FirebaseAuth is

Firebase Messaging - Create Heads-Up display when app in background

匿名 (未验证) 提交于 2019-12-03 01:10:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: With FCM I receive push notifications in the system tray when the app is in the background or not running. When the app is in the foreground I can override onMessageReceived and create my own heads-up notification with NotificationCompat . Is there a way to create a heads-up notification when my app is in the background or not running? Thanks EDIT: For reference here is the message payload I am using via curl to https://fcm.googleapis.com/fcm/send { "to" : "push-token" , "content_available" : true , "priority" : "high" ,

Get notification when file added to File Share

匿名 (未验证) 提交于 2019-12-03 01:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Is there a way to get notified when a new file is added/modified to Azure File Share? Similar feature exists with AWS S3 where one can configure an S3 bucket to send message to SQS or SNS or Lambda (or other) when a new File is added. An alternative (though less preferred) is to be able to query files in a share such that only modified/new files after date X will be returned. 回答1: For getting notifications on addition/modification of blobs (not files), you have multiple options available: Azure Functions (w/ Blob Storage Binding) : In this

How to receive iOS notifications in background without user interaction

匿名 (未验证) 提交于 2019-12-03 01:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have use following methods to receive notifications in AppDelegate . When user is on foreground notification receives as expected. But if user is on background notification will receive(in AppDelegate) notification only if user tapped a popup. How to receive notification without involving user tap when app running on background. - ( void ) userNotificationCenter :( UNUserNotificationCenter *) center willPresentNotification :( UNNotification *) notification withCompletionHandler :( void (^)( UNNotificationPresentationOptions

Android GPS proximity alert not working

匿名 (未验证) 提交于 2019-12-03 01:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to set up the most basic proximity alert, but nothing seems to happen. I'm fairly new to Android programming, so please let me know what I'm doing wrong or what am I missing. I got inspired from some source codes out here and this one . Here's my code: package com.example.proximityalert; import android.location.LocationManager; import android.os.Bundle; import android.app.Activity; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; public class

Notification bar - when clicked, how to open file explorer with specified location

匿名 (未验证) 提交于 2019-12-03 01:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I did a major update of my question because some misunderstandings. So, I have a notification. And when I click that notification, I want the file explorer app (third party app of course) opens. No matter whuch app is, if there's more than on file explorers, it should prompt the "open with" - and then open /sdcard/folder (if possible) My notification it's here on Listar.class NotificationManager manager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); Notification notification = new Notification(R.drawable.ic_menu_save

Launch activity when user taps on a notification from the lockscreen

匿名 (未验证) 提交于 2019-12-03 01:00:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I want to be able to tap on a notification when the device is locked and launch an activity without unlocking the device. I added some flags to the activity in the onCreate() method that allow the activity to be displayed when the device is locked: Window window = this . getWindow (); window . addFlags ( WindowManager . LayoutParams . FLAG_DISMISS_KEYGUARD ); window . addFlags ( WindowManager . LayoutParams . FLAG_SHOW_WHEN_LOCKED ); window . addFlags ( WindowManager . LayoutParams . FLAG_TURN_SCREEN_ON ); window . addFlags (

StartForeground Bad Notification Error

匿名 (未验证) 提交于 2019-12-03 01:00:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to use a while loop in order to update a notification every second. However on 2.3.3 & below, it crashes with these logcat errors: 08-14 07:30:17.394: E/AndroidRuntime(501): FATAL EXCEPTION: main 08-14 07:30:17.394: E/AndroidRuntime(501): android.app.RemoteServiceException: Bad notification for startForeground: java.lang.IllegalArgumentException: contentIntent required: pkg=com.package.name id=77 notification=Notification(vibrate=null,sound=null,defaults=0x4,flags=0x40) The problem is even when I check Build.VERSION, the code