notifications

Unable to Handle Local Notification when app has been terminated

主宰稳场 提交于 2021-02-20 02:48:34
问题 The app that I have made keeps track of Goals and Milestones(which belong to a goal) and reminds the user when they are about to reach the due date of a goal or a milestone through a UILocalNotification my app has been successful in handling local notifications when the app is in a background state and when the app is in the foreground. I am aware that if you want to handle local notifications when they are received when the app is terminated you are required to access the local notification

Unable to Handle Local Notification when app has been terminated

浪尽此生 提交于 2021-02-20 02:47:10
问题 The app that I have made keeps track of Goals and Milestones(which belong to a goal) and reminds the user when they are about to reach the due date of a goal or a milestone through a UILocalNotification my app has been successful in handling local notifications when the app is in a background state and when the app is in the foreground. I am aware that if you want to handle local notifications when they are received when the app is terminated you are required to access the local notification

setColor small icon notification android

时光总嘲笑我的痴心妄想 提交于 2021-02-19 07:58:12
问题 I change the top color of the icon and the app name by using setColor method of the NotificationCompat.Builder, The problem is that the displayed color doesn't match the provided one as it gets darker in the notification. my color is #21bbe6 I did find out Android N notification title and icon color is darker, but I still don't understand why, and how to deal with it. https://imgur.com/a/6nx4EsA 回答1: Google decided to restrict acceptable colors in Notification when using setColor. It's

Minimise Python to System Tray and Generate Notifications? [duplicate]

╄→尐↘猪︶ㄣ 提交于 2021-02-18 16:43:58
问题 This question already has an answer here : What's the simplest way to put a python script into the system tray (Windows) (1 answer) Closed 7 years ago . I've had a look around but haven't been able to find anything to get close to doing what I want. I want to make my Python script launch as a minimised system tray application or have the ability to minimise to system tray and also have the ability to make system tray notifications Any one have any ideas/libraries or examples? Thanks - Hyflex

Notification bring app to front without change activity

家住魔仙堡 提交于 2021-02-18 04:36:41
问题 I want to create notification that when it clicked will bring my app to front but without changing (reload or navigate out) the last activity that was shown. I tried: setContentIntent(PendingIntent.getActivity(context, 0, new Intent(context, MainActivity.class), Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT)) But in the new Android 4.3 the application brought to front, but its also start a new instance of MainActivity , and I don't want this. I want that my app will continue from the last activity

Notification action icon didn't show

独自空忆成欢 提交于 2021-02-16 17:51:52
问题 I try to show a notification in Android, and use the code from this Link. In some source people said that the icon should be totally white and some source said I should use .png instead of vector . I try all of this ways but no one didn't help me. I try this code: Notification newMessageNotification = new Notification.Builder(mContext) .setSmallIcon(R.drawable.ic_message) .setContentTitle(getString(R.string.title)) .setContentText(getString(R.string.content)) .addAction(action)) .build(); 回答1

Customizing the background of an Android notification tile

一笑奈何 提交于 2021-02-16 14:34:33
问题 I noticed that one of my Android apps has set a custom background for its notification tile, as you can see in the screenshot below: How did this application set a custom background for its notification? How can I achieve the same thing in my own application? 来源: https://stackoverflow.com/questions/49804120/customizing-the-background-of-an-android-notification-tile

Reduce database write on notification system or change approbate database?

两盒软妹~` 提交于 2021-02-11 13:50:49
问题 We have a web app which requires to send lots of notifications to users (over 1,000,000 notifications per day). We use Laravel and MySQL for the database. I loop through a group of users send notifications and save it to the database. Let's say if I want to send a group of 1000 users. The data will be written to the DB 1000 time. As I said, we have over 1,000,000 notifications per day, which take so many resources. What's the appropriate way to approach this problem? I should change to a new

Heads up notification not showing in android O and higher

独自空忆成欢 提交于 2021-02-11 13:10:37
问题 I literally have tried everything seriously every method and every snippet but still, I was not able to show heads-up notifications on Chinese brand devices. so yesterday I thought why not try it again but after all again still I'm not able to show heads-up notification until I manually goto the app into the settings and give floating permission for the app. Now most of you may say why not to navigate the user to the setting when he/she first opens up the app but nobody likes that even there

How to filter out previously seen and read activities while retrieving notifications?

折月煮酒 提交于 2021-02-10 19:00:46
问题 In my app We have notification feed for users, with grouping formula {{ verb }}_{{ time.strftime('%Y-%m-%d') }} When User1 notifications are retrieved, it is having 1 notification for a “like” action. “Like” notification is having 3 activities, means three users have liked user1’s post. So Notification text displayed is: 3 users likes your post User1 notification are marked read and seen, After that 2 more users like user1’s post. Now when user1 retrieve notifications, He will get 1