This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private class FetchWeatherTask extends AsyncTask<Void, Void, Void> { | |
private final String LOG_TAG = FetchWeatherTask.class.getSimpleName(); | |
// These two need to be declared outside the try/catch | |
// so that they can be closed in the finally block. | |
HttpURLConnection urlConnection = null; | |
BufferedReader reader = null; | |
// Will contain the raw JSON response as a string. | |
String forecastJsonStr = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (UIImage*) takePicture { | |
int s = 1; | |
UIScreen* screen = [UIScreen mainScreen]; | |
if ([screen respondsToSelector:@selector(scale)]) { | |
s = (int) [screen scale]; | |
} | |
GLint viewport[4]; | |
glGetIntegerv(GL_VIEWPORT, viewport); |