How can I get the context in a fragment?
I need to use my database whose constructor takes in the context, but getApplicationContext() and Fragmen
getApplicationContext()
Fragmen
getContext() came in API 23. Replace it with getActivity() everywhere in the code.
getContext()
See if it fixes the error. Try to use methods which are in between the target and minimun API level, else this error will come in place.