Skip to content

Instantly share code, notes, and snippets.

@manoj-mili
Created August 8, 2020 08:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manoj-mili/184a1cccc63bf2907b9bfb7fcb3bad04 to your computer and use it in GitHub Desktop.
Save manoj-mili/184a1cccc63bf2907b9bfb7fcb3bad04 to your computer and use it in GitHub Desktop.
Initializing AndroidNetworking in your BaseApp class with logging if required
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