Android Question Data monitoring with no API, best practices?

Discussion in 'Android Questions' started by cyiwin, Jul 11, 2015.

  1. cyiwin

    cyiwin Active Member Licensed User

    Usually if I want to make an app that needs to monitor web data I'll check if there is an API, most likely there isn't. When this is the case what is the best way to collect data?

    I've tried API software like Kimono. It works nicely for the most part, but it is adding another point of failure.

    I've also tried using HttpUtils2 to download the website. Then using string functions and regex to get the data I want. It seems like a cumbersome way of going about it. Are there better methods?
     
  2. LucaMs

    LucaMs Expert Licensed User

  3. NJDude

    NJDude Expert Licensed User

    Simply put: NO.

    Even if there's an API, they can change, get deprecated, etc, and services like Kimono or even if you do your own scraping are subject to changes (not to mention cumbersome as you said), so, if you rely on any of these, you will have to keep an eye open to any modifications and adjust your app accordingly, that's the nature of the beast.
     
    susu, MikeH and DonManfred like this.
  4. cyiwin

    cyiwin Active Member Licensed User

    Thanks for the advice. I bet Jtidy comes in real handy. Is there any issues with multiple file writes? It seems like writing JSON to a string would be easier.

    Unless someone thinks it's a bad idea I think I'll take some burden off the client by using B4J to download the http, sort the data and write it to a MySQL table. Then the device will just have to download the SQL data using RDC.

    I wish there was a way web hosts could auto generate API's. ;)
     
Loading...