Warning: Do not place Android context classes in static fields; this is a memory leak (and also breaks Instant Run)

Just make sure you pass context.getApplicationContext() or call getApplicationContext() on any context that is passed in via methods/constructor to your singleton if you decide to store it in any member field. idiot proof example (even if someone would pass in an activity it will grab the app context and use that to instantiate the singleton): … Read more

Cannot resolve method getApplicationContext()

The trouble is that you are calling getApplicationContext() inside a Class that does not extend Context or its subclasses (Activity, etc). You should pass Context or its subclass to the JSONTask constructor. Furthermore, I don’t see where you are initializing lvMovies – and you are likely to get NullPointerException at lvMovies.setAdapter(adapter); – my suggestion is that you should pass this as well to your JSONTask constructor: so that in the onPostExecute you can … Read more

Failed to connect to camera service

Few things: Why are your use-permissions and use-features tags in your activity tag. Generally, permissions are included as direct children of your <manifest> tag. This could be part of the problem. According to the android camera open documentation, a runtime exception is thrown: if connection to the camera service fails (for example, if the camera … Read more