FAQ Database Discussion Community


How to set a conditional based on multiple models?

ruby-on-rails,ruby,model-view-controller,notifications,conditional
notifications/index has <%= render partial: "notifications/notification", collection: @notifications %>, which contains: <% if Comment.find_by(notification.comment_id) == @habit %> <%= link_to "your habit", habit_path(notification) %> <% else %> <%= link_to "your value", valuation_path(notification) %> <% end %> which shows gives the error for the 1st line: Couldn't find Habit with 'id'= even...

How to make push notification with specific sound?

android,audio,notifications
I'm working on android app with system of notifications and i need the android device to push the notification with a specific sound i stored on assets folder this is my java code for notification : Notification noti = new Notification.Builder(MainActivity.this) .setTicker("Calcupital") .setContentTitle("Calcupital") .setContentText("User Information has been updated successfully") .setSmallIcon(R.drawable.login)...

Android GCM notification not displayed on device

android,notifications,broadcastreceiver,android-gcm
I'm trying to add push notification to my android app. Everything seems ok : Sender id is ok device is correctly registered to my database notification is correctly sent to GCM server (success:1) Broadcast receiver correctly receives the message (i see it trough the Eclipse console) ... but the notification...

Android: Detect status bar notification click

android,notifications
When my application fires a notification i want a method to be called after the user clicks the notification This's how i create a notification : Intent alarmIntent = new Intent(MainActivity.this, AlarmReceiver.class); alarmIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); Bundle bundle = new Bundle(); PendingIntent pendingIntent; AlarmManager manager = (AlarmManager) getSystemService(Context.ALARM_SERVICE); Date date =...

NSNotification - observer with multiple events to trigger

ios,notifications,observer-pattern
As it stands, NSNotifications allow for a target-action mechanism in response to one post / event. I would like to have a notification which triggers an action (runs a function) only after two events have been triggered. The scenario is that I have two asynchronous processes which need to complete...

Android Notification not shown

android,notifications,android-gcm,android-notifications,android-notification-bar
I wrote an IntentService for GCM Push Notifications. I receive the Messages but something's wrong with displaying my Notification to the user. Here's my Code: import com.google.android.gms.gcm.GoogleCloudMessaging; import android.app.IntentService; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.support.v4.app.NotificationCompat; import android.support.v4.app.TaskStackBuilder; import android.util.Log; public class GcmIntentService extends...

Scheduled Local Notifications showing up when toggled ON for time period when toggled OFF

ios,objective-c,xcode,notifications,uilocalnotification
I have a daily scheduled notification at 8:30:01 PM. When the Notifications are toggled OFF in Settings app for a week, no notifications show up, which is perfect. The problem is when Notifications are toggled back ON in Settings app after that week, all of the Notifications for the previous...

NSURLSessionDataTask when running in background remote notification with content_available =1

ios,background,notifications,push-notification,nsurlsession
My app is sending notifications (like a chat app) that inform the other app that it needs to fetch the message from the server even when it's not in the foreground. I plan an APN to send notification with Content_available=1 and then have the app to call the server to...

Xamarin Forms and PushSharp

notifications,xamarin,pushsharp
I am developing a Xamarin Forms project which targets iOS and Android. Because I want to have push notifications, I came across PushSharp. In this video (around 25 - 30 min): https://www.youtube.com/watch?v=m2txoLvosVw, the developer have a iOS project and a PushSharpServer project where he sends a notification to a certain...

Display both alertTitle and AlertBody on a custom WatchKit notification

xcode,notifications,uistoryboard,watchkit,apple-watch
When I send a local notification to the Apple Watch with both an alertTitle and an alertBody, both fields get displayed on the long look notification. But when I customize this with a Static Notification Controller Interface Scene, the default storyboard in XCode only has one field, which gets populated...

System Notification with JavaScript (Chrome for Android)

javascript,notifications
I've developed a very small and simple chat app with Go and JavaScript. Now I want to make a system notification, if someone sends a message. This works like a charm for all desktop browsers, but on Android I don't get this to work. I've done a search to see...

AlarmManager - How to set a Notification to appear annually

android,notifications,alarmmanager,date-of-birth
I want an notification to appear each year depending on the date entered (Birthday). I have everything else working bar how to set a notification annually. As you can see below I have changed the code to say "HERE" where the intervals go. There are intervals for days and I...

The most efficient notification system for a web application

node.js,websocket,notifications,xmpp
I have VPS hosting for a business application. It has XMPP based chat with Openfire which is working fine. I want a real time notification system as well in our system. I have these options Ajax Long Poll PHP websockets Node.js Using XMPP(Not sure if applicable) Among all the above....

Apple notifications reliability

ios,objective-c,notifications,reliability
Okay so it's pretty obvious that push notifications aren't always reliable, as stated in the docs. Correct me if I'm wrong, it's simply because someone might not have internet for an extended period of time and the notification could for example, expire, or get replaced, or even get lost for...

Setting ContentView when updating a notification eventually freezes up the app? (Android)

java,android,mobile,service,notifications
I have a service that updates a notification every millisecond (stopwatch). It works fine initially, the problem is, the app eventually slows down and stopwatch updates look really laggy. I've pinpointed this issue to the fact that I'm resetting the notification's contentview. If i comment out that code, the timer...

Indexing notifications table in DynamoDB

amazon-web-services,notifications,amazon-dynamodb
I am going to implement a notification system, and I am trying to figure out a good way to store notifications within a database. I have a web application that uses a PostgreSQL database, but a relational database does not seem ideal for this use case; I want to support...

Show notification when switch is on

java,android,notifications
I am having an issue with launching a notification via a switch. I have a switch that can be used to launch my app via the notification. But when I toggle it, the notification doesn't show until I restart the activity. How can I get the notification to show immediately...

How to set :user_id with comment notifications?

ruby-on-rails,ruby,model-view-controller,notifications,comments
Whenever a notification is created how can we set the :user_id for the user who made the comment (and in affect the notification)? When I check rails console for some reason all Notifications are showing up as user_id: 1 when some of them should be user_id: 2 since the latter...

MySql CROSS JOIN between two tables and match with another

php,mysql,notifications
first of all sorry for my bad english. The scenario i have is the following: I am developing a notification services that sends notifications messages to many users. I have the following 3 tables on MySql users(user_id) notifications(notification_id, notification) notifications_log(notification_log_id, notification_id, user_id) Every time that a user read a notification,...

Silent push notifications and iBeacons

ios,notifications,push-notification,ibeacon
I have developed a small iBeacon based application, when the application detects one of our iBeacons makes a call to a web service to obtain a data set and send a local notification to the user. All this is working correctly. I have now raised the idea that these local...

Use sorted set to notifications system

python,notifications,redis,redis-py
I am using redis sorted sets to save user notifications. But as i never did a notification system, I am asking about my logic. I need to save 4 things for each notification. post_id post_type - A/B visible - Y/N checked - Y/N My question is how can I store...

How do I update unread notification counter in the Navigation Drawer?

android,notifications,navigation-drawer
I am currently working on app which will have a notification drawer with 2 sections - A dashboard of status requests (pending, submitted, in process, completed). I have named it DashboardFragment.java A notification center which shows all messages received from the 3rd party Java server(via Google Cloud Messaging server). I...

Android How receive Push notification by using drupal server

android,drupal,drupal-7,notifications
I follow all the steps as tutorial. tutorial android Push notification Drupal Server side work link My device is successfully register on drupal server by using GCM Id. My problem is that , from server when sending push notification it shows 'Successfully send notification' , but this notification is not...

Android notification app not working properly

java,android,notifications,alarmmanager,android-notifications
I'm developing an android app, and part of it involves a notification that reminds the user to do something. This notification at a specified time and repeats every 12 hours. I'm using AlarmManager to schedule the alarm and I've also included the code to start my Alarm Service when the...

Unable to start activity after click on android notification

java,android,android-activity,android-studio,notifications
I know, I am asking repeated question but I have tried everything and read every Q/A on SO. Still unable to start new activity when click on notification. I am using NotificationCompat. Below is my main activity package notification.test.example.com.notificationtest; import android.app.Activity; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import...

GCM defaultSenderID

android,notifications,android-gcm
Could somebody please help me understand what the gcm_defaultSenderId is in the following code (found in onHandleIntent in RegistrationIntentService.java): InstanceID instanceID = InstanceID.getInstance(this); String token = instanceID.getToken(getString(R.string.gcm_defaultSenderId), GoogleCloudMessaging.INSTANCE_ID_SCOPE, null); // [END get_token] Log.i(TAG, "GCM Registration Token: " + token); This is from the Google sample app for implementing GCM into...

How to send notification in background?

java,android,android-intent,notifications,intentservice
I use IntentService to get data from database. This is my code: GetDataService.java public class GetDataService extends IntentService { public GetDataService() { super("GetDataService"); } @Override protected void onHandleIntent(Intent intent) { Parameter parameter = new Parameter(); String data = (new LandSlideHttpClient()).getDeviceData(); try { parameter = JSONLandslideParser.getParameter(data); } catch (JSONException e) {...

android alarm manager does not work after phone is restarted

android,notifications,alarmmanager
i am using following code to alert users using notifications at a specific time about new updates in the app every thing works fine and we receive alerts at the desired time here is the mainactivity.java public void setAlarm(){ alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE); alarmIntent = new Intent(MainActivity.this, AlarmReceiver.class); pendingIntent =...

Cannot delete Notification on Android < 5.0

android,notifications
I create Notifications. For that i use the following Service: public class NFCUploadService extends Service implements MeasureDataPostCallback { private static final int IMAGE_SEND_NFC_SERVICE_ID = 100; private SessionLastMeasureDataPreferences sessionLastMeasureDataPreferences = null; @Override public void onCreate() { super.onCreate(); this.sessionLastMeasureDataPreferences = new SessionLastMeasureDataPreferences(this); } @Override public void onDestroy() { SessionNFCUploadService.getInstance().invalidateInstance(); super.onDestroy(); }...

pubnub realtime notification

php,notifications,real-time,pubnub
I am working on a trading site which allows copy trading feature (that is, a trader copying me will get a trade copied into his account when I do a trade). Now when I do a trade, the trader who is copying me needs to get a realtime notification about...

Passing different Extras to different setDisplayIntent, but same is received

android,android-intent,notifications,android-wear
I am in a case where my Watch application has updated data and will display these data in multiple pages. According to this answer: http://stackoverflow.com/a/30133449/327402 , I created a displayIntent for each one of my page. List extras = new ArrayList(); //This is a loop to create every individual Notification...

Xamarin iOS Local Notifications not working

ios,xamarin,notifications
I've walked through the Xamarin walkthrough on iOS local notifications: http://developer.xamarin.com/guides/cross-platform/application_fundamentals/notifications/ios/local_notifications_in_ios_walkthrough/ And I just can't get it to work. It builds fine, but the ReceivedLocalNotification method on AppDelegate never fires. What am I doing wrong?...

Updating WatchKit app when containing iOS app's data changes

ios,notifications,updates,watchkit
I've been reading the Apple Watch Programming Guide and I made some examples of requesting data from the WatchKit extension to the containing app and getting back the result. But what if I want to communicate in the opposite direction? I mean, let's say I have my iOS app in...

How to detect when user clears your app's notification

ios,objective-c,iphone,notifications,badge
My app has notification feature. When I receive a notification I show a badge in my app icon. As I know, when my app is on background, since user does not clicks on the notification at notification center, my app does not know that it has a notification. So it...

Check if Local Notifications allowed

ios,objective-c,notifications
I'm repeating a Local Notification at the same time every day. Right now everything is working fine, except when Notifications are toggled OFF, then back ON, there is a build up of notifications from the days it was OFF. Is there a best way to check if toggled OFF then...

Starting app only if its not currently running

android,notifications,push-notification,android-pendingintent
I am sending push notification to users which when clicking on it opens the app. My problem is that when the app is already open, clicking on the notification start the app again. I only want it to start the app if its not already running. I am using Pending...

Is it possible to update an ongoing notification after the android app was closed?

android,notifications,android-notifications
I have this Android application with an ongoing notification and there I have a copied text from the user's clipboard. So, what I'd like to do is: Whenever the user copies a new text (when he's NOT in my app), update this text on the notification at the Status Bar....

Create local location based notifications in swift

ios,swift,notifications,location
I'm a relatively new swift developer and I've heard in iOS 8 you can send local notifications based on a users Location. I have had a look at some code, particularly this one to create simple time based local notifications. var leftNotification1:UILocalNotification = UILocalNotification() leftNotification1.alertBody = "NotidicationA" leftNotification1.repeatInterval = NSCalendarUnit.CalendarUnitHour...

Is there an iOS equivalent of NotificationListenerService in Android?

android,ios,notifications
I'm currently working on an application that would communicate with a hardware device which will notify user when receiving any incoming push notifications from any apps, such as Facebook, Twitter, Messages. I have done the Android version already, However, I'm not sure if it is possible in iOS.

iOS Notification Center Registration

ios,objective-c,notifications,uikit,apple-push-notifications
I want to make a game that tests out local notifications. In iOS 8, the code involves these steps: Make a UIMutableUserNotificationCategory object that is the category of custom actions you want to implement. Make up to 4 custom actions by using UIMutableUserNotificationAction instances. Call setActions:forContext: to set up custom...

Why can't I start an Activity from a page Notification on Android Wear?

android,android-intent,notifications,android-wear
I just succesfully created a bunch of pages notifications on my Wear device. The only problem is that the PendingIntent does not seems to start an Activity (which is of course declared in Manifest). Here is my code: List extras = new ArrayList(); Intent viewIntent = new Intent(getApplicationContext(), DetailActivity.class); viewIntent.putExtra("KEY",...

Gtk notifications don't display body holding '<'

python,notifications,gtk,pygobject
I'm trying to display notifications with the Notification module of pygobject (version 3.16) in python. My code works well, except when there is a < in the body message. In this case, the body is not displayed. For example with this code, all is OK: from gi.repository import Gtk, Notify...

Show notification in Adroid 5.0.1

java,android,android-studio,notifications
I want to create a Notification in my Android App, but my code doesn't work! NotificationManager nManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); Notification.Builder nBuilder = new Notification.Builder(this); nBuilder.setContentTitle("Title..."); nBuilder.setContentText("Text..."); nBuilder.setContentInfo("Info?"); nBuilder.setWhen(System.currentTimeMillis()); //Intent notificationIntent = new Intent(this, MainActivity.class); //PendingIntent pendingIntent = new PendingIntent.getActivity(this, 0,...

Resume activity on notification click

android,android-activity,notifications,android-mediaplayer
I am having a problem with resuming activity on notification click. I have an app that plays a single song for some time. The idea is when you play a song, and press Home button, there should be notification that returns you to the app where you can stop the...

Display django runserver output from Vagrant guest VM in host Mac notifications?

python,django,osx,notifications,vagrant
I can think of many ways to skin this cat, and Googling hasn't shown an elegant solution either. Does anyone have an easy / elegant way to forward the output from Django's runserver command in a terminal connected to a guest Vagrant VM to the host to display to Mac's...

Read Notification Bar title, message using Accessibility Service Programmatically

java,android,notifications,accessibilityservice
Using Accessibility Service I am being able to read notification bar title & message, the issue I am facing is when first notification appear I am reading all these perfectly but after first notification & onward I am only getting title & text "you have 2 messages" and so on,...

Android Notification: Intent.FLAG_ACTIVITY_NEW_TASK required?

android,android-intent,notifications
In the document of the Notification class I see this: public PendingIntent contentIntent The intent to execute when the expanded status entry is clicked. If this is an activity, it must include the FLAG_ACTIVITY_NEW_TASK flag, which requires that you take care of task management as described in the Tasks and...

How to show commenting user's id in notifications?

ruby-on-rails,ruby,model-view-controller,notifications
With a little help from my friends I got the user_id to set correctly for Comment & Notification: [2] pry(main)> Comment.find(8) id: 8, content: "test", goal_id: nil, habit_id: nil, valuation_id: 9, quantified_id: nil, commentable_id: nil, commentable_type: nil, user_id: 1, created_at: Thu, 11 Jun 2015 19:57:26 UTC +00:00, updated_at: Thu, 11...

How to send notifications to apple watch without an app for apple watch

ios,notifications,apple-watch
I wanna send notifications to apple watch but without an app for apple watch. Our app is a game only for iphone and ipad. So I didn't find any info about this case in developer. ...

Is it possible to send a local notification to the Apple Watch specifically?

ios,notifications,uilocalnotification,watchkit,apple-watch
I see this in the Apple Watch Programming Guide: When one of your app’s local or remote notifications arrives on the user’s iPhone, iOS decides whether to display that notification on the iPhone or on the Apple Watch. Is there a way to make a notification only appear on the...

Notification only displayed in Emulators (API15)

java,android,notifications
I am running a service which will check a csv file for entries and display notification accordingly. The code is fine, the app also works on the emulator running the minimum target API (API 15). However in all my phones, running Jellybean and above, there is no notification displayed. Here...

Notification Message Instantly Fired - Android

android,time,notifications,broadcastreceiver,alarmmanager
I'm making an app that stores medicines data in an SQLite database in order to send to the user notifications when it's time to take them. I already created the BroadcastReceiver class and managed the notification Intent. The Calendar.set() function is called when I add the time (hh:mm:ss) in the...

What does (extra requests) mean in Parse.com services?

parse.com,notifications,push-notification,cloud,push
In Parse's pricing FAQ it is mentioned that "If your app hits its request limit, your extra requests will begin to fail with error code 155 (RequestLimitExceeded)". What does (extra requests) mean? Are they the requests made within the same minute? day? month? or all other requests made until the...

iOS Remote Notification Action Buttons not always present

ios,notifications,watchkit
After following all the instructions presented here the Apple Watch notification does not consistently show the action button I have set in the notification settings during remote notification registration. I am using Pushwoosh as a service and made sure that the remote notification JSON data I am sending to Pushwoosh...

Opensource alternative fo azure service bus and machine learning

azure,notifications,machine-learning,azureservicebus,powerbi
I am looking for a open source alternative of below services, Azure Service Bus Azure Machine Learning Azure Notification Hubs Power BI for Office 365 Mobile Services Cloud Services Is there any solution which interoperates all these similar services as a whole solution?...

Android Notification smallIcon not displaying properly

android,notifications,icons
So I've been working with Android Notifications and after setting a large image, I found out that my small image is actually not displaying properly. As you can see on the following screenshot of the lockscreen, the background of the small icon is transparent. I want to set a specific...

how to pass multiple values with a notification in swift

ios,swift,notifications
How to send a number and a String through a notification ... let mynumber=1; let mytext="mytext"; NSNotificationCenter.defaultCenter().postNotificationName("refresh", object: ?????????????); and receive the values in the receiver ? func refreshList(notification: NSNotification){ let receivednumber=?????????? let receivedString=????????? } ...

How to create notification inside an activity in android?

android,notifications
I have a task in which I have to show Notification for an incoming message inside an activity using BroadcastReceiver with the address and content on the SMS. Now I have to click in order to insert the values in sms in database. When the task is finished i want...

Android: How to adjust the largeIcon of a NotificationCompat.Builder in the bounds of the notification

android,notifications,android-notifications
I have built a notification, but when I set the large icon, it doesn't fit to the bounds. I would set it to display as expected. Here is the code where the notification is created: NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(getApplicationContext()) .setSmallIcon(R.drawable.ic_launcher) .setLargeIcon(image) .setContentTitle(appName) .setContentText(message) .setSound(defaultSoundUri) .setPriority(NotificationCompat.PRIORITY_HIGH) .setContentIntent(pendingIntent); ...

make phone call when specific notification arrive

java,android,notifications,call
i'm trying to make a phone call, when a specific notification arrive, i use Notification Service Listener to read incoming notificaion, public void onNotificationPosted(StatusBarNotification sbn) { // if(if this is my notificaion..){ String name = sbn.getNotification().extras.getCharSequence(Notification.EXTRA_TITLE)); List<String> numbers = getPhoneNumbers(name); Log.d(TAG, "i have all this numbers - " + numbers.toString());...

How to fix Android notification issue?

java,android,service,notifications
I have a service which needs to write a notification on the status bar when some event occurs package com.octoplus.client.services; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.app.Service; import android.content.Context; import android.content.Intent; import android.os.IBinder; import com.octoplus.client.MainActivity; import com.octoplus.client.R; import java.util.concurrent.TimeUnit; public class notif extends Service { public notif() { }...

How to show Android Notifications on screen as well as status bar icon?

android,notifications,android-notifications
I feel like this should be trivial but I can't seem to make a notification show up on the phone's screen - it only shows up in the status bar at the top. For an example of what I want to do, here's how Facebook Messenger shows up on the...

Notification not activating my activity

android,android-activity,notifications
I created this Android notification successfully, however I want to activate my main activity upon touch. Here is my code. Intent notificationIntent = new Intent(getApplicationContext(), MainActivity.class); notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); // only needed for activity activation PendingIntent pendingIntent = PendingIntent.getService(getApplicationContext(), 0, notificationIntent, 0); Notification notification = new Notification(R.drawable.floating2, "Click to start...

How to customise notification in os x using applescript

osx,notifications,applescript
Say I have a file sometext.txt . I want the contents of this txt file to show up in the notification which I will trigger using displaynotification in applescript. In other words I want to be able to: display notification "File's content" with title "Title". How can I do it?...

Notification not appearing Notification Tray

android,notifications
In my application I have a LocationTester Service implements LocationListener which is responsible for retrieving the Reminders from sqlite Db and comparing their distances with current location in onLocationChanged() method and then present the information if the distance is less than 1km and then throw notification related to that particular...

NSNotification breaking in Swift when trying to pass back userInfo

ios,swift,notifications,notificationcenter
I'm having issues trying to pass back userInfo via postNotification in Swift. What's strange is the code only breaks when I try to use userInfo -- if I post a notification with no data to a selector with no parameters, everything works. But when I try to pass back userInfo,...

Android how to download something WITHOUT showing any notification or notifying the user

android,notifications,download-manager
I want to download a file using downloadManager but I don't want to show any notifications. I think the term for this is silent downloading. Any help would be appreciated.

desktop notification using javascript in windows form

javascript,c#,notifications
i am new to this and i am creating simple application in which i click a button and a notification on desktop should be displayed. i am doing this in windows form c# the error is " NullReferenceException was unhandled i have one button Notify in form1. i have tried...

How to get notified when a file is uploaded?

php,notifications
I'm building a php application. It's a platform where users can exchange files. I started by letting the users upload a file to a specified directory on a local server using php, now I would like to know how to each one of them could get notified when a new...

How to set a notification conditional based on polymorphic comments?

ruby-on-rails,ruby,notifications,comments,polymorphic-associations
I have this in comment.rb: def create_notification self.notifications.create( comment: self, goal: self.goal, valuation: self.valuation, user: # How to fix this line? if valuation self.valuation.user, else goal self.goal.user, end read: false ) end How can we make it where when the comment is on a valuation the notification uses user: self.valuation.user...

iOS push notifications doesn't work if “aps” informed in JSON

ios,json,notifications,push-notification,apple-push-notifications
If I've my app closed and I send a push notification like this: { "alert" : "Hello, world!", "sound" : "default" } My app receives push notification correctly. But if I send this: { "aps" : { "alert" : "Hello, world!", "sound" : "default" } } My app never show...

How to Custom Heads-up notification layout? Thank you

android,notifications
In my project, need change heads-up notification layout. I have custom two remoteView, one for Notification.contentView, one for Notification.bigContentView and its succeed. When I want to use Notification.Builder.addAction to add click button, it will use system layout not mine. I changed another way, I custom layout & click button in...

How do i make a notification appear at random times throughout the day?

java,android,random,notifications
Hi im trying to make a notification appear at random times throughout the day. right now all it does is make the notification appear when i press the a button. I would like the button to start making them appear every hour or so. Here is my MainActivity class. public...

What's the mistake in a code written in PHP for push notification to be sent to iPhone?

php,iphone,notifications,push-notification,pushwoosh
I've installed php-pushwoosh using composer at following location on my local machine : /var/www/gomoob-php-pushwoosh Now I want to send push notifications to iPhone through the PHP code. So, I tried by myself and written PHP code in a file titled sample.php which is located at /var/www/gomoob-php-pushwoosh/sample.php. Following is the PHP...

How to send Notifications to the User whose post received a Comment?

ruby-on-rails,ruby,notifications
With my current code the user who made the comment gets a notification telling them that they made a comment. It should be the person who posted the Valuation that got commented on who should get a notification notifying them that someone commented on it. Standard notification stuff, but where...

How to remove notifications when touched? [duplicate]

android,notifications,android-notifications
This question already has an answer here: How to clear a notification in Android 8 answers I am trying to develop an app that will make notifications when you exit. But I want that when you touch the notification and you reopen the application, the notification disappears. How i...

Different notification partials for different models?

ruby-on-rails,ruby,notifications
notifications/index has <%= render partial: "notifications/notification", collection: @notifications %>, which contains: <%= link_to "", notifications_habit_path(notification.id), method: :delete, class: "glyphicon glyphicon-remove" %> <%= link_to Comment.find_by(notification.comment_id).user.name, user_path(Comment.find_by(notification.comment_id).user.id) %> commented on <%= link_to "your habit", habit_path(notification) %> which shows: This is problematic because it should say 3x ".com commented on your habit" and...

Android receive notification open and cancel event

android,notifications
I receive data from my webService to generate custom notifications. I want to track Intent to be aware of open (click) or cancel (swipe) event on a notification , to report server for analytics. Is there any listener for onIntentStart or onIntentCanceled ? Maybe a listener for notifications by notificationId...

Hide JS Notification Object By Tag Name

javascript,notifications
I'm using the notification API for my project to show browser notifications where each notification has a unique tag (ID), but I can't seem to find a way to close or hide the notification by the tag name, without calling the close function on the object, since it might be...

Design pattern for corner-case logic without switch and conditional statements

java,design,notifications
I have a class with many switch statements in it. The code looks very ugly to me but I can't figure out how to fix it. If somebody could suggest a design pattern or a trick that cleans this up that would be great. Below is a abbreviated version of...

Android, Custom Notification, Giving me always white Text

android,notifications,push-notification,android-notifications
I am trying to make a custom notification bar, it works and all but when i test it in lollipop it's displaying the title and content text with white color text, it is good for kitkat because the notification bar is dark but not for lollipop. How can i make...

Don't send daily Local Notification if app already opened

ios,objective-c,notifications,uilocalnotification
I'm sending a Local Notification every day at the same time. I was wondering if there were a way to not send the notification if the user had already opened the app that day? Here's the code I'm using to check if notifications are allowed, and then send the notification:...

Send a Android BLE GATT Notification

android,bluetooth,notifications,bluetooth-lowenergy
I´m currently developing an BLE application, based on the Gatt sample project provided by Google. What I want to realize is to send a notification from my Android device(smartphone) to another BLE device(e.g. TI CC2540). There are many discussion about how to receive a notification on the Internet. However, I...

Android old notifications are invalid by a new one

android,notifications,android-pendingintent
I am developing an Android app. It receives a notification A, and shows content (related to A) if user clicks on the notification. The problems is: if user clicks on one of the old notifications when receiving several, it shows the content related to the newest notification, rather than itself....

Multiple notification handling

android,android-intent,notifications,android-pendingintent
I'm having trouble in figuring out the Intent, PendingIntent Filters and Flags for notifications. Notification are working and are getting generated as they should, but the problem is only the last notification created keeps the Bundle Data. I want all notification to keep the Bundle Data of each notification in...

Icon not displaying in notification

android,notifications,icons
My app generates a notification, but the icon I set for that notification is not being displayed. Instead I get a white square. I have tried resizing the png of the icon (dimensions 720x720, 66x66, 44x44, 22x22). Curiously, when using smaller dimensions the white square is smaller. I have googled...

HTML5 Desktop Notifications (ideally with Angular)

javascript,angularjs,html5,notifications
I want to be able to send Desktop Notifications to the user (not inside the browser window) and I know I have to give the user the choice to open the dialog question in chrome. I am using the MEAN stack, and use browserify/bowserify on the frontend, and I can...

local notification sound doesn't work

ios,swift,notifications
I have an application that fires a local notification with sound. But when notification fires, it doesn't play sound if my app is running. Only when i close my application it plays a notification sound. I want it to play sound even if application is running on phone. Here is...

how to cancel led notification , when screen is unlocked in android?

android,notifications,led
i have an app that when airplane mode is on , led light notification start . i want to stop or cancel this led light , when my screen is unlocked.how can i handle this? i try this but not worked: .... PowerManager powerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE); boolean isScreenOn =...

What do you call this tiny popup that appears at the bottom of the android screen called? [closed]

android,user-interface,notifications,popup
This might be a stupid question but I am new to android terms. I have seen this many times and I want to use this as a notification method. However, I don't know what this is called. I searched something like: "Android notification at bottom of screen" "Android popup at...

Activity shown immediatly instead of showing a notification

java,android,notifications,alarmmanager,android-pendingintent
I'm trying to use the AlarmManager to send a notification to the user later in the day, whether he is using the application or not. I basically pasted what I saw here : http://developer.android.com/guide/topics/ui/notifiers/notifications.html, but obviously something went wrong because instead of showing a notification, the AndroidLauncher Activity is shown....

Yii2 redirect with timer

redirect,timer,notifications,yii2,logout
I want to log the user out after changing his password, but also want to show them the notification that it has changed. So in order to do this, I'd like to use a redirect command with a timer of 2-5 seconds.. Sadly I couldn't find it anywhere. Any help?!...

Relaying all Android Push Notifications

android,notifications,push
I'm building an application that's interested in all push notification data from every app on the phone at the time the notifications are in fact pushed. Is this possible currently within Android?...

How to have BroadcastService communicate with Activity?

android,android-intent,notifications,android-broadcast
I'm trying to get push notification working in my Android app, using parse.com's push notification service. They implement a Broadcast receiver, which I am extending in my own class: public class MyPushBroadcastReceiver extends ParsePushBroadcastReceiver { @Override protected void onPushReceive(Context context, Intent intent) { JSONObject data = getDataFromIntent(intent); [...] super.onPushReceive(context, intent);...

Firebase + Ionic Framework: Chat notifications

notifications,firebase,ionic-framework
SO I am wondering if its possible to implement some sort of notifications with Firebase and Ionic Framework, which I am using to create app. Can I stick with Firebase only, or do I need to get some other service, such as for example Parse? Thanks! EDIT: I got Parse...

How do I control the notification counter for my home screen app icon? [duplicate]

ios,notifications
This question already has an answer here: How do I use the numeric notification “bubble” in iOS? 1 answer When one first turns on one's iPhone, one is presented with this screen that lists all the apps installed in that phone. Some of them might have little red circles...

ViewController deinit after performing segue using Notification

ios,swift,notifications,nsnotificationcenter
I'm basically receiving a remote notification and I want to redirect my user to the correct VC as soon as he clicks the notification. I'm doing it using NSNotificationCenter to perform a segue from my rootVC, leading the user to the correct VC. NSNotificationCenter.defaultCenter().addObserver(self, selector: "chooseCorrectVC:", name:chatNotificationKey, object: nil) Since...

Parse.com : Sending Push notification from device?

android,parse.com,notifications
I've successfully integrated Parse.com to android app & the push notification was worked perfectly when i tried to send the notification from Data browser. Now, when i tried to achieve to send the notification from device, it doesn't send anything & there's no log even in the Push notification section...

Starting application from Notification issue

android,notifications,back-stack
The scenario is like this. While navigating the application, the user receives a notification. By clicking the notification, the application starts the specific activity that the notification is about. The problem is, when exiting the application by pressing backspace until the launcher activity, and the one more time to exit,...

Android notification InboxStyle() with colored string

android,string,colors,notifications,spannable
Quick question with android InboxStyle(), can I have a colored string? I tried using Spannable like NotificationCompat.InboxStyle style = new NotificationCompat.InboxStyle(); text = "sample"; Spannable spannable = new SpannableString(text); spannable.setSpan(new ForegroundColorSpan(Color.GREEN), 0, text.length(), 0); style.addLine(spannable); but no luck... :( Am I able to add colors? Thanks!...