I have been looking at similar questions on this website and Im looking to try to get certain pieces of information from a .xml file on a website that I then duplicate for each individual lake. I am trying to make something that will be able to get the current water level for each of these lakes. I found this tool that can generate .xml of the data but I dont know how to have flutter read that and update it every so often if that makes sense.
https://waterservices.usgs.gov/rest/DV-Test-Tool.html
I was testing this site using Neosho River with the Site number: 07179500. This gives me the following url that seems to contain relevant updated information such as the current discharge rate.
https://waterservices.usgs.gov/nwis/dv/?format=waterml,2.0&sites=07179500&siteStatus=all
How can I have it pull information like this and then re-check every x time to update the current water level etc? I was looking at json? but most guides I found use a file you upload and not a website.
Additionally, there are several other links that may be helpful and might have a better type of data
https://waterservices.usgs.gov/rest/
https://waterservices.usgs.gov/rest/DV-Service.html
https://help.waterdata.usgs.gov/faq/automated-retrievals
https://waterdata.usgs.gov/nwis/dvstat?&site_no=07179500&agency_cd=USGS&por_07179500_55652=92891,00060,55652,1938-10-01,2021-11-21&stat_cds=mean_va&referred_module=sw&format=html_table
https://waterdata.usgs.gov/nc/nwis/uv?cb_00062=on&format=html&site_no=02098197&period=&begin_date=2022-02-28&end_date=2022-03-01
https://www.swt-wc.usace.army.mil/
If flutter can not do this is there something else I can use to work with flutter?
I'm developing an Android app that might use Wikipedia API to retrieve the content of a given page (from its title). I searched a lot in the web but I don't find useful information about the implementation. I read the MediaWiki documentation and I tried to format my requests in json format (example: request for "mountain" page content but the text isn't clear and I don't know how manage the request from my Android application.
So, my question is: how can I getting (clear) wikipedia page content by passing the title page from my application? And how to save the well format content in a String (that will corresponds with a TextView in a second moment)?
Anyone knows a good tutorial or can help me with some snippets?
Thank you very much indeed guys! :)
action=parse or action=mobileview or action=query&prop=extracts, depending on what exactly do you need. Use the API sandbox to interactively experiment with various requests, it has usage examples and shows how to build requests properly.
I a'm writing a timetable app for my school. Therefore I would have to send a notification if the timetable has been changed. So this would be a change in the html code. I can't use the if modified since option because this webpage is automatically updated, so I have to notice a change in the html code.
I hope someone can help me out of here.
There's two ways to do this well, and neither involves looking at the HTML.
1)Write a webservice to query for the raw information. This can include a timestamp of the last update which you can just compare
2)Do the entire feature via push messaging rather than pull.
The only reasons to even consider checking the HTML for this is if you're doing this without the school's help and screen scraping the information. In which case you may as well just do a string.equals between the last html you got and the current one, there's no better way in that case.
Short version at the bottom
I'm working on an android app for a computer game, Heroes Of Newerth. A part of the apps functionality is to list all the heroes in the game. Each hero has:
a short description
a few stats(faction and primary attribute)
an icon
4 spells, which also has:
a short description
a few stats (mana cost, difference in ranks, etc.)
an icon.
There are approximately 110 heroes, which means I have about 500 sets of descriptions and stats.
I made a working version of the app. I downloaded all the images and put them in the drawable folder (note, this was 500 images), and created a Hero Enum which stored name, faction and primary attribute. Obviously, this was a bad idea, as it was horrible looking, and hard to extend to storing the rest of the data.
I have though about using a database, but as I don't have any experience with databases, I'm not really sure as how to do this, especially in Android. I looked it up, and it seems I need to initialize the database on the phone, which means I have to get that data from somewhere - which, again, means I'm back to square one.
I have never worked with this much data in a programming project, and have no idea for how to save it all. As if this is not enough, the game developer, S2 Games, releases new heroes with only weeks in between. As I wouldn't want to update one of my apps every other week, I want the app to be able to update itself with the new data. The best way I see this in my head is you download the app, either with a database of the current heroes, or without any, and the app checks each friday(patches are released on fridays) if the app is up to date. If not, update the database(with text and icons).
Short version
I want to save a few thousand strings, some formated in a special way(unless I can to this afterwards), and about 500 icons. How should I approach this?
Note: I know this was a really bad question, with a horrible structure, but I've been stuck here for weeks, and I couldn't get myself to ask someone, I really need help here!
well it's very recommended that you use sql and databases . you could go to w3schools for the basics .
if you don't want to use DB (or don't have time) , you can store all the data in xml files , and then parse them all . the images should never be part of the DB (or the xml files) , since they cause a bad performance while moving between items.put their names/paths instead .
if the images take a lot of space , consider using google expansion library .
For starters, I am not a programmer, my wife is making me learn how to program for Android because she wants me to make her some apps to use around the house.
I have a basic app that loads a JPG into a WebView window. I read that in order to help manage caching it's a good idea to add a timestamp to a URL.
I am not sure how to add a Timestamp into the URL.
This is what I have now:
mWebView.loadUrl("http://www.website.com/webviewimage.jpg"+"?123");
I plan to replace the "?123" with the Timestamp, but I'm not sure how to type this in. I have this in the beginning of my code so hopefully, I'm thinking I'm halfway there.:
import java.sql.Timestamp;
Thank you so much for your help.
Cheers,
Pat
This will put the current time in milliseconds on to the end of your URL.
mWebView.loadUrl("http://www.website.com/webviewimage.jpg?" + System.currentTimeMillis());