I use these lines of codes to initialize quickblox framework in activity according to quickblox documentation
QBSettings.getInstance().init(getApplicationContext(), APP_ID, AUTH_KEY, AUTH_SECRET);
QBSettings.getInstance().setAccountKey(ACCOUNT_KEY);
but when i use the same code in fragment replacing getApplicationContext() with getActivity() it stops execution on that line, i have also tried getActivity().getApplicationContext and getActivity().getBaseContext() but not wokring for me