Reputation: 19
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
Upvotes: 0
Views: 70
Reputation: 13593
You have to write these line of code In your Application class. Take a reference from Here
. Hope it will help you out.
Upvotes: 1