parse.com – Cancel scheduled push programmatically - parse-platform

I need to cancel some of scheduled push notifications via API.
Not via web console.
For example, it will be good to have ability to cancel all of scheduled push notifications for specific deviceToken (filter by deviceToken will be good enough, because I don’t need to cancel specific pushes).
REST API doc have nothing on this topic.

This is not possible at the moment, the only two ways are to either use the Push Dashboard in a browser, which can be unhandy if you schedule a huge amount of notifications or to implement your own queuing system for Push notifications.
The latter would involve creating a new table for your notifications and a background job that will send out all notifications that are due to be sent. Once sent, remove them from that table.
Other than that, you're out of luck at the moment.

Related

How to design notification system that sends real-time alerts created by users

I've been thinking about how to design a system that supports user created scheduled alerts. My problem is once the alerts are created and inserted into a database, I don't know what the best way to go about scheduling those alerts. Polling the database to see which alerts need to go out next doesn't seem entirely right to me.
What are some ways this could be handled on a scale where say a million users could create their own custom alerts like change baby diaper at 3pm everyday?
This problem is very suitable for cloud platforms. For example, you could use GCP Cloud Scheduler to invoke a cloud function when the alert is supposed to be sent out. The cloud function then calls some API to alert the user.
If cloud platforms are not an option, you could have your application spawn a new thread when an alert is created, and sleep that thread for a certain duration. When it wakes up, it sends the alert. Less elegant and less scalable than the first solution, but it would still work.

purging mechanism / deletion of messages from slack in bulk

Is there anyway to delete bulk of messages from the slack application in one go, without paying for any package?
I need to introduce a mechanism which will delete the messages filed in the slack after certain period of time and this mechanism will work after certain interval
There is no API method for bulk operations. You have to keep track of a list of messages and invoke chat.delete for each on your own (in the code of your Slack App).

Push and pull with Parse

So what I need is a kind of a push and pull web service mechanism; Certain devices will be sending data to my parse backend and some others should be able to receive the newly added data as it's being added. Think of it as a restaurant environment where customers send their order via their phones and the restaurant manager receives the orders on his pc real time.
I know I can use push notifications but I want to target specific users (in this case the manager alone). I guess I can have a specific push notification channel in which only the manager is added, but I am not sure if I can send proper json data in bulk or just simple strings. Maybe there's a smarter way of going about it.
Any suggestions?
Many thanks,
Polis
You can use the Parse Cloud for this purposes. So certain devices (you can differentiate in cloud or in client side) can call the cloud method. The called cloud method can make http request to your server (manager pc real time). From now on your server side can deliver coming message to your manager in real time. In this solution, I assume that you have your own server for web users (like manager) and mobile application for client user (customers).
Hope this can give you an idea. Regards.
You can use Push notification for this purpose. In my opinion that would be your best option.
When registering for push notification on client side, you can set a column owner to user pointer. Now when sending push notification from one user to another you can query the Installation class for other user's pointer. You can send push notification either from client side or writing cloud code for afterSave trigger. Cloud code is a better option.
The downside of this approach is that if other user did not allow push notifications then this would fail. The second user would still be able to get the data when they open the app, but won't get push notifications.
***I built a chat app using this approach on Parse.com
You don't need a complicated channel setup, before you save your installation, do a line like this:
[installation setObject:[PFUser currentUser] forKey:#"owner"];
[installation saveInBackground]; // ... completion or whatever
Then, just query:
PFQuery *installationQuery = [PFInstallation query];
[installationQuery whereKey:#"owner" equal:userImLookingFor];
Then, it's like PFPush w/ query or something.
(I'm typing from memory, so some of these might need to be slightly tweaked)

Schedule Notification Using Push Sharp in Xamarin

I have created a Push Notification service for my IOS app using the code from the link below.
http://woutercx.com/2013/05/09/sending-push-notifications-iphone-with-pushsharp-csharp-monotouch-client-server-side/
I have coded every thing and set up the certificates correctly for push notification in my IOS app.
The question is how do I schedule the push notification to be sent to the registered IOS devices periodically. Lets say I want my users to be notified every hour? In short i do i make use of the methods of Pushsharp to schedule a Remote notification at a specified intervals.
Since pushsharp is a library, not a service, it has no ability to send notifications periodically or delay them. The library is only able to communicate to APNS (apple push notification service). APNS does not provide the ability to delay/repeat notifications, so neither does the library.
If you need to send notifications basing on time (say, hourly), you have to set up your own service that will wake up hourly and post a notification to devices that need it. I'm afraid there is no other way to do it without external services.

Sending real notification after toast received

In a project I'm currently working on, we send some small info across the wire to WP7 device when we send a raw notification.
When the application is in a tombstone state and the user receives the toast message, we can't add the extra baggage in the toast. So we figured we need a way to resend the notification once the user entered the application again.
Anybody has any experience or possible solution for this problem. We are currently looking at a sort of handshaking between client and server. But it all seems a bit drastic for me.
Kind regards,
Tom
I would suggest to stop using rawNotifications and use only toast.
To handle the case when the app has been started using a toast notification, query the server at app startup to check if there's pending data.
For notifications sent while the app is running, you can detect them using the ShellToastNotificationReceived event of your channel. When the event is triggered, query the server to retrieve the payload.

Resources