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
Related
Push notifications for mobile apps allow for some cool possibilities in terms of user experience. Are similar services available for desktop apps, such as those written in C#?
My goal is to push notifications when a value is inserted into the database and to display that on others users screen so everybody it will be updated.
If I do this from database it will take too long to refresh always the database and display information.
I was thinking to send this notifications as JSON.
I read about PubNub but I couldn`t find any example for desktop apps, just mobile.
If you're developing with UWP framework, there is no difference between mobile and desktop modes. Push notifications would appear like any other Win10 notification, at the Action Center expandable area.
Maybe PushBullet can be of help, just know you will then introduce a third-party. PushBullet has a very easy to use API and Nuget-packages.
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.
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
I have a WCF service which exposes SOAP and REST endpoints and we have WPF,Android,Windows Phone(in future),ASP.NET applications on top of our WCF service, so many users can use many apps from different parts of the world.
Right now we have a big issues with the freshness of data we are using some old school polling techniques to look for the updated data, is there a way to create a system which push data to the connected apps regardless of the platform and location if any data update occurs on the server from any application.
I have already looked into the Duplex Callbacks but that is not possible with android and has some other limitations.i also know about the GCM for android but dont know how to make it working with other platforms apps.
GCM only works for Android devices. There are similar push notification services for Windows Phone and iOS. There are several solutions such as PushSharp and Windows Azure Mobile Services, which allow you to push notifications to several devices.
As for what to use the push notifications for. I strongly suggest not to use them to push data, as you cannot always be 100% sure if the notifications ever reach the device. Hence only use them to notify the client about new data is available, and then fetch it. Use push notifications along with polling.
It is not entirely clear what your application does, hence I do not know when and how often you need the new data. Just keep in mind that iOS for instance does not allow using a permanent background service, like Android and Windows Phone does, however the WP one does only allow for updates every 30 minutes.