I am making an app that makes a JsonObjectRequest
and retrieves a JSON data from an URL using the Volley Networking Library for android.
AppCon
you can't use an Activity
like a Singleton. An Activity
is a screen of your app and it could be in different states during the usage of your app. You are also leaking it, since you keep a static reference to it. For your purpose, if you need a Context, extend Application
instead of AppCompatActivity
, and register it in your Manifest.