I am building an application for windows phone 7 where i need to add push notification whenever some new data has been added in the application from backend. Can anyone please suggest me how to do this? I googled it but didnt get much help. Please someone tell me the procedure for doing this
You can ASP.NET to send push notifications from a web browser. A sample for the same can be found in Windows Phone Dev Center Samples here at MSDN Push Notification Sample.
Alternatively, you can use PHP to send push notifications as well. An excellent library has been put up at CodePlex.
So the overall steps for achieving this would be as follows:
Inside the app, write code to implement Push Notifications by creating a new push notification channel and subscribing the device to that channel.
On successful subscription, the device gets a unique Push Notification URI
Use the Push Notification URI in ASP.NET sample page and send some dummy content. Or alternatively for PHP use the following code:
$uri="YOUR PUSH NOTIFICATION URI";
$notif=new WindowsPhonePushNotification($uri);
$notif->push_toast("Title","Description");
This should briefly outline all the steps in setting up and receiving push notifications. The MSDN Sample is self sufficient if you are using ASP.NET. In case you want a step by step tutorial, you can further refer here at C# Corner Tutorial
Related
I want implement feedback logic for Xbox like feedback hub on pc. But I can`t use feedback hub on Xbox.
Feedback Hub is available only on devices that run version 10.0.14271
or later of a Windows 10 OS that is based on the desktop and mobile
device families. We recommend that you show a feedback control in your
app only if the Feedback Hub is available on the user's device. The
code in this topic demonstrates how to do this.
https://learn.microsoft.com/en-us/windows/uwp/monetize/launch-feedback-hub-from-your-app
How I can implement feedback logic for my UWP app on Xbox?
Derive from official document, Feedback Hub is not support for Xbox, if you want to send feedback for your app, in general, you could launch the mail app with feedback mail line and ask user post the issue.
And the other way is make custom feedback ui in your app, such as title textbox, description textbox, and attach file list. And then post this to the your own server with httpclient.
Is it possible to send notifications(toast, tiles, raw) from a server and receive it from Windows Phone 8.1 not using Azure Account(Notification Hub). I saw examples using 8.1 silverlight but I could not implement within WP 8.1.
If yes, can you explain simply how, or suggest a document?
Yes it is possible you can create your own web service desktop app to do this.
Here is an article from MSDN that explains how...
https://msdn.microsoft.com/en-us/library/windows/desktop/hh868252.aspx
There are quite a few things you need to setup such as WNS etc.
It is not necessary to using Azure. You can implement your own notifications server but you should understand how it works first, it's a little bit complicated :) - there is an overview for WP8.1 (Windows Runtime).
In short:
Your server must be authenticated with Windows Notification Service (WNS): How to here
Your WP8.1 app must obtain notification channel (Uri) from Windows Notification Service (WNS) and send it to your server.
Your server should send REST request (POST) with special xml content to channel (Uri) received from your app (WNS mediates in communication).
In last step WP app handles notification.
More info about communication with WNS on your server side: https://msdn.microsoft.com/en-us/library/windows/apps/hh465435.aspx
It's your decision in which technology/platform you'll code it.
But there are several solutions provided by third-party push notifications providers. Eg. Parse - you can send some notifications for free. You'll avoid the problem of creating your own service.
I implemented WNS push notification in my Windows Phone application. And the application are getting the toast notifications successfully.[Sometimes with a delay].
Now toast notification functionality will work only when the user tap it when the application is not open. In any case the user swipe out the notifications form the action center,so the user could not see the missed notifications.
Is there any way or api to get/store those entire toast notification
list in Windows phone ?
I know ToastNotificationHistory class, But where I could see only clear or remove notifications.Please provide me clarification on it is possible or not ?
Also when the device is on low power state, no toast notifications are coming on the device. So the user misses that too. How to handle this case too ?
Please provide me a detailed clarifications on my work around.
related SO question is here
Thanking you all.
Hi asitis, I would like you to know that ToastNotificationFactory's
Clear and Remove methods only apply to those notifications that are
generated by the app itself(local notifications). These methods can not do
what they are saying to those notifications that are coming from WNS
service.
Also You don't have much control over the WNS notifications when
application is closed. They are all handled by user. Like if they
have deleted them or read then they are not available anymore.
May your functionality will be fulfilled by your own server that does
this saving/retrieving notification things. over an endpoint to your
client app. Then you may use Background agents to fetch these
notifications without the user interaction and send the internal
notification to the user from background agent itself.
But background agents are not the good things because they eat the
battery and user can intentionally disable them for all apps. so your
implementation will not be of any use.
So IMO please review your requirement and try to figure out what exactly you need. Also read guidelines of pushnotifications usage I think this => Push Notification Guidelines will definitely help.
Notification Disabling :- for this don't use any client side logic/code because in this case you have to re-publish the client(app) every time your logic changes. So put this logic from where(server) you are sending the notifications. like :- filtering if users..
you can change this filter logic according to your needs in future.
Hope it help you :)
create a server app in vb.net or C#. It'll run on system with turned on bluetooth. If any mobile with turned on bluetooth devices will comes within the system bluetooth signal, it'll send notification automatically. Is this possible to create?
No. It would not work.
APNS
https://developer.apple.com/library/IOs/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html
GCM
https://developer.android.com/google/gcm/gcm.html
Push notifications requires to be pushed from Apple's or Google's notifications infrastructures.
For iOS there's local notifications that your app can trigger based on your conditions, but from my knowledge when the Bluetooth connects, your application has to be running and listening for bluetooth changes.
If your app goes into background and got recycled, it would not be able to know when the bluetooth is connected, let alone run your logic to send the notifications.
No this is not possible. Your title asks for "without mobile app". The mobile app on the device is what receives the notification. You create the notification on the server (as shown in #Lee's explanation) and your app decides whether to show it to the user or process data behind the scene.
Assuming we disregard the part about "without mobile app", you CAN do something similar with iBeacons. Department stores use them for targeted notifications in their app. You walk by a certain rack of clothes with an iBeacon and your app shows a notification that that section is 20%.
As an alternative, you might, somehow, also be able to use a service like Twilio which you can TEXT/MMS information (notification) to someone based on some kind of trigger that you define. This would however require that you already have their phone number and some what to identify that they came within your region.
As a whole, being able to notify people within a proximity that haven't done something to subscribe (i.e. download your app, provide contact info) is just plain spammy.
A very straight forward question, but I know there would be no easy answer. I am looking for ideas on how to communicate to Windows Phone 7 back and forth using our application written in c#.
Our purpose is to receive user responses back to application.
Thanks
The simple answer goes something like this...
1) When you need a response, send a push notification to the phone app. This requires the user to opt in to receipt of push notifications for that app.
2) On startup of the phone app, have it query a service to retrieve outstanding information requests. This service will be the phone app's sole means of communicating with the underlying app, so make sure you can do all you need through the service (get and submit data, mainly)
3) Display the required form to gather user input, and submit the values supplied.
Of course, you can make the scenario as complex or as simple as you like - add a count to the push notification (tile) to show the user they have outstanding data entry requirements - in case they miss the toast notification, have a background job that polls for work to complete, that kind of thing, but in my own opinion, a simple push tile notification should give you what you need.
You can use sockets with the latest WP7. http://msdn.microsoft.com/en-us/library/hh202874(v=vs.92).aspx