Skip to content

Instantly share code, notes, and snippets.

window.i18n = window.i18n || {};
i18n._langCache = {}
i18n._availableLangs = [
'en',
'zh-TW',
'ja'
]
@robocide
robocide / weather.java
Last active August 29, 2015 14:06 — forked from KamilLelonek/weather.java
Android: Consuming Web service
HttpUrlconnection connection = null;
BufferedReader reader = null;
String forecastJsonStr = null;
try {
URL url = new URL("http://api.openweathermap.org/data/2.5/forecast/daily?q=94043&mode=json&units=metric&cnt=7");
connection = (HttpUrlconnection) url.openConnection();
connection.setRequestMethod("GET");
connection.connect();