當前位置: 首頁>>代碼示例>>Java>>正文


Java SoLoader類代碼示例

本文整理匯總了Java中com.facebook.soloader.SoLoader的典型用法代碼示例。如果您正苦於以下問題:Java SoLoader類的具體用法?Java SoLoader怎麽用?Java SoLoader使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


SoLoader類屬於com.facebook.soloader包,在下文中一共展示了SoLoader類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setup

import com.facebook.soloader.SoLoader; //導入依賴的package包/類
@Before
public void setup() {
  ModuleHolder moduleHolder = new ModuleHolder("MethodsModule",
    false,
    false,
    false,
    false,
    new Provider<MethodsModule>() {
      MethodsModule mModule;
      @Override
      public MethodsModule get() {
        mModule = new MethodsModule();
        return mModule;
      }
    });
  mWrapper = new JavaModuleWrapper(null, MethodsModule.class, moduleHolder);
  mMethods = mWrapper.getMethodDescriptors();
  PowerMockito.mockStatic(SoLoader.class);
  mArguments = PowerMockito.mock(ReadableNativeArray.class);
}
 
開發者ID:qq565999484,項目名稱:RNLearn_Project1,代碼行數:21,代碼來源:BaseJavaModuleTest.java

示例2: ensure

import com.facebook.soloader.SoLoader; //導入依賴的package包/類
public static synchronized void ensure() {
  if (!sInitialized) {
    // On Android 4.1.2 the loading of the static-webp native library can fail because
    // of the dependency with fb_jpegturbo. In this case we have to explicitely load that
    // library
    if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.JELLY_BEAN) {
      try {
        SoLoader.loadLibrary("fb_jpegturbo");
      } catch (UnsatisfiedLinkError error) {
        // Head in the sand
      }
    }
    SoLoader.loadLibrary("static-webp");
    sInitialized = true;
  }
}
 
開發者ID:facebook,項目名稱:fresco,代碼行數:17,代碼來源:StaticWebpNativeLoader.java

示例3: onCreate

import com.facebook.soloader.SoLoader; //導入依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();
    initTimber();
    SoLoader.init(this, false);
    Stetho.initialize(
            Stetho.newInitializerBuilder(this)
                    .enableWebKitInspector(new LithoWebKitInspector(this))
                    .build());
    Fresco.initialize(this);

    appComponent = makeAppComponent();
}
 
開發者ID:dbof10,項目名稱:redux-observable,代碼行數:14,代碼來源:App.java

示例4: setUp

import com.facebook.soloader.SoLoader; //導入依賴的package包/類
@Before public void setUp() throws Exception {
  SoLoader.init(InstrumentationRegistry.getContext(), false);


  final SharedPreferences prefs =
      PreferenceManager.getDefaultSharedPreferences(InstrumentationRegistry.getContext());
  final Crypto crypto = AndroidConceal
      .get()
      .createDefaultCrypto(new SharedPrefsBackedKeyChain(
          InstrumentationRegistry.getContext(),
          CryptoConfig.KEY_256
      ));

  factory = new ConcealPreferenceFactory(crypto, prefs);
}
 
開發者ID:prolificinteractive,項目名稱:Patrons,代碼行數:16,代碼來源:ConcealIntPreferenceTest.java

示例5: setUp

import com.facebook.soloader.SoLoader; //導入依賴的package包/類
@Before public void setUp() throws Exception {
  SoLoader.init(InstrumentationRegistry.getContext(), false);

  prefs = PreferenceManager.getDefaultSharedPreferences(InstrumentationRegistry.getContext());
  crypto = AndroidConceal
      .get()
      .createDefaultCrypto(new SharedPrefsBackedKeyChain(
          InstrumentationRegistry.getContext(),
          CryptoConfig.KEY_256
      ));
}
 
開發者ID:prolificinteractive,項目名稱:Patrons,代碼行數:12,代碼來源:ConcealFloatPreferenceTest.java

示例6: onCreate

import com.facebook.soloader.SoLoader; //導入依賴的package包/類
@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);
  GrowingIO.startWithConfiguration(this, new Configuration()
          .useID()
          .trackAllFragments()
          .setChannel("應用商店"));

}
 
開發者ID:growingio,項目名稱:react-native-growingio,代碼行數:11,代碼來源:MainApplication.java

示例7: onCreate

import com.facebook.soloader.SoLoader; //導入依賴的package包/類
@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);
  registerActivityLifecycleCallbacks(new LifecycleCallbacks(){
    @Override
    public void onActivityCreated(Activity activity, Bundle savedInstanceState) {
      scanDocPackage.onActivityCreated(activity);
    }
  });
}
 
開發者ID:beast,項目名稱:react-native-scan-doc,代碼行數:12,代碼來源:MainApplication.java

示例8: onCreate

import com.facebook.soloader.SoLoader; //導入依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();
    SoLoader.init(this, /* native exopackage */ false);
    if (!BuildConfig.DEBUG) {
        CrashReport.initCrashReport(getApplicationContext(), "900019562", false);
    }
}
 
開發者ID:qq565999484,項目名稱:RNLearn_Project1,代碼行數:9,代碼來源:MainApplication.java

示例9: initializeSoLoaderIfNecessary

import com.facebook.soloader.SoLoader; //導入依賴的package包/類
private static void initializeSoLoaderIfNecessary(Context applicationContext) {
  // Call SoLoader.initialize here, this is required for apps that does not use exopackage and
  // does not use SoLoader for loading other native code except from the one used by React Native
  // This way we don't need to require others to have additional initialization code and to
  // subclass android.app.Application.

  // Method SoLoader.init is idempotent, so if you wish to use native exopackage, just call
  // SoLoader.init with appropriate args before initializing ReactInstanceManager
  SoLoader.init(applicationContext, /* native exopackage */ false);
}
 
開發者ID:qq565999484,項目名稱:RNLearn_Project1,代碼行數:11,代碼來源:ReactInstanceManager.java

示例10: onBaseContextAttached

import com.facebook.soloader.SoLoader; //導入依賴的package包/類
@Override
protected void onBaseContextAttached() {
  // This is a terrible hack.  Don't copy it.
  // It's unfortunate that Instagram does the same thing.
  // We need to do this here because internal apps use SoLoader,
  // and Open Source Buck uses ExopackageSoLoader.
  // If you feel the need to copy this, we should refactor it
  // into an FB-specific subclass of ExopackageApplication.
  SoLoader.init(this, (ReactBuildConfig.EXOPACKAGE_FLAGS & 2) != 0);
}
 
開發者ID:qq565999484,項目名稱:RNLearn_Project1,代碼行數:11,代碼來源:ReactTestAppShell.java

示例11: initializeSoLoaderIfNecessary

import com.facebook.soloader.SoLoader; //導入依賴的package包/類
private static void initializeSoLoaderIfNecessary(Context applicationContext) {
  // Call SoLoader.initialize here, this is required for apps that does not use exopackage and
  // does not use SoLoader for loading other native code except from the one used by React Native
  // This way we don't need to require others to have additional initialization code and to
  // subclass android.app.Application.

  // Method SoLoader.init is idempotent, so if you wish to use native exopackage, just call
  // SoLoader.init with appropriate args before initializing ReactInstanceManagerImpl
  SoLoader.init(applicationContext, /* native exopackage */ false);
}
 
開發者ID:john1jan,項目名稱:ReactNativeSignatureExample,代碼行數:11,代碼來源:ReactInstanceManagerImpl.java

示例12: onCreate

import com.facebook.soloader.SoLoader; //導入依賴的package包/類
@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);

  ReactNavigationCoordinator coordinator = ReactNavigationCoordinator.sharedInstance;
  coordinator.injectReactInstanceManager(mReactNativeHost.getReactInstanceManager());
  coordinator.start(this);
}
 
開發者ID:airbnb,項目名稱:native-navigation,代碼行數:10,代碼來源:MainApplication.java

示例13: initializeSoLoaderIfNecessary

import com.facebook.soloader.SoLoader; //導入依賴的package包/類
private static void initializeSoLoaderIfNecessary(Context applicationContext) {
  // Call SoLoader.initialize here, this is required for apps that does not use exopackage and
  // does not use SoLoader for loading other native code except from the one used by React Native
  // This way we don't need to require others to have additional initialization code and to
  // subclass android.app.Application.

  // Method SoLoader.init is idempotent, so if you wish to use native exopackage, just call
  // SoLoader.init with appropriate args before initializing XReactInstanceManagerImpl
  SoLoader.init(applicationContext, /* native exopackage */ false);
}
 
開發者ID:Right-Men,項目名稱:Ironman,代碼行數:11,代碼來源:XReactInstanceManagerImpl.java

示例14: initialize

import com.facebook.soloader.SoLoader; //導入依賴的package包/類
/** Initializes Fresco with the specified config. */
public static void initialize(
    Context context,
    @Nullable ImagePipelineConfig imagePipelineConfig,
    @Nullable DraweeConfig draweeConfig) {
  if (sIsInitialized) {
    FLog.w(
        TAG,
        "Fresco has already been initialized! `Fresco.initialize(...)` should only be called " +
          "1 single time to avoid memory leaks!");
  } else {
    sIsInitialized = true;
  }
  try {
    SoLoader.init(context, 0);
  } catch (IOException e) {
    throw new RuntimeException("Could not initialize SoLoader", e);
  }
  // we should always use the application context to avoid memory leaks
  context = context.getApplicationContext();
  if (imagePipelineConfig == null) {
    ImagePipelineFactory.initialize(context);
  } else {
    ImagePipelineFactory.initialize(imagePipelineConfig);
  }
  initializeDrawee(context, draweeConfig);
}
 
開發者ID:facebook,項目名稱:fresco,代碼行數:28,代碼來源:Fresco.java

示例15: onCreate

import com.facebook.soloader.SoLoader; //導入依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();
    SoLoader.init(this, /* native exopackage */ false);
}
 
開發者ID:hiteshsahu,項目名稱:FingerPrint-Authentication-With-React-Native-Android,代碼行數:6,代碼來源:MainApplication.java


注:本文中的com.facebook.soloader.SoLoader類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。