add expo dependencies
This commit is contained in:
parent
24ef2334f7
commit
49b26e1a3b
8 changed files with 7993 additions and 144 deletions
|
|
@ -3,4 +3,5 @@
|
|||
- i18n-js
|
||||
- @react-native-community/netinfo
|
||||
- axios
|
||||
- lodash
|
||||
- lodash
|
||||
- expo
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
package com.comapp;
|
||||
|
||||
import expo.modules.ReactActivityDelegateWrapper;
|
||||
|
||||
import com.facebook.react.ReactActivity;
|
||||
import com.facebook.react.ReactActivityDelegate;
|
||||
import com.facebook.react.ReactRootView;
|
||||
|
|
@ -22,7 +24,8 @@ public class MainActivity extends ReactActivity {
|
|||
*/
|
||||
@Override
|
||||
protected ReactActivityDelegate createReactActivityDelegate() {
|
||||
return new MainActivityDelegate(this, getMainComponentName());
|
||||
//return new MainActivityDelegate(this, getMainComponentName());
|
||||
return new ReactActivityDelegateWrapper(this, new MainActivityDelegate(this, getMainComponentName()));
|
||||
}
|
||||
|
||||
public static class MainActivityDelegate extends ReactActivityDelegate {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
package com.comapp;
|
||||
|
||||
import android.content.res.Configuration;
|
||||
import expo.modules.ApplicationLifecycleDispatcher;
|
||||
import expo.modules.ReactNativeHostWrapper;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import com.facebook.react.PackageList;
|
||||
|
|
@ -16,7 +20,8 @@ import java.util.List;
|
|||
public class MainApplication extends Application implements ReactApplication {
|
||||
|
||||
private final ReactNativeHost mReactNativeHost =
|
||||
new ReactNativeHost(this) {
|
||||
//new ReactNativeHost(this) {
|
||||
new ReactNativeHostWrapper(this, new ReactNativeHost(this) {
|
||||
@Override
|
||||
public boolean getUseDeveloperSupport() {
|
||||
return BuildConfig.DEBUG;
|
||||
|
|
@ -35,13 +40,16 @@ public class MainApplication extends Application implements ReactApplication {
|
|||
protected String getJSMainModuleName() {
|
||||
return "index";
|
||||
}
|
||||
};
|
||||
//};
|
||||
});
|
||||
|
||||
private final ReactNativeHost mNewArchitectureNativeHost =
|
||||
new MainApplicationReactNativeHost(this);
|
||||
//new MainApplicationReactNativeHost(this);
|
||||
new ReactNativeHostWrapper(this, new MainApplicationReactNativeHost(this));
|
||||
|
||||
@Override
|
||||
public ReactNativeHost getReactNativeHost() {
|
||||
ApplicationLifecycleDispatcher.onApplicationCreate(this);
|
||||
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
||||
return mNewArchitectureNativeHost;
|
||||
} else {
|
||||
|
|
@ -88,4 +96,10 @@ public class MainApplication extends Application implements ReactApplication {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
ApplicationLifecycleDispatcher.onConfigurationChanged(this, newConfig);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,3 +9,6 @@ if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true")
|
|||
include(":ReactAndroid:hermes-engine")
|
||||
project(":ReactAndroid:hermes-engine").projectDir = file('../node_modules/react-native/ReactAndroid/hermes-engine')
|
||||
}
|
||||
|
||||
apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle")
|
||||
useExpoModules()
|
||||
6216
ComApp/package-lock.json
generated
6216
ComApp/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -12,6 +12,7 @@
|
|||
"dependencies": {
|
||||
"@react-native-community/netinfo": "^9.3.2",
|
||||
"axios": "^0.27.2",
|
||||
"expo": "^46.0.13",
|
||||
"i18n-js": "^4.1.1",
|
||||
"install": "^0.13.0",
|
||||
"lodash": "^4.17.21",
|
||||
|
|
|
|||
|
|
@ -9,6 +9,9 @@ import NetInfo from "@react-native-community/netinfo";
|
|||
import i18n from "../../I18n";
|
||||
// Database
|
||||
import { Setting } from "../../Database";
|
||||
// FileSytem
|
||||
import * as FileSystem from 'expo-file-system';
|
||||
|
||||
|
||||
const api_token = 'toto';
|
||||
|
||||
|
|
|
|||
1886
ComApp/yarn.lock
1886
ComApp/yarn.lock
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue