Everything with Stetho works great in my sample application, which I tested after going through this YouTube tutorial (SQLite, SharedPreferences show), except for viewing the Network of Calls that I would like to receive.
I make numerous API calls when loading the application. For example, in my Service.java class, as shown in the link below. It may not appear in Stetho because an API call occurs when the application loads before Stetho can be opened. Any ideas would be appreciated to make this feature work.
I initialize Stetho in my MainActivity.java. In onCreate () I have
// Initialize Stetho Stetho.initialize( Stetho.newInitializerBuilder(this) .enableDumpapp(new SampleDumperPluginsProvider(this)) .enableWebKitInspector(Stetho.defaultInspectorModulesProvider(this)) .build());
Then I also included the Stetho Class below.
// Create class for Stetho private static class SampleDumperPluginsProvider implements DumperPluginsProvider { private final Context mContext; public SampleDumperPluginsProvider(Context context){mContext = context;} @Override public Iterable<DumperPlugin> get() { ArrayList<DumperPlugin> plugins = new ArrayList<>(); for (DumperPlugin defaultPlugin : Stetho.defaultDumperPluginsProvider(mContext).get()) { plugins.add(defaultPlugin); } //plugins.add(new SyncAdapterFragment()); return plugins; } }
and of course I also have corresponding dependencies
compile 'com.facebook.stetho:stetho:1.3.0'
Thanks!
source share