TFW 1.1 is out
- forestnympho
- Jun 18, 2015
- 2 min read
TFW has been updated to version 1.1!
A few issues that were fixed:
1) If you spammed the refresh button, the mediaPlayer would crash and then the app shortly thereafter. Also hitting the back would reveal that all instances of the main activity from the refresh button were still alive and running taking up god knows how much space in memory.
These were related and fixed with placing one command:
Intent intent = getIntent();
finish(); <--Missing command
startActivity(intent);
Leaving out the finish() method, or putting it after startActivity() in the case of this app results in MEMORY LEAKS!!!! D:
2) App saying that It's nice, when its actually rainy as fuck.
In development, I was on the fence about whether to have the condition "10" as rainy or nice since it's really kind of a combination of both on the OpenWeatherMap website. But it looks like OWM likes to use that condition for any kind of rain, no matter how light or heavy. So condition "10" now shows as rainy instead of nice.
3) A hilarious issue would occur where a Forecast temperature would show as a ridiculously low temp like -286:

When doing the Xmls I figured that all of the temps would be out to a certain decimal place, and so I was pulling the temps with a String.substring() method and told it to pull 6 characters (The five numbers + a decial point).
Turns out OWM just does however many decimal points they feel like, so I just decided to use a regex to separate the two temps (Which are both in one string separated by the newline character)
String hl[] = nextDayHiLow.split("\n");
----------------------------------------------------------------------------
As always TFW is open source and can be found at:
















Comments