WCF Service to Read Telnet Data - android

I am using an Android phone in my application to read GPS information. The GPS information is sent over Telnet and I want to read it in my application. I will then databind the position of something like a blob to the GPS data and display a user on a map in real time.
How can I read the NMEA GPS response using WCF and consume it into my application with databinding to the position of the blob? What is the way to go about this? Mine is a desktop application and I am using WPF.

I don't think WCF will solve this issue for you. I would look at something like IP*Works which will help you with the telnet connectivity.

Related

best way to get realtime data to android or ios app

i have 30 gps devices that send latitude longitude via MQTT to my server.
then i process data with python which listen mqtt and insert to mysql database
what i need to do is: on my android and ios app i want to display those cordinates
on map (1 marker for each gps device)
so i dont know what is best way to do that.
so what i think is:
API: create a script.php that query database and show a json format on it.
android and ios app can call it every second but will that make lot of load or idk if that is best practice.
i think similar to AJAX but im afraid this is not good idea to call every second
$.ajax({url: "script.php", success: function(result){
//do something with results
}});
maybe to connect app directly to listen a mqtt or tcp ip:port and publish json there.
some suggestion i see in internet are HTTP long-polling or something that app will stay connected and check if something change.
Websockets would be a good way to implement this right? you send a stream of data from one end and the other side receives it in real time.

Google map real time location update from server

I am developing an android application where I need to share location in real time. I have MySql as a server to store user location. I need to fetch location from server and update on google map. I can do this by simply calling web services to store and retrieve location by timer task. But this cause rapid battery drain , and also this not happens in real time. I want to do all this in real time, I want to move marker on the map if the user is moving. Please help me I'll be very thankful.
Both websockets and GCM may not work.
Whenever you need a real time streaming update to be pushed from the server you need to have a TCP channel connection with your server, and that's how the travel services uber or ola works.
Check how to setup a TCP server socket
If you want to get more accurate location data without the need to use a GPS. Instead, the service tries to triangulate your location by looking at the cell towers and WiFi access points around you. Then use Google Maps Geolocation API. This service is meant to save battery life and allow for better indoor location where GPS can't work.
You can also check this SO question for another solution.
I think you need to use websockets. You can also use GCM to push the location to the application. If you tell more about what technology you're using in the server side, we'll be able to tell more. Hope this helps.

Best back-end choice for GPS-tracking application

I'm about to create a GPS-tracking application for pizza-delivery services in my city, so that when someone orders pizza over the phone or Internet, he can see the courier that carries pizza to him on the map.
Assuming that both courier and client use Android- or iOS-based phone for transmitting/receiving current position, how can I organize a reliable connection between them? Should the courier's phone send his coordinates to my server via HTTP every 5 seconds for delivering it to client, or it will be better to set up something like p2p connection?
I don't know where to start, please help. Thank you very much.
There are open source solutions for GPS tracking. You can start from there instead of developing everything from scratch.
Traccar server (back-end for receiving location data from various devices):
https://github.com/tananaev/traccar
There are also apps for Android and iOS, but only for transmitting location data:
https://github.com/tananaev/traccar-client-android
https://github.com/tananaev/traccar-client-ios
I don't think p2p will be a good solution.
Most of the application use web services and make server calls after a definite interval of time like 10 seconds or 15 seconds refresh to get updated data on both side of apps(Client and courier).
If you want to build a real time application like other real time apps then you need to implement sockets on web and on mobile apps.
But I think in your case web services would be good enough solution.

Android streaming text

I'm creating app that has to show live position of some vehicles. Their position is obtained by GPS via Rasberry PI, is sent to my server and there it is converted to Json file. Then on android device I am creating app which converts this file and lets user see vehicle position.
I am downloading it via HTTP protocol, and I think it is good way of solving problem. But my boss is insisting that it could be done by streaming (because, as he says, it is not neceserry to download data from server when vehicle is not moving for about 30 minutes), SO.
What is the way of creating a situation in which android device is not downloading data but waiting for server to send data? Is it even possible?
As far as I know, streaming is constantly sending data to target device, and device is constantly receiving this data.
The only way I can think about is to create server on every android device, send server data to my server (IP, port etc.) and from my server connect to every device and send position only when vehicle is moving - but this is costfull and not proper way I think.
Any ideas or help?
The best way to handle your problem is implementing a GCM and dealing with PUSH NOTIFICATIONS.
If connection is not available at the moment, will be sent when connection will be ok.
If the receiver isn't available at the moment, same things will happen.
It consumes less resources than constantly http calls.
See more information at https://developer.android.com/google/gcm/index.html

sending a SMS from android phones to a computer?

I am creating an android application which gets the phones location, Latitude and Longitude, and time and sends it to a central database at regular intervals. The problem is I am using SMS to send this data and I am having trouble figuring out where to send it. The first thing which came to my mind is a computer which stores all this data and reads it then carries out an action based on the data, in this case it maps it.
So is it possible to send a SMS to a computer? Or should I try out a different method to send the data?
Any suggestions would be helpful. Thanks! :)
EDIT
I understand it is possible to connect my phone to the computer and then transfer the SMSs but I actually just have 1 phone right now and I cant have it always hooked up to the computer.
Euhm SMS? I dont think that is possible.
Try to use JSON.
https://www.google.nl/search?sugexp=chrome,mod=18&sourceid=chrome&ie=UTF-8&q=Send+data+to+server+android+json
You can connect you phone to your computer as SMS modem and get its SMS from your phone. Almost phone can do this. But the most common way is that integrated with a web service.
While it is possible to send sms to a computer if that computer has a GSM module (or mobile phone connected as modem) you should rather consider a different method.
I'd go with sending emails or - if you are willing to - create an AppEngine Project to receive the data.

Categories

Resources