Blackberry app that periodically sends GPS to webserver? - blackberry

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.

Related

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.

Data push from server to iOS device

I want to send updates from server to iOS device without using APNS when application is not active (not even running in background). Any ideas regarding how can I accomplish that? One thing I want to mention is that it's not a web application to which I want to send updates. Is there any free API that could be used to meet my requirement?
Your help will be greatly appreciated. Thanks.
No, there is no such service. If there was one, it would be a service provided by Apple as it would need to run on the system level.
If the app is still running in the background (i.e. not killed), you could use background-app refresh introduced in iOS7 (c.f. this post for an example).

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

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.

How do iOS apps typically communicate with a server?

I am a Ruby on Rails developer and I have a question about iOS development.
How do iPhone applications typically interact with a server?
For example, let's say you wish to send GPS coords from the iPhone to the server to be stored or processed. How is that typically done? Is it through a typical server API (like JSON)?
Sorry for such a basic question.
EDIT: Thanks for the answers below. Now, how about pushing data from the server to the iPhone app (without a request). How is that done?
The communication format is usually XML or JSON via HTTP call, but it depends on your data you wish to communicate between server and app. You may use socket connection.
Typically, every client and server exchange information via public API's.
in iOS, we prefer, RESTful webservices that deliver JSON. (There are other options also, but we prefer this)
I'd say that the best way to ensure delivery of data to the app from the server depends on whether you know the app is running or not. Push notification can deliver payload data, albeit in small quantities, to the app and it does not matter whether it's currently running or not. It's a big subject but thats a good start.

How can my iPad app subscribe to a RESTful web service so it would update automatically?

I am looking for ways where my RESTful web service can let my iPad app know to update its cached data when the server's data has been updated. The server is running on Tomcat & Apache Jersey.
Is this doable? And not using Apple Push Notification (APN)?
There are essentially two options: heartbeat check from the app to the server (on a timer) or something that keeps the line of communication open, such as web sockets. Here is an open source web socket for iOS, but I have not personally experimented with it:
http://code.google.com/p/unitt/wiki/UnittWebSocketClient
I'm not sure why you want to avoid APN, but this really sounds like what it's made for.
If you want to update only when your app is running, there are other options (straight forward polling comes to mind), but if you want the user to be notified even when the application isn't running, there isn't really any other Apple approved way to do it.
Can reverse the design around and make your device a client and pull data from a REST service at a regular interval?? With all the support one gets from REST, it might be helpful to know you will have complete control of when data is being pulled by the device from server and exactly the data that might goto device.
I'm curious to know your thoughts, Thanks.
I'll be building a web-syncing iOS application soon, and we're going to use RestKit. Take a look, it might be a big help.

Resources