Send Raw notification to Windows Phone 8.1 via Parse.com - parse-platform

I need to send different data via push notification to my Windows Phone 8.1 application and handle it into background task. How I can send Raw notification via Parse.com? Is it even possible?
Thanks!

I have been struggling for a very long time with Parse.com and Windows Push Notifications.
I haven't been able to send Raw notifications to Windows Phone so far. Neither I am able to send specific parameters as "sound", for example.
Parse.com simply seems to give no support to those kind of Windows Phone notifications. Only "regular" push notifications with a Title.

Related

WiFi Text Services

I'm trying to come up with a solution to this situation:
Imagine you are in an area and you do not have any cell phone service but you do have Wifi.
The ask is to have a user that only has data to be able to text a number (via iMessage) and get a confirmation code in return.
The first tool I thought would be necessary for this would be Twilio - but it seems like Twilio only sends over standard SMS.
Are there any other tools out there anyone have used that would work in this idea? Something similar to Twilio but only ran on data?
Twilio developer evangelist here.
This is something you can only do as the phone provider or network provider (using Three in the UK allows me to make phone calls over wifi with no phone signal, for example).
The two things you can do is either build yourself a native application that you can send messages to using push notifications or send messages to existing native apps, like Messenger, Viber or Line.

Can a web application use a personal phone to send a text message

I have a client who sends about 5000 SMS messages each month. They are currently doing this from an iPhone, by actually typing the message in to the phone. (I think the messages are quite repetitive, and are often addressed to groups).
The reason that they are not using an online message gateway is purely the cost. We can use a gateway here in Australia (such as Amazon SMS) for about 7.5 cents for transactional (and 2.5 cents for promotional, though I don't know if this is reliable enough).
When the client uses their own iPhone, the SMS is included in their plan, and costs them nothing extra.
I am building a web-based application for the client and the question is 'Can I send SMS via a handset connected to the client's desktop PC'. I think the answer is no, but would like to be surprised. The application is responsive, so what about if they triggered the messages from a browser on the phone? Still no?
If you could use an Android phone instead an iPhone, you could create a small gateway app on the Android that can send text messages without the need for the user's intervention.
It could work like this:
The Android app would have a simple REST interface, a good start could be https://github.com/NanoHttpd/nanohttpd.
An endpoint in the Android app could send messages, see Sending SMS programmatically without opening message app
The software on the computer would use the rest endpoint on the Android phone to send the message.
This wouldn't work on the iPhone because it doesn't allow an app to send a text message without the user's intervention.

Titanium local notification

I have an app that retrieves data from remote (custom REST API). For this I would like to implement local notification instead of push notification. The aim is to display notifications (iOS and Android) when something is happening from remote (let's say a new offer is available).
So before coding I have some questions:
Could I display data from remote as a local notification?
Do both Android and iOS support this?
What exactly is the difference between local and push notification
You can use local notification on both platforms:
Android: https://docs.appcelerator.com/platform/latest/#!/api/Titanium.Android.Notification
iOS: https://docs.appcelerator.com/platform/latest/#!/api/Titanium.App.iOS.LocalNotification
To display remote data you need to have it first. Which means you have to make an API call to your server and receive the data. So your app needs to have a background service:
iOS: https://docs.appcelerator.com/platform/latest/#!/guide/iOS_Background_Services
Android: https://github.com/benbahrenburg/benCoding.AlarmManager
Again, both platforms support this.
If you want to implement this as a local notification you should already know what it does :) But since you want to get remote data I would use push notifications because with the background service you need to ask the server all the time if there is something new and then display your notification. With a push notification you could just send out the push to the phones and then show a notification.
There is a great CommonJS module that helps you to implement push on both platforms: https://github.com/HazemKhaled/TiPushNotification

How is whatsapp fetching message in background in windows phone?

After the latest update of Whatsapp on Widows Phone Store, I have noticed that now, once they show the toast of message on my device, then they mark the message as delivered (notify the sender that the message has reached my device).
After I let the toast notification go away, I switched off all my data connection and opened Whatsapp and found that that particular message in my app. This is happening consistently on both wp7 and wp8 device. This was happening even when I had disabled background agent! Beside background agent of an app does not run all the time.
So my questions is, on windows phone platform, where the app is not allowed to run in background all the time, how is Whatsapp application getting those messages? Is it using any particular api/hack to get(in app) those messages when it's not on foreground.
The question you have asked has two parts: one for wp7 and the other for wp8. I will anser each one by one.
Windows phone 7
Based on my research, I have found that whatsapp is still using audio streaming api on wp7 devices to stream messages in the background i.e. when the app is not running. Whatsapp was criticized of using this API as constantly using this causes battery drainage as well as hampers the music experience of the user.
Windows Phone 8
Once whatsapp moved to wp8 they stopped using the Audio API and moved to VOIP API. Note that whatsapp doesn't use VOIP for any purpose but their manifest shows usage of VOIP api, and after reading many articles I have come to the conclusion that they are using this API to activate background agent and pool messages in the background.
While sending raw push of type 4, the background agent for VOIP is activated in which you can practically do anything from reading the payload to establishing a new socket connection subjected to restriction on usage of certain APIs
I have also found out that even if a user disables bg agents for an app some essential bg agent still continue to run for eg bg agents in audio stream API and VOIP API.
I hope this answers your question.
Go through this link
Push notification for Windows Phone
What will help you to understand is
The server maintains a maximum of 30 notifications (regardless of type) for each URI. Once the limit of 30 is reached, all new messages sent to the server are discarded until the device reconnects and the queue can be flushed.
In windows phone there is something called raw notifications, these are different from push notifications, push notifications display a notification, but raw notifications triggers a background task that can run under certain api restrictions for about 15 seconds. (I think, I'm not sure about the time duration), I think what whatsapp does is that it downloads the message and saves it in a local database which is maintained in the device. When whatsapp is opened it will read the local database and also sync with the server.
Please correct me if I am wrong.

XMPP Notfication service instead of GCM / APNS

How does device receive Android GCM push notification?
Hi,
In the link above the steps of GCM and Blackberry notifcation services are explained.
I'm wondering if it is possible to change the GCM (android) / APNS (iOS) to one central notfication service with XMPP? This because I want to build a server and client with XMPP and want to communicate between these as well with messages and notifications.
Thereby, with the setup of a webview in a android application and GCM sending notifications to the device, GCM is not reliable. Not all messages are send to the device. I'm not sure yet how this works for APNS, but the app will be used on different platforms and it would be nice if there is just one way of sending notifications.
Anybody experience with this? Or is there another way of implementing the notifcations?
iOS does not allow you to run apps in background (except of voice apps). This means that you cannot have a XMPP stream in the background with iOS. For iOS there is no other solution than APNS if you are not a voice app. Android does not have these restrictions. Windows Phone 7.X hast the same restrictions as iOS, I don't know how Blackberry handles this.

Resources