notification

Local and Push Notifications in IOS 9 and 10 using swift3

匿名 (未验证) 提交于 2019-12-03 01:55:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I developed local Notifications in iOS 10 . It is working perfectly. But now how should i code local notifications and push notification if user is using iOS 9 and above versions. Can anyone help please? Below is code in iOS 10 import UIKit import UserNotifications @available(iOS 10.0, *) class ViewController: UIViewController,UNUserNotificationCenterDelegate { override func viewDidLoad() { super.viewDidLoad() if #available(iOS 10.0, *) { //Seeking permission of the user to display app notifications UNUserNotificationCenter.current()

Notifications fail to display in Android Oreo (API 26)

匿名 (未验证) 提交于 2019-12-03 01:52:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I get this message when trying to display a notification on Android O. Use of stream types is deprecated for operations other than volume control The notification is straight from the example docs, and displays fine on Android 25. 回答1: Per the comments on this Google+ post : those [warnings] are currently expected when using NotificationCompat on Android O devices ( NotificationCompat always calls setSound() even if you never pass in custom sound). until the Support Library changes their code to use the AudioAttributes version of setSound ,

android phonegap notification status bar shows nothing

匿名 (未验证) 提交于 2019-12-03 01:49:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to display a notification msg on android simulator device by using Phonegap plugin called StatusBarNotification , LINK , I followed the instrucations to the word, but when I deploy my application nothing shows in the status bar, What's confusing me is I do not know where to put my notficiation syntax call which is: window.plugins.statusBarNotification.notify("Put your title here", "Put your message here"); What should I do to fix this? 回答1: what about this: Click me! Put this code into your web page. 文章来源: android phonegap

FCM - Setting badge in onMessageReceived

匿名 (未验证) 提交于 2019-12-03 01:48:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have an Android application, where I'm using some method to show notification number on app icon. Now I want to set that number when notification is received. I thought that I should set the number when notification received so I set it inside onMessageReceived method. But, my problem is when my app is in background, onMessageReceived method not called, so the notification number isn't set. Following is my code. I set the number inside onMessageReceived . I already tested setBadge method and can verify that it is working. The

How to check which notifications are active in status bar in Android Dev?

匿名 (未验证) 提交于 2019-12-03 01:48:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have made an app that sets notifications in the drop-down status bar of Android phones. However, there is a bug in my code (sometimes the notifications are set, sometimes they are not). I want to be able TO CHECK (in the code) IF THE NOTIFICATION IS VISIBLE TO THE USER. (i.e. can the user see the notification in the status bar?). How can I do this? (Thanks in advance). Sample code is greatly appreciated. 回答1: I want to be able TO CHECK (in the code) IF THE NOTIFICATION IS VISIBLE TO THE USER. (i.e. can the user see the

Android Notification Channel sounds stop working when using sound URIs that reference resource ids

匿名 (未验证) 提交于 2019-12-03 01:42:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: We have created notification channels for devices running on Oreo and above, that use a custom notification sound that is located in our /res/raw folder. Recently, when users upgraded our app, the notification sound just stopped working and the notification only vibrates the device. We have confirmed that uninstall/reinstall or clearing app data resolves the issue. However, in order to get notification sounds to work for everyone again without having to reinstall, we need to essentially delete and recreate these channels. We create the

Default notification background color

匿名 (未验证) 提交于 2019-12-03 01:39:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a custom notification that uses a LinearLayout that contains an ImageView and a TextView . Before Android 4.0 all I needed to do was swap out the text colors with the EventContent and EventContent.Title styles and all the colors looked great. But on Android 4.0 (Ice Cream Sandwich) my custom notification background color is a light gray, and to make matters worse it clashes horribly with the default text styles. This is strange to me, since all the other notifications have a dark-gray (almost black) color, and I haven't changed the

How to implement push notification for xamarin android

匿名 (未验证) 提交于 2019-12-03 01:39:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I tried to follow the tutorial: Push notifications to Xamarin.Android (the iOS part works already) But I get the following error at build time: The "ProcessGoogleServicesJson" task was not given a value for the required parameter "ResStringsPath". ServiceToolStandard.Android What I have so far: I've created a firebase project FirebaseConsole: downloaded the google-services.json file copied the legacy server key Azure: created notification hub inserted the legacy server key Xamarin Forms App (Android): AndroidManifest package name == package

Firebase Notification not working in background

匿名 (未验证) 提交于 2019-12-03 01:36:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I need help. Firebase Notifications is Not Working in Background. This is My Code: @Override public void onMessageReceived(RemoteMessage remoteMessage) { Log.d(TAG, "FROM:" + remoteMessage.getFrom()); sharedPreference = getSharedPreferences(Global.SECURETRADE, 0); UID = sharedPreference.getString(Global.ID, ""); Uri defaultSoundUri=RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION)`enter code here`; NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this); if (android.os.Build.VERSION.SDK_INT >=

Firebase push notification with custom sound (Flutter)

匿名 (未验证) 提交于 2019-12-03 01:34:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm currently using firebase messaging cloud to push notification for my app. I'm trying to make a custom notification sound for the push notification. I believe that it can be done by putting "sound: blabla.mp3" inside the payload, but how do i define the sound inside dart page? 回答1: you can do this simply by calling the sound and playing it in the firebase configure method. widget . _firebaseMessaging . configure ( onMessage : ( Map < String , dynamic > message ) async { print ( 'on message $message' ); AudioCache player = new