notification

HTML5 Notification not working in Mobile Chrome

匿名 (未验证) 提交于 2019-12-03 03:03:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using the HTML5 notification API to notify the user in Chrome or Firefox. On desktop browsers, it works. However in Chrome 42 for Android, the permission is requested but the notification itself is not displayed. The request code, works on all devices: if ('Notification' in window) { Notification.requestPermission(); } The sending code, works on desktop browser but not on mobile: if ('Notification' in window) { new Notification('Notify you'); } 回答1: Try the following: navigator.serviceWorker.register('sw.js'); Notification

Cancel Banner Notification in iOS8 Not Working

匿名 (未验证) 提交于 2019-12-03 03:03:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: My title might not accurately depict my question, so I apologize. I have looked for a solution to creating this level of functionality but I am unable to find it. I am creating a VoIP application for iOS 8. When a user receives a call I am displaying a notification with a 12 second ringtone. While this notification is in progress if the call disconnects I want the Incoming Call notification to disappear and display a Missed Call notification immediately. This level of functionality is possible because Viber does it. Currently, I am sending a

React Native Push Notification for Android

匿名 (未验证) 提交于 2019-12-03 03:03:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: We have stuckup with android push notification in react-native for past 2 weeks and also we have tried with following react native module https://www.npmjs.com/package/react-native-push-notification With above module, we are able to get local notification ( static from app ), that is working but notification from server is not displaying. we have tried " https://github.com/oney/react-native-gcm-android " this also .. Able to register with GCM and get token from GCM but using that registered token ,Cannot get Notification and we are using php

StartForeground for IntentService

匿名 (未验证) 提交于 2019-12-03 02:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have an IntentService and I want to make it sticky with an ongoing notification. The problem is that the notification appears and then disappears immediately. The service continues running. How should I use startForeground in an IntentService? @Override public int onStartCommand(Intent intent, int flags, int startId) { super.onStartCommand(intent, flags, startId); Notification notification = new Notification(R.drawable.marker, "Notification service is running", System.currentTimeMillis()); Intent notificationIntent = new Intent(this,

iOS - best practice to send incoming call notifications on VoIP app

匿名 (未验证) 提交于 2019-12-03 02:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: The first solution I can think of for the incoming call notification is Apple's Push Notification service. However, it is not guaranteed.. there's a relatively high chance it may get lost.. and in a VoIP app, the incoming call notification is so important that I can't afford to miss it too often... Thus, I followed the tips and enabled the Background Mode to keep the app alive and listening to any incoming call invite. By right, I should just show local notification when the app gets the incoming call invite. This works pretty well when the

setLatestEventInfo() can not resolve in Android Studio

匿名 (未验证) 提交于 2019-12-03 02:52:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am working in Android Studio and trying to generate notification on Specific date and time. All are going right but, In my Service class setLatestEventInfo() method can not be resolved. I have done same demo in eclipse and there is no any issue with eclipse. I don't want to generate notification on any Button's click or any manual event generation but on specific date and time as I specified. Code for Service class is as follows : public class MyRemiderService extends Service { private NotificationManager mManager; @Override public IBinder

Heads-up Notification - Android Lollipop

匿名 (未验证) 提交于 2019-12-03 02:51:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm trying to show a notification-type heads-up but I could not. What I tried final Notification . Builder notif = new Builder ( getApplicationContext ()) . setContentTitle ( getString ( R . string . title )) . setContentText ( getString ( R . string . text )) // .setTicker(getString(R.string.tick)) removed, seems to not show at all // .setWhen(System.currentTimeMillis()) removed, match default // .setContentIntent(contentIntent) removed, I don't neet it . setColor ( Color . parseColor ( getString ( R . color . yellow ))) //ok .

NotificationChannel issue in Android O

匿名 (未验证) 提交于 2019-12-03 02:50:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am getting a toast saying "Developer warning for package com.google.android.apps.messaging" when sending an MMS using Android Messages ver 2.3.063. In logs 08-12 16:57:52.368 7661 7682 W Notification: Use of stream types is deprecated for operations other than volume control 08-12 16:57:52.368 7661 7682 W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case 08-12 16:57:52.369 1604 3146 E NotificationService: No Channel found for pkg=com.google.android

How to Schedule Notification in Android [duplicate]

匿名 (未验证) 提交于 2019-12-03 02:44:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: This question already has an answer here: How to schedule a task using Alarm Manager 4 answers I'm trying to set notification for a time in the future. I have the code for creating a notification but I can't find an option to schedule it. How can I schedule notifications? 回答1: You need to use PendingIntent and BroadCastReceiver for this - public void scheduleNotification(Context context, long delay, int notificationId) {//delay is after how much time(in millis) from current time you want to schedule the notification NotificationCompat

How to detect Remote notification in didFinishLaunchingWithOption application method in objective c?

匿名 (未验证) 提交于 2019-12-03 02:41:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: when app in not in background mode ,inactive mode and app is completely closed. than how to detect is their any notification using application's delegate "didFinishLaunchingWithOption" method. i have searched a lot about it but not get anything. please help . Thanks 回答1: Below methods is used for notifiaction - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { UILocalNotification *notification = [launchOptions objectForKey:UIApplicationLaunchOptionsLocalNotificationKey]; if