Created
August 8, 2020 08:56
-
-
Save manoj-mili/184a1cccc63bf2907b9bfb7fcb3bad04 to your computer and use it in GitHub Desktop.
Initializing AndroidNetworking in your BaseApp class with logging if required
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BaseApp extends Application { | |
@Override | |
public void onCreate() { | |
super.onCreate(); | |
AndroidNetworking.initialize(getApplicationContext()); | |
if (BuildConfig.DEBUG) { | |
//For logging api request and response | |
AndroidNetworking.enableLogging(HttpLoggingInterceptor.Level.BODY); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment