Best practice for GPS-Tracking in iOS with Windows Azure? - ios

I want to build an iOS application that GPS coordinates from the iPad to a Windows Azure Service.
An asp.net will read this GPS coordinates and show them on a map.
Is there a best practice to do this or should i just write the coordinates in a table and delete old coordinates as soon as newer coordinates will get uploaded?

You should use a persistent connection to make this faster instead of the Request-Response model of HTTP.
You can use SignalR, it's a library for ASP.NET that makes real-time apps really easy. You can use SignalR-ObjC as an iOS client.
Your iOS app sends consistent updates of GPS coordinates. The SignalR backend receives them, and updates the web app.

Related

How to detect Tablets in ASP.NET MVC Application

In ASP.NET MVC application how can I detect whether the user is using the Tablet device or the Mobile device?
Please I am looking for a no media queries solution.
There is nothing built-in for ASP.Net (you can test Request.UserAgent, but you need to know more info about specific device), you could detect the device client-side(with the help of something like web.wurfl.io) then parametrize your controllers, otherwise, if you are looking for a pure server-side solution, you could try WURFL => Wireless Universal Resource FiLe
WURFL is a Device Description Repository (DDR), i.e. a framework that
enables applications to map HTTP requests to a description of the
capability of the mobile device that requests the page. In this
regard, WURFL pre-dates the time when the DDR term was coined and
could arguably be caracterized as the first DDR. In the last year,
WURFL role has expended from being a DDR for mobile devices to being a
framework to detect every HTTP client worth recognizing.
Thanks to WURFL, mobile web sites and application can:
programmatically abstract away devices differences
avoid the need to modify applications whenever a new device ships
avoid the need to track new devices on the market
WURFL is a global database of all devices and the API to tap that
information programmatically.

What kind of web server app do I need?

I would like to create a sort of tracking application.
A device with GPS will send it's location coordinates to a web server.
The client app on the iOS device will connect to the web server and will continuously the read the coordinates from the web server (that are being updated by the GPS device every 5 - or so - seconds)
Using GoogleMaps SDK I will put a marker on the map where the coordinates are, and refresh the location of the marker when the read value has changed.
My question is:
What kind of web technology would be suitable for receiving data (such as coordinates) and constantly updating this data as well as allowing the clients to continuously read this value?
I was part of a team that made nearly this exact application using a Node.js + Socket.io backend.
I won't speculate as to whether it is the best, but Node's evented system worked extremely well for this.
Upon further research I discovered that gearheadalex's answer on this page was correct. I successfully created a node.js server using socket.io and was able to connect the iOS clients to the server and read GPS coordinates sent to the server from another iPhone. I then simply updated the MKPointAnnotation with the coordinates received from the server. (Of course this was done with apple maps, but I assume it would work the same with Google Map's GMSMarker)
I also have an alternate server that functioned the same using Python and Twisted for the evented system.

Best practice to sync webservice with offline storage on iOS

I have been working on a few iOS applications that talk to a REST API on the web server and than sync some data down for offline usage. The app then stores data locally if network connection is not available and than syncs with backend whenever the Internet connection is available.
I am wondering if there is a nice pattern or set of rules or library that can be used. I would rather not code this again and again. I know the business logic / sync logic would be different for each app but the rest of the work (ie. storing it locally, calling REST API) can be abstracted out.
Any ideas?
I use the RestKit framework in my app for the exact scenario you describe. The downloaded data are stored in a Core Data store for offline usage.

Is it possible to get a unique identifier for an ios device from a browser, in a controlled environment?

This is (a very simplified version of) the scenario with which I am faced:
I have an existing web application which manages jobs. We are now purchasing a number of ios devices (iphones and ipads) and I need the web application to know which specific device (regardless of the user) is updating information through the web application (as well as getting the GPS co-ordinates, but I think I have that covered with the geolocation API).
I have control of all the devices, they will all come to me before being distributed and will return to me periodically, so I can modify/restrict etc., but I can't jailbreak.
I have no experience of ios, but if there is a way to do this without needing an app, that would be the best choice.
You can use HTML5 storage to create and save a GUID the first time user accesses your website and send it with subsequent requests.

Blackberry app that periodically sends GPS to webserver?

I want to create a background app on a Blackberry that starts when the phone boots and sends gps locations to a webserver periodically. Is this possible without the BES server? I am most likely targeting OS 4.5. Any gotchas I should know about?
thanks
Nick
if you want only background process.
How to - Set up a background application
if you want GUI part also in your application.
How to - Set up an alternate entry point
and for gps update
Get location information updates
You can skip the BES server if you use a PHP or ASP.NET WebService. You can consume that WebService on the Blackberry device using a JSON library found here:
http://www.json.org/
PHP and ASP.NET can receive JSON objects and parse them into objects on that specific programming language.

Resources