[Solved] What is the difference between getActivity() and getApplicationContext() in android?


getSystemService() is a method on Context. Fragment does not inherit from Context. Activity does. You can call getActivity() on your Fragment to obtain an Activity on which to call getSystemService().

2

solved What is the difference between getActivity() and getApplicationContext() in android?