0

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

1 Answers1

1

You have to write these line of code In your Application class. Take a reference from Here

. Hope it will help you out.

Rahul Sharma
  • 12,515
  • 6
  • 21
  • 30