notifications

Close android Notification

点点圈 提交于 2020-01-24 03:30:53
问题 i have create notification when service start but i have not idea how to close that notification when service stop or on destroy. have any idea. following code that start notification when service start. String ns = Context.NOTIFICATION_SERVICE; final int KEEPUS_NOTIFICATION_ID = 1; NotificationManager mNotificationManager = (NotificationManager) context.getSystemService(ns); Notification notification = new Notification(R.drawable.notification_icon1, ticker_text, System.currentTimeMillis());

How clear Android Notification PendingIntent

痴心易碎 提交于 2020-01-24 01:30:11
问题 I got a Activity which creates an alarm. The alarm calls a Broadcast Receiver. In on Receive i create a Notification with the extras from the Activity (ID, Title, Content). The Alarm triggers the Broadcast Receiver creates the notification well. But when i re install the application or install a newer version and setup a new Alarm with a new title and content the receiver shows me the first create notification intent. i can create may Alarm triggers all works but they show always the first

Dismiss Heads Up notification and create a normal one

旧时模样 提交于 2020-01-23 09:15:56
问题 I'm using this code to create a Heads Up notification. private static void showNotificationNew(final Context context,final String title,final String message,final Intent intent, final int notificationId, final boolean isHeaderNotification) { NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(context.getApplicationContext()) .setSmallIcon(R.drawable.prime_builder_icon) .setPriority(Notification.PRIORITY_DEFAULT) .setCategory(Notification.CATEGORY_MESSAGE)

How to send push notifications to multiple devices using php script using FCM?

浪子不回头ぞ 提交于 2020-01-23 05:43:07
问题 I'm new to push notifications using FCM from php to Android devices. From android side I have generated FCM reg_id & send it over php script & store into mysql database. Now, I would like to send notifications from php script to multiple android devices simultaneously. Here is the php scripts that are used during sending push notifications : 1.firebase.php (reference link) <?php class Firebase { // sending push message to single user by firebase reg id public function send($to, $message) {

Is there a way to configure PuTTY or other terminal to flash the taskbar on next output to stdout?

冷暖自知 提交于 2020-01-23 05:22:20
问题 I'm specifically looking for a solution for PuTTY but also interested for other terminal emulators, like Gnome Terminal. My thought is it would be useful if I start a tar zxvf to be able to set a trigger on the terminal emulator, minimize it, and on next output to stdout/stderr I get a notification in the task bar that the command has finished. 回答1: This works for me: echo -e "\a" Then update your PuTTY session to use the Visual Bell, and set "Taskbar/caption indication on bell" to Flashing

Local Notification every specific day of week

戏子无情 提交于 2020-01-23 02:38:11
问题 I need to create a local notification for a specific time (example at 18.00) fired every working day of week (not Saturday and Sunday) but I can't find examples or tutorial. I want use with swift2.1. How can I create this notification? My problem is define the firedate correctly of the notification 回答1: You can use NSDateComponents to create the exact date for your local notification. Here is the example, how do we create local notification with exact fire date: NSDate *now = [NSDate date];

Notification with setGroupSummary(true) is not visible in Android N

懵懂的女人 提交于 2020-01-22 18:51:54
问题 Tried to show 3 notification in cluster format. As per the doc, I added the setGroupSummary(true) property for the first notification.But in the result i have got only two notification. The notification which is added the GroupSummary property is not visible. NotificationCompat.Builder firstNotification = createNotification(context,"1.Message","Here you go 1"); firstNotification .setGroupSummary(true); firstNotification .setGroup("KEY_NOTIFICATION_GROUP"); NotificationCompat.Builder

Open activity by clicking on the push notification from Parse

此生再无相见时 提交于 2020-01-22 13:54:26
问题 I want to receive a push notification from Parse and open an List activity and use intent.putextra("dataFromParse") before starting the activity. I'm able to receive the push but only open the MainActivity by using this: PushService.setDefaultPushCallback(this, MainActivity.class); ParseInstallation.getCurrentInstallation().saveInBackground(); I want to have this as the default, but should also be able to start the List activity. I have also tried using a customer receiver, but then I'm only

Open activity by clicking on the push notification from Parse

柔情痞子 提交于 2020-01-22 13:52:07
问题 I want to receive a push notification from Parse and open an List activity and use intent.putextra("dataFromParse") before starting the activity. I'm able to receive the push but only open the MainActivity by using this: PushService.setDefaultPushCallback(this, MainActivity.class); ParseInstallation.getCurrentInstallation().saveInBackground(); I want to have this as the default, but should also be able to start the List activity. I have also tried using a customer receiver, but then I'm only

Tapping on a bundled notification doesn't trigger the PendingIntent

倖福魔咒の 提交于 2020-01-22 11:46:28
问题 So in Nougat multiple notifications from the same app get automatically bundled into a group. I'm setting a PendingIntent with some extras on my notifications and if a specific notification is tapped, it launches a specific activity (deep linking). However, if I tap on the notification bundle (i.e. without expanding the group) my app is simply launched as if it was from the launcher - i.e. its intent is empty, there are no extras (it is not launched via the provided PendingIntent). How can I