diff --git a/react-native/android/src/main/jni/Application.mk b/react-native/android/src/main/jni/Application.mk index aea47831..4d8ba3c5 100644 --- a/react-native/android/src/main/jni/Application.mk +++ b/react-native/android/src/main/jni/Application.mk @@ -12,6 +12,7 @@ APP_CPPFLAGS := -std=c++14 APP_CPPFLAGS += -frtti APP_CPPFLAGS += -fexceptions APP_CPPFLAGS += -DREALM_HAVE_CONFIG +APP_CPPFLAGS += -fomit-frame-pointer # Make sure every shared lib includes a .note.gnu.build-id header APP_LDFLAGS := -Wl,--build-id diff --git a/tests/react-test-app/android/app/src/main/AndroidManifest.xml b/tests/react-test-app/android/app/src/main/AndroidManifest.xml index 5b609213..4bfced4c 100644 --- a/tests/react-test-app/android/app/src/main/AndroidManifest.xml +++ b/tests/react-test-app/android/app/src/main/AndroidManifest.xml @@ -4,6 +4,7 @@ getPackages() { - return Arrays.asList( - new MainReactPackage(), - new RNFSPackage(), - new RealmReactPackage() - ); - } } diff --git a/tests/react-test-app/android/app/src/main/java/MainApplication.java b/tests/react-test-app/android/app/src/main/java/MainApplication.java new file mode 100644 index 00000000..d1760386 --- /dev/null +++ b/tests/react-test-app/android/app/src/main/java/MainApplication.java @@ -0,0 +1,40 @@ +package io.realm.react.testapp; + +import android.app.Application; +import android.util.Log; + +import com.facebook.react.ReactApplication; +import com.facebook.react.ReactInstanceManager; +import com.facebook.react.ReactNativeHost; +import com.facebook.react.ReactPackage; +import com.facebook.react.shell.MainReactPackage; + +import java.util.Arrays; +import java.util.List; + +import com.rnfs.RNFSPackage; +import io.realm.react.RealmReactPackage; + +public class MainApplication extends Application implements ReactApplication { + + private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { + @Override + protected boolean getUseDeveloperSupport() { + return BuildConfig.DEBUG; + } + + @Override + protected List getPackages() { + return Arrays.asList( + new MainReactPackage(), + new RNFSPackage(), + new RealmReactPackage() + ); + } + }; + + @Override + public ReactNativeHost getReactNativeHost() { + return mReactNativeHost; + } +} \ No newline at end of file