how send offline notification in phonegap? - phonegap-build

how send offline notification in phone gap.? please anyone know about offline notification.please help me. It works properly even if online but I wanted to get notification after app is closed.It gives notification Only for 3-5 hours after app is closed but I wanted to show them repeating 10 times per day for 10 days offline.

you can use Cordova Local-Notification Plugin to send offline push notification https://github.com/katzer/cordova-plugin-local-notifications

Related

Firebase Admin SDK Push notification cannot be measured

I wonder if I can measure my push notifications open and receive rate, sent by my backend. I use laravel right now and I use firebase admin SDK to send push notification from my backend server.
However, I cannot measure my push notification open and receive rate because it doesn't appeared in firebase console. Is there any way out like if google have API for us to grab the push notification data, or anything else ?
I'm also open for using another push notification service, as long they provide the analytics tools for the push notification campaign.
Thanks
Hi Kevin currently only the console allows automatic tracking of notification opens and other metrics. You could log these events yourself with the Google Analytics for Firebase SDK. Thanks for the feedback, this would be a useful feature.

React To PushNotification Received even if the App is Closed

I know there are a lot of questions related to this subject, but after searching I found out that they all say that if the app is closed then the only way is to fetch the notification again from the server once the app is opened or if the app is opened from the notification then you can handle it in didFinishWithLaunch but using WhatsApp, this is not the case...
I tried sending a message to phone B (which had whatsapp closed), Phone B received the notification. Then I turned off the internet on Phone B and opened the app and still received the chat message.
Can anyone guide me on how to do this?
Probably you should use one of background modes - "remote-notification".
After enabling it, you can send push with payload like
{
"alert": "",
"badge": "0",
"content-available": 1,
"sound": ""
}
if you specify content-available key equal 1, iOS will wake your app and call application:didReceiveRemoteNotification:fetchCompletionHandler: in app delegate and you have some time to proceed push and prepare app (like download this new message to device). Here is Apple docs link with info about push payloads.
However please be aware that this push delivering is not guaranteed. Apple tells
(Newsstand apps are guaranteed to be able to receive at least one push with this key per 24-hour window.)
In our experience you likely receive it most of the time, but not always. For example app delegate callback will not be called if user swiped to close your app.
Also you need to finish execution in 30 seconds or less and call the block in handler parameter (you can check discussion section of method documentation for more details)

Custom Push Notifications

I am building a very basic information based app (Android) for an event, and i'd greatly appreciate your help on the questions below.
Basically, the app will just contain information about the 7 guest speakers at the event.
The attendees (2500 android users) will only get the link to the Android app when they arrive at the venue.
There is no database connected to the app as it just contains static information about the speakers which is hard coded into the app, however i want to build in a small feature so that i can send out custom push notifications to all users (let's assume 2500) at various times, such as when a speak is about to start on stage etc.
QUESTIONS
01 - am i right in saying that Parse allows you to send out custom push notifications in bulk from the Parse dashboard?
02 - is it able to send to 2500 at one time or do they need to be sent out in smaller batches?
03 - at what stage do charges start to occur for all of these custom push notifications
Thanks in advance for your help, it's much appreciated.
01. Yes Parse dashboard enables you to send push notifications in bulk.
02. Yes it is able to send as many push notifications as needed you needn't worry about batches since Parse dashboard is a simple GUI frontend made by Parse.com so you don't do any coding.
03. You can see on this link https://parse.com/plans that per app you have 1 million unique pushes. Unique push is equal to 1 push on 1 device. To be clearer a single user might have 5 devices registered to him so sending a push to 1 user does not mean 1 push but 5 pushes 1 for each device.
**One more thing to note if you are going to be making custom pushes you should think about handling the push notification in the Android app if you plan on doing anything fancy. If its just to show the push with text then you need the basic handling of an incoming push that does nothing once the app is opened by a push notification.

How to send data to another mobile in windows phone from server?

I am developing an app in windows phone where I enter the score of the match and the other windows phone users who has the same app should get that score as a toast notification(if any other better way suggest me).
I also want to push the data to this app users from a rss feed. This feed gets refreshed data for every 1 or 2 mins.
IS this possible to implement this in windows phone ?
If you only want to send the notification of the match score to certain users then you could use Push Notifications.
If everyone needs to get the notification then you would just use a BackgroundAgent. The Background agent will run approximately every 30 minutes (if you need it to be more accurate then you're back to Push Notifications). When the agent runs you could just check to see if there are any new match scores since the time the agent last ran and then pop the toast if there are.
You should also use the Background Agent for checking your RSS feed.

Push notification problem in Windows Phone 7

I tried the following tutorials to create the push notification in Windows Phone 7.
http://www.sgtconker.com/2010/03/article-windows-phone-7-push-notifications/
http://www.silverlightshow.net/items/Implementing-Push-Notifications-in-Windows-Phone-7.aspx
I can create the channel uri in the WP7 emulator without any error.
However, when I post the push notification from the server to the channel uri. I could only receive the 404 error.
Could anyone give me some help ?
Thanks.
=====
Update 1 (28-Oct):
Thank you very much for the answers.
After I read the latest resources and sample codes, I just sent a push notification to the WP7 emulator successfully.
The channel setup part in WP7 does not change much in the latest SDK.
The problem that I encountered before was from the POST message part of the sender.
The following website is quite useful.
http://www.thisisfanzoo.com/Blog/JeffF/archive/2010/08/02/a-really-long-post-about-the-windows-phone-7-push.aspx
He shows how to correcty build the POST message and it is very critical.
Also the channel uri that created before will expire, when the WP7 emulator (handset) turns off over an hour. Hence, we need to keep track of the channel uri and update the server once it changes.
Have a nice day.
=====
Update 2 (28-Oct):
I just created the POST message using cURL in Linux server, and successfully delivered it to the WP7 emulator by push notification.
Text encoding like ASCII-UTF-8 conversion issue was fixed too.
There were some changes to notification handling through the ctp and beta as Matt advices.
I'd recommend checking out this documentation for an overview, detailed code samples and response codes.
Push Notifications for Windows Phone
How to: Set Up a Notification Channel for Windows Phone
How to: Send a Push Notification from a Web Service for Windows Phone
Also if you'd like to get some more overview I'd recommend checking out the Mix 10 and Tech Ed 2010 NA talks by Peter Torr. If you'd like points in the video to skip forward to I can get these.
The articles you refer to are very old and relate to the Beta and CTP versions of the tools. Unfortunately Push notifications is an area which saw much change before RTM/RTW.
Have a look at the up to date instructions on MSDN at http://msdn.microsoft.com/en-us/library/ff402537(v=VS.92).aspx. I suspect you'll have much better luck with instructions which match the current tools.

Resources