Binary Data to Android Phone - best implementation?


Last Updated:

  1. goon15

    goon15 New Member This Topic's Starter

    Joined:
    Jul 8, 2010
    Messages:
    1
    Likes Received:
    0
    Hello, I'm looking for some input on how to go about a problem I have. We have a device that has binary data that it needs to send out (they are mainly just symbols, but in a custom binary format) over ethernet. I need to intercept this data on the phone and display the symbols over google maps. I'm just wondering the best way to go about this, I have a few ideas but am not sure if they are possible or feasable:

    1. Is it possible for the phone to connect directly to the device if the device had some sort of server running on it, then poll for new data? If so, what is the protocol needed to be able to direct connect like that?
    2. Perhaps modify the device software to send data to the phone(s) in SMS data message format? Im not sure if it is possible for software to "spoof" an SMS to a phone when it is not a phone itself?
    3. Have the device software upload all its binary data to a ftp/http server that is sitting out there somewhere, have the phone(s) connect to that server and poll for new data periodically?

    I'm brand new to android development, basically all I want to do is grab this binary data from the device on my phone and parse/display it over google maps. How do any of those ideas sound, or is there a much easier way I am overlooking? Thanks!
     

    Advertisement
  2. jeffxtreme

    jeffxtreme New Member

    Joined:
    Jul 8, 2010
    Messages:
    2
    Likes Received:
    0
    I believe all three options are viable if the device you are talking about is capable of it. For all of these ways, make sure you include

    <uses-permission android:name="android.permission.INTERNET" />

    into the AndroidManifest.xml file right outside the application tag.


    1. If you're device has access to wifi, then I would set up a TCP server on the device (TCP/IP protocol). Make sure you set a wireless network with a router after that. Then, all you would have to do was connect to the device from the phone through a TCP socket, and send the binary data over to the phone. For more information on how to do so, just read the tutorial from Sun Java. It's basically the same as doing it on a computer. Here's the link: Lesson: All About Sockets (The Java&#8482; Tutorials > Custom Networking)I recommend reading the entire article about Custom Networking, it's actually quite interesting...
    2. If you're device has a working internet connection, I'm sure there's a way to do that. There's plenty of web services allowing one to send SMS messages over the web.
    3. That seems like a viable option, too. The device that you're using would again require an internet connection to move it all to a server. Then, you would use the same tutorial: Trail: Custom Networking (The Java&#8482; Tutorials)to find out how to send stuff through HTTP.

    Hopefully that helps. By the way, what are you using to send binary data?
     

Share This Page

Loading...