当前位置: 首页>>代码示例>>Java>>正文


Java DumperPlugin类代码示例

本文整理汇总了Java中com.facebook.stetho.dumpapp.DumperPlugin的典型用法代码示例。如果您正苦于以下问题:Java DumperPlugin类的具体用法?Java DumperPlugin怎么用?Java DumperPlugin使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DumperPlugin类属于com.facebook.stetho.dumpapp包,在下文中一共展示了DumperPlugin类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreate

import com.facebook.stetho.dumpapp.DumperPlugin; //导入依赖的package包/类
@Override
public void onCreate() {
  super.onCreate();
  final Context context = this;
  Stetho.initialize(Stetho.newInitializerBuilder(context)
      .enableDumpapp(new DumperPluginsProvider() {
        @Override
        public Iterable<DumperPlugin> get() {
          return new Stetho.DefaultDumperPluginsBuilder(context)
              .provide(new FrescoStethoPlugin())
              .finish();
        }
      })
      .build());
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:16,代码来源:ComparisonApp.java

示例2: get

import com.facebook.stetho.dumpapp.DumperPlugin; //导入依赖的package包/类
@Override
public Iterable<DumperPlugin> get() {
    List<DumperPlugin> plugins = new ArrayList<>();
    for (DumperPlugin plugin : Stetho.defaultDumperPluginsProvider(context).get()) {
        plugins.add(plugin);
    }
    plugins.add(appDumper);
    return plugins;
}
 
开发者ID:Nilhcem,项目名称:droidconde-2016,代码行数:10,代码来源:StethoInitializer.java

示例3: onCreate

import com.facebook.stetho.dumpapp.DumperPlugin; //导入依赖的package包/类
@Override
    public void onCreate() {
        super.onCreate();
        INSTANCE = this;
        final Context mContext = this;
        DBUtils.getInstance().initDB(getApplicationContext());
        Stetho.initialize(Stetho.newInitializerBuilder(mContext)
                .enableDumpapp(new DumperPluginsProvider() {
                    @Override
                    public Iterable<DumperPlugin> get() {
                        return new Stetho.DefaultDumperPluginsBuilder(mContext)
                                .provide(new HprofDumperPlugin(mContext))
                                .finish();
                    }
                })
                .enableWebKitInspector(Stetho.defaultInspectorModulesProvider(mContext))
                .build());
        Stetho.initializeWithDefaults(mContext);




        HttpsUtils.SSLParams sslParams = HttpsUtils.getSslSocketFactory(null, null, null);
        OkHttpClient okHttpClient = new OkHttpClient.Builder()
//                .addInterceptor(new LoggerInterceptor("TAG"))
                .connectTimeout(10000L, TimeUnit.MILLISECONDS)
                .sslSocketFactory(sslParams.sSLSocketFactory, sslParams.trustManager)
                .readTimeout(10000L, TimeUnit.MILLISECONDS)
                //其他配置
                .build();

        OkHttpUtils.initClient(okHttpClient);
    }
 
开发者ID:ZhuoKeTeam,项目名称:AndroidJsoup,代码行数:34,代码来源:IApplication.java

示例4: initializeWithDefaults

import com.facebook.stetho.dumpapp.DumperPlugin; //导入依赖的package包/类
/**
 * Start the listening server.  Most of the heavy lifting initialization is deferred until the
 * first socket connection is received, allowing this to be safely used for debug builds on
 * even low-end hardware without noticeably affecting performance.
 */
public static void initializeWithDefaults(final Context context) {
  initialize(new Initializer(context) {
    @Override
    protected Iterable<DumperPlugin> getDumperPlugins() {
      return new DefaultDumperPluginsBuilder(context).finish();
    }

    @Override
    protected Iterable<ChromeDevtoolsDomain> getInspectorModules() {
      return new DefaultInspectorModulesBuilder(context).finish();
    }
  });
}
 
开发者ID:facebook,项目名称:stetho,代码行数:19,代码来源:Stetho.java

示例5: defaultDumperPluginsProvider

import com.facebook.stetho.dumpapp.DumperPlugin; //导入依赖的package包/类
public static DumperPluginsProvider defaultDumperPluginsProvider(final Context context) {
  return new DumperPluginsProvider() {
    @Override
    public Iterable<DumperPlugin> get() {
      return new DefaultDumperPluginsBuilder(context).finish();
    }
  };
}
 
开发者ID:facebook,项目名称:stetho,代码行数:9,代码来源:Stetho.java

示例6: finish

import com.facebook.stetho.dumpapp.DumperPlugin; //导入依赖的package包/类
public Iterable<DumperPlugin> finish() {
  provideIfDesired(new HprofDumperPlugin(mContext));
  provideIfDesired(new SharedPreferencesDumperPlugin(mContext));
  provideIfDesired(new CrashDumperPlugin());
  provideIfDesired(new FilesDumperPlugin(mContext));
  return mDelegate.finish();
}
 
开发者ID:facebook,项目名称:stetho,代码行数:8,代码来源:Stetho.java

示例7: create

import com.facebook.stetho.dumpapp.DumperPlugin; //导入依赖的package包/类
@Override
public SocketHandler create() {
  ProtocolDetectingSocketHandler socketHandler =
      new ProtocolDetectingSocketHandler(mContext);

  Iterable<DumperPlugin> dumperPlugins = getDumperPlugins();
  if (dumperPlugins != null) {
    Dumper dumper = new Dumper(dumperPlugins);

    socketHandler.addHandler(
        new ProtocolDetectingSocketHandler.ExactMagicMatcher(
            DumpappSocketLikeHandler.PROTOCOL_MAGIC),
        new DumpappSocketLikeHandler(dumper));

    // Support the old HTTP-based protocol since it's relatively straight forward to do.
    DumpappHttpSocketLikeHandler legacyHandler = new DumpappHttpSocketLikeHandler(dumper);
    socketHandler.addHandler(
        new ProtocolDetectingSocketHandler.ExactMagicMatcher(
            "GET /dumpapp".getBytes()),
        legacyHandler);
    socketHandler.addHandler(
        new ProtocolDetectingSocketHandler.ExactMagicMatcher(
            "POST /dumpapp".getBytes()),
        legacyHandler);
  }

  Iterable<ChromeDevtoolsDomain> inspectorModules = getInspectorModules();
  if (inspectorModules != null) {
    socketHandler.addHandler(
        new ProtocolDetectingSocketHandler.AlwaysMatchMatcher(),
        new DevtoolsSocketHandler(mContext, inspectorModules));
  }

  return socketHandler;
}
 
开发者ID:facebook,项目名称:stetho,代码行数:36,代码来源:Stetho.java

示例8: initializeStetho

import com.facebook.stetho.dumpapp.DumperPlugin; //导入依赖的package包/类
private void initializeStetho(final Context context) {
  // See also: Stetho.initializeWithDefaults(Context)
  Stetho.initialize(Stetho.newInitializerBuilder(context)
      .enableDumpapp(new DumperPluginsProvider() {
        @Override
        public Iterable<DumperPlugin> get() {
          return new Stetho.DefaultDumperPluginsBuilder(context)
              .provide(new HelloWorldDumperPlugin())
              .provide(new APODDumperPlugin(context.getContentResolver()))
              .finish();
        }
      })
      .enableWebKitInspector(new ExtInspectorModulesProvider(context))
      .build());
}
 
开发者ID:facebook,项目名称:stetho,代码行数:16,代码来源:SampleDebugApplication.java

示例9: get

import com.facebook.stetho.dumpapp.DumperPlugin; //导入依赖的package包/类
@Override
public Iterable<DumperPlugin> get() {
    List<DumperPlugin> plugins = new ArrayList<>();
    for (DumperPlugin defaultPlugin : Stetho.defaultDumperPluginsProvider(mContext).get()) {
        plugins.add(defaultPlugin);
    }
    // Add InfoDumperPlugin
    plugins.add(new InfoDumperPlugin(mContext));
    return plugins;
}
 
开发者ID:shikato,项目名称:info-dumper,代码行数:11,代码来源:MyApplication.java

示例10: get

import com.facebook.stetho.dumpapp.DumperPlugin; //导入依赖的package包/类
@Override
        public Iterable<DumperPlugin> get() {
            ArrayList<DumperPlugin> plugins = new ArrayList<DumperPlugin>();
            for (DumperPlugin defaultPlugin : Stetho.defaultDumperPluginsProvider(mContext).get()) {
                plugins.add(defaultPlugin);
            }
//            plugins.add(new HelloWorldDumperPlugin());
            return plugins;
        }
 
开发者ID:yandex-disk,项目名称:yandex-disk-restapi-java,代码行数:10,代码来源:Application.java

示例11: onCreate

import com.facebook.stetho.dumpapp.DumperPlugin; //导入依赖的package包/类
@Override
public void onCreate() {
  super.onCreate();
  FLog.setMinimumLoggingLevel(FLog.VERBOSE);
  Set<RequestListener> listeners = new HashSet<>();
  listeners.add(new RequestLoggingListener());

  OkHttpClient okHttpClient = new OkHttpClient.Builder()
      .addNetworkInterceptor(new StethoInterceptor())
      .build();

  ImagePipelineConfig imagePipelineConfig =
      OkHttpImagePipelineConfigFactory.newBuilder(this, okHttpClient)
          .setRequestListeners(listeners)
          .setProgressiveJpegConfig(new SimpleProgressiveJpegConfig())
          .setImageDecoderConfig(CustomImageFormatConfigurator.createImageDecoderConfig(this))
          .experiment()
          .setMediaVariationsIndexEnabled(
              new Supplier<Boolean>() {
                @Override
                public Boolean get() {
                  return true;
                }
              })
          .experiment()
          .setBitmapPrepareToDraw(true, 0, Integer.MAX_VALUE, true)
          .experiment()
          .setSmartResizingEnabled(Suppliers.BOOLEAN_TRUE)
          .build();

  ImagePipelineConfig.getDefaultImageRequestConfig().setProgressiveRenderingEnabled(true);

  DraweeConfig.Builder draweeConfigBuilder = DraweeConfig.newBuilder();
  CustomImageFormatConfigurator.addCustomDrawableFactories(this, draweeConfigBuilder);

  draweeConfigBuilder.setDebugOverlayEnabledSupplier(
      DebugOverlaySupplierSingleton.getInstance(getApplicationContext()));

  Fresco.initialize(this, imagePipelineConfig, draweeConfigBuilder.build());

  final Context context = this;
  Stetho.initialize(
      Stetho.newInitializerBuilder(context)
          .enableDumpapp(
              new DumperPluginsProvider() {
                @Override
                public Iterable<DumperPlugin> get() {
                  return new Stetho.DefaultDumperPluginsBuilder(context)
                      .provide(new FrescoStethoPlugin())
                      .finish();
                }
              })
          .enableWebKitInspector(Stetho.defaultInspectorModulesProvider(context))
          .build());
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:56,代码来源:ShowcaseApplication.java

示例12: provide

import com.facebook.stetho.dumpapp.DumperPlugin; //导入依赖的package包/类
public DefaultDumperPluginsBuilder provide(DumperPlugin plugin) {
  mDelegate.provide(plugin.getName(), plugin);
  return this;
}
 
开发者ID:facebook,项目名称:stetho,代码行数:5,代码来源:Stetho.java

示例13: provideIfDesired

import com.facebook.stetho.dumpapp.DumperPlugin; //导入依赖的package包/类
private DefaultDumperPluginsBuilder provideIfDesired(DumperPlugin plugin) {
  mDelegate.provideIfDesired(plugin.getName(), plugin);
  return this;
}
 
开发者ID:facebook,项目名称:stetho,代码行数:5,代码来源:Stetho.java

示例14: getDumperPlugins

import com.facebook.stetho.dumpapp.DumperPlugin; //导入依赖的package包/类
@Nullable
protected abstract Iterable<DumperPlugin> getDumperPlugins();
 
开发者ID:facebook,项目名称:stetho,代码行数:3,代码来源:Stetho.java

示例15: get

import com.facebook.stetho.dumpapp.DumperPlugin; //导入依赖的package包/类
Iterable<DumperPlugin> get(); 
开发者ID:facebook,项目名称:stetho,代码行数:2,代码来源:DumperPluginsProvider.java


注:本文中的com.facebook.stetho.dumpapp.DumperPlugin类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。