How to send GPS data to server every 5 minutes? - windows-phone-7

I am planning to write WP7 app, which needs to send to server phones GPS position every 5 minutes. Data must be sent to server even if app is not running. One way to do that is to use Background agents (I am using 7.5 Mango), but in that case app will send data only every 30 minutes, which is not acceptable in my case.
Is there any other solution?
Thanks in advice.

No, this is not a supported usecase for WP7 apps on Mango. Also, it's important to mention that the location you'll get for GeoCoordinateWatcher on a background agent is a cached geolocation from approximately the last 15 minutes and not the real-time geolocation.
What exactly are you trying to build if you don't mind me asking? This sounds oddly close to spyware. Even if it's innocuous and meant for a good purpose, I'd be careful walking in any direction that constantly shares GeoLoc with a remote server.

Your only choices are sending the data every 5 minutes while application is running (even when the phone is locked) and/or send the data once every 30 minutes by registering a PeriodicTask.
Having said that, I agree with Justin in that what you are describing sounds nefarious.

Related

is parse push notification delay more than 2 minutes?

I want to make an app that get push notification from server (iOS and android app). I'm interested in using Parse. I have heard in the past that parse push sometime delay up to 10 minutes or more. My app requires at most 2 minutes notification delay.
Can parse today do that job? or it still delay more than 2 minutes?
If it is delay more than 2 minutes what other solution you suggest me for push notification? I don't want difficult solution like making my own server or anything like that. I'm newbie please suggest me an easy solution.
I am using Parse for my app. Yes, I still experience delays, sometimes longer than a few minutes. But most of time, it feels instantaneous. I would suggest something more realtime if you really care about the response time (go check out pubhub etc.). If you stick to use push notifications, there is always a chance that you will get delay.

Windows Phone Background Application Service

In my windows phone 8 application, I would like to refresh/load some data periodically (less than 10 minutes) from server, while application running in background (ie, in dormant and tombstoned). I tried scheduled task agent and resource intensive task agent, but they are called at rate of 30 minutes gap. Please let me know is there any other solution for implementing the above said requirement.
Thanks and Regards
#nish
If you need to get data more frequently than the default available in Windows Phone, you should think about using push notifications. This won't be suitable for a full data push, but if you use it correctly, you can get a user experience that you can live with.
One common approach to this is to set up your server to send a notification to the device when there is something new to report instead of pushing a "nothing has changed" message every 10 minutes or so. If you push out a tile update notification to say, for example, "You have x unread items", the user may then click on the tile for your app and you can poll the server for new items on launch/resume. If you want a more intrusive option, you can send a toast notification as well, but in most cases the tile update will be sufficient.
This method has a few advantages.
You won't be burning through battery power polling every 10 minutes while the user is asleep
Your server will have significantly less load since it is not having to process full data requests every 10 minutes per client.
This fits in with the design philosophy of Phone apps - you are surfacing the required data to the user, while at the same time preserving battery life.
Do I understand correctly that your primary goal is to keep some host session alive by having the phone make a query periodically? If so...
I would not recommend this approach: 1) you cannot count on the phone having network connectivity when it tries to send its query. If the user puts the phone away in a pocket or purse, the odds worsen. 2) it's probably bad from a security perspective, and wasteful from a host resources perspective.
You might instead add logic to your app to resume a timed-out host session as seamlessly as possible. This would add real utility value to the mobile app value proposition over raw HTTP access to the same host.

Windows Phone 7 background service

Can a background service be created in WP7 which uses GeoCoordinateWatcher to send data at a specific interval given. What I need exactly is to develop a lightweight WP7 background service that sends latitude and longititude to a wcf server after given MovementThreshold is passed. From what I read, this is not totally achievable in WP7. Is there any workaround that can help me?
It's possible to do a service which does this every 30 minutes - http://msdn.microsoft.com/en-us/library/hh202941(v=VS.92).aspx
But if you need more frequent access than that, then the only current possibility is for the user to run your app under their lockscreen.

Ntp synchronization video WP7

I guys:)
I am doing an windows phone application that presents videos, but presents when syncronized with an ntp server. I already have a variable with the time but i donĀ“t know now what to do. I try search in google but i dont find anything.. I want to make an application to present the same video at the same time in different phones..
Any help? Examples?
The simplest way to get multiple devices doing something in sync is to define a time at which they should all start (do this on a central server) and then have each device request the amount of time to wait until the start. Each device should then start playback when that period has elapsed.
If you need to have different devices join in at specific ppoints when some are already playing the video your central point will need to send the point to start playing as well as the amount of time to wait until playback shoudl begin.
Due to the latency of the network communication you won't be able to get perfect sync though.

Real time pushing

Ten updates a second, what would be the best way to do that? Aside from WebSockets (not fully implemented) what can accomplish this?
Would creating a Java Applet be worth it? Can you interact with the DOM in that fashion?
First 10 updates a second does not imply 10 messgaes a second to the browser, you can piggy-back updates to send one message a second (say) - no point in updates faster than the eye can see.
Commetd/Bayeuax worked for me.
Yes a JAVA Applet or any other Applet like Flex or Silverlight would be able to handle that speed.
As for the server side, I think you need a push server, you can't reach that rate of 10 responses / sec if each response is triggered by a client side polling request.
You you've got to let the flow of data come asynchronously from the server.
Examples of push server : Push Framework : http://www.pushframework.com

Resources