Of course, never fails. Found the solution about a minute after posting the above question… solution for those that may have had the same issue:
ContextWrapper.getFilesDir()
Found here.
More Related Contents:
- return object of getContext
- What is ‘Context’ on Android?
- When to call activity context OR application context?
- Static way to get ‘Context’ in Android?
- Difference between getContext() , getApplicationContext() , getBaseContext() and “this”
- What’s the difference between the various methods to get an Android Context?
- getActivity() returns null in Fragment function
- getApplication() vs. getApplicationContext()
- Dialog throwing “Unable to add window — token null is not for an application” with getApplication() as context
- How to get package name from anywhere?
- Calling startActivity() from outside of an Activity context
- difference and when to use getApplication(), getApplicationContext(), getBaseContext() and someClass.this
- What’s “tools:context” in Android layout files?
- Android : Static Fields and Memory Leaks
- getApplicationContext(), getBaseContext(), getApplication(), getParent()
- What is the difference between Activity and Context?
- How can I share a SharedPreferences file across two different android apps?
- Why does AlertDialog.Builder(Context context) only accepts Activity as a parameter?
- Why getApplicationContext() in constructor of Activity throws null pointer exception?
- Get context inside onClick(DialogInterface v, int buttonId)?
- Call getLayoutInflater() in places not in activity
- Android: why must use getBaseContext() instead of this
- How to get Context in Android MVVM ViewModel
- How to get my activity context?
- How to call getResources() from a class which has no context?
- Diffinitive rules for using Android’s getBaseContext, getApplicationContext or using an Activity’s “this”
- Android: ProgressDialog doesn’t show
- Android : References to a Context and memory leaks
- Getting the Application Context
- android – How to get view from context?