Java Code Examples for com.facebook.soloader.SoLoader

The following examples show how to use com.facebook.soloader.SoLoader. These examples are extracted from open source projects.
Example 1
Project: react-native-android-activity   File: MainApplication.java    License: MIT License 5 votes vote down vote up
/**
 * Called when the application is starting, before any activity, service,
 * or receiver objects (excluding content providers) have been created.
 *
 * <p>This implementation loads the React Native JNI libraries.</p>
 */
@Override
@CallSuper
public void onCreate() {
    super.onCreate();
    SoLoader.init(this, false);
}
 
Example 2
Project: photo-viewer   File: MainApplication.java    License: Apache License 2.0 5 votes vote down vote up
@Override
    public void onCreate() {
        super.onCreate();
        SoLoader.init(this, /* native exopackage */ false);
        ImagePipelineConfig config = ImagePipelineConfig.newBuilder(this)
                .setProgressiveJpegConfig(new SimpleProgressiveJpegConfig())
                .setResizeAndRotateEnabledForNetwork(true)
                .setDownsampleEnabled(true)
                .build();
//        debug
//        DraweeConfig draweeConfig = DraweeConfig.newBuilder()
//                .setDrawDebugOverlay(true)
//                .build();
        Fresco.initialize(this, config);
    }
 
Example 3
Project: native-navigation   File: MainApplication.java    License: MIT License 5 votes vote down vote up
@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);

  ReactNavigationCoordinator coordinator = ReactNavigationCoordinator.sharedInstance;
  coordinator.injectReactInstanceManager(mReactNativeHost.getReactInstanceManager());
  coordinator.start(this);
}
 
Example 4
Project: Instabug-React-Native   File: MainApplication.java    License: MIT License 5 votes vote down vote up
@Override
public void onCreate() {
  super.onCreate();
  new RNInstabugReactnativePackage.Builder("YOUR_TOKEN", MainApplication.this)
          .setInvocationEvent("button")
          .setPrimaryColor("#1D82DC")
          .setFloatingEdge("left")
          .setFloatingButtonOffsetFromTop(250)
          .build();
  SoLoader.init(this, /* native exopackage */ false);
}
 
Example 5
Project: react-native-GPay   File: ReactInstanceManager.java    License: MIT License 5 votes vote down vote up
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);
}
 
Example 6
Project: react-native-GPay   File: ReactImagePropertyTest.java    License: MIT License 5 votes vote down vote up
@Before
public void setup() {
  SoLoader.setInTestMode();
  mContext = new ReactApplicationContext(RuntimeEnvironment.application);
  mCatalystInstanceMock = ReactTestHelper.createMockCatalystInstance();
  mContext.initializeWithInstance(mCatalystInstanceMock);
  mThemeContext = new ThemedReactContext(mContext, mContext);
  Fresco.initialize(mContext);
  DisplayMetricsHolder.setWindowDisplayMetrics(new DisplayMetrics());
}
 
Example 7
Project: litho   File: LithoLabApplication.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void onCreate() {
  super.onCreate();

  SoLoader.init(this, false);
  Fresco.initialize(this);
}
 
Example 8
Project: litho   File: DiffingTreePropTestActivity.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);

  SoLoader.init(this, false);

  final ComponentContext c = new ComponentContext(this);
  final LithoView lithoView = LithoView.create(c, RootDiffingComponent.create(c).build());
  setContentView(lithoView);
}
 
Example 9
Project: react-native-node   File: MainApplication.java    License: MIT License 4 votes vote down vote up
@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);
}
 
Example 10
Project: react-native-mail-compose   File: MainApplication.java    License: MIT License 4 votes vote down vote up
@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);
}
 
Example 11
Project: react-native-get-location   File: MainApplication.java    License: MIT License 4 votes vote down vote up
@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);
  initializeFlipper(this); // Remove this line if you don't want Flipper enabled
}
 
Example 12
Project: react-native-3d-model-view   File: MainApplication.java    License: MIT License 4 votes vote down vote up
@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);
}
 
Example 13
Project: react-native-fcm   File: MainApplication.java    License: MIT License 4 votes vote down vote up
@Override
public void onCreate() { // <-- Check this block exists
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false); // <-- Check this line exists within the block
}
 
Example 14
Project: react-native-app-auth   File: MainApplication.java    License: MIT License 4 votes vote down vote up
@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);
  initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
}
 
Example 15
Project: react-native-share   File: MainApplication.java    License: MIT License 4 votes vote down vote up
@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);
  initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
}
 
Example 16
Project: react-native-tcp-socket   File: MainApplication.java    License: MIT License 4 votes vote down vote up
@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);
  initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
}
 
Example 17
Project: react-native-workers   File: ReactContextBuilder.java    License: BSD 2-Clause "Simplified" License 4 votes vote down vote up
public ReactContextBuilder(Context context) {
    this.parentContext = context;
    SoLoader.init(context, /* native exopackage */ false);
}
 
Example 18
Project: react-native-sync-adapter   File: MainApplication.java    License: MIT License 4 votes vote down vote up
@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);
  initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
}
 
Example 19
Project: rn-background-location   File: MainApplication.java    License: MIT License 4 votes vote down vote up
@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);
}
 
Example 20
Project: dingo   File: MainApplication.java    License: GNU General Public License v3.0 4 votes vote down vote up
@Override
public void onCreate() {
  Fabric.with(this, new Crashlytics());
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);
}
 
Example 21
Project: react-native-ethereum   File: MainApplication.java    License: MIT License 4 votes vote down vote up
@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);
}
 
Example 22
Project: react-native-google-cast   File: MainApplication.java    License: MIT License 4 votes vote down vote up
@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);
}
 
Example 23
Project: react-native-ble-manager   File: MainApplication.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);
}
 
Example 24
Project: react-native-threads   File: ReactContextBuilder.java    License: MIT License 4 votes vote down vote up
public ReactContextBuilder(Context context) {
    this.parentContext = context;
    SoLoader.init(context, /* native exopackage */ false);
}
 
Example 25
Project: aurora-imui   File: MainApplication.java    License: MIT License 4 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();
    SoLoader.init(this, /* native exopackage */ false);
}
 
Example 26
Project: react-native-get-sms-android   File: MainApplication.java    License: MIT License 4 votes vote down vote up
@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);
}
 
Example 27
Project: react-native-fbads   File: MainApplication.java    License: MIT License 4 votes vote down vote up
@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);
}
 
Example 28
Project: react-native-image-filter-kit   File: MainApplication.java    License: MIT License 4 votes vote down vote up
@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);
  initializeFlipper(this); // Remove this line if you don't want Flipper enabled
}
 
Example 29
Project: react-native-image-filter-kit   File: MainApplication.java    License: MIT License 4 votes vote down vote up
@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);
  initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
}
 
Example 30
Project: react-native-intl   File: MainApplication.java    License: MIT License 4 votes vote down vote up
@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);
}
 
Example 31
Project: react-native-sensitive-info   File: MainApplication.java    License: MIT License 4 votes vote down vote up
@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);
  initializeFlipper(this); // Remove this line if you don't want Flipper enabled
}
 
Example 32
Project: react-native-background-job   File: MainApplication.java    License: MIT License 4 votes vote down vote up
@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);
}
 
Example 33
Project: react-native-file-selector   File: MainApplication.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);
  initializeFlipper(this); // Remove this line if you don't want Flipper enabled
}
 
Example 34
Project: react-native   File: MainApplication.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();
    SoLoader.init(this, /* native exopackage */ false);
}
 
Example 35
Project: react-native-jitsi-meet   File: MainApplication.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);
  initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
}
 
Example 36
Project: test-samples   File: MainApplication.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);
}
 
Example 37
Project: react-native-taptargetview   File: MainApplication.java    License: MIT License 4 votes vote down vote up
@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);
}
 
Example 38
Project: react-native-securerandom   File: MainApplication.java    License: MIT License 4 votes vote down vote up
@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);
}
 
Example 39
Project: react-native-unified-contacts   File: MainApplication.java    License: MIT License 4 votes vote down vote up
@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);
}
 
Example 40
Project: react-native-recording   File: MainApplication.java    License: MIT License 4 votes vote down vote up
@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);
  initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
}