forked from vergnet/application-amicale
Disabled some expo unimodules
This commit is contained in:
parent
ca6f66c661
commit
4f49b48fc5
4 changed files with 35 additions and 36 deletions
|
@ -83,9 +83,6 @@ project.ext.react = [
|
||||||
apply from: '../../node_modules/react-native-unimodules/gradle.groovy'
|
apply from: '../../node_modules/react-native-unimodules/gradle.groovy'
|
||||||
apply from: "../../node_modules/react-native/react.gradle"
|
apply from: "../../node_modules/react-native/react.gradle"
|
||||||
|
|
||||||
project.ext.vectoricons = [
|
|
||||||
iconFontNames: [ 'MaterialCommunityIcons.ttf'] // Name of the font files you want to copy
|
|
||||||
]
|
|
||||||
|
|
||||||
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
|
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
|
||||||
|
|
||||||
|
@ -196,7 +193,16 @@ android {
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||||
implementation "com.facebook.react:react-native:+" // From node_modules
|
implementation "com.facebook.react:react-native:+" // From node_modules
|
||||||
addUnimodulesDependencies()
|
addUnimodulesDependencies([exclude: [
|
||||||
|
'expo-error-recovery',
|
||||||
|
'expo-image-loader',
|
||||||
|
'expo-keep-awake',
|
||||||
|
'expo-linear-gradient',
|
||||||
|
'expo-location',
|
||||||
|
'expo-web-browser',
|
||||||
|
'expo-sqlite',
|
||||||
|
'expo-image-loader',
|
||||||
|
]])
|
||||||
|
|
||||||
if (enableHermes) {
|
if (enableHermes) {
|
||||||
def hermesPath = "../../node_modules/hermes-engine/android/";
|
def hermesPath = "../../node_modules/hermes-engine/android/";
|
||||||
|
|
|
@ -10,16 +10,9 @@ public class BasePackageList {
|
||||||
new expo.modules.barcodescanner.BarCodeScannerPackage(),
|
new expo.modules.barcodescanner.BarCodeScannerPackage(),
|
||||||
new expo.modules.camera.CameraPackage(),
|
new expo.modules.camera.CameraPackage(),
|
||||||
new expo.modules.constants.ConstantsPackage(),
|
new expo.modules.constants.ConstantsPackage(),
|
||||||
new expo.modules.errorrecovery.ErrorRecoveryPackage(),
|
|
||||||
new expo.modules.filesystem.FileSystemPackage(),
|
new expo.modules.filesystem.FileSystemPackage(),
|
||||||
new expo.modules.font.FontLoaderPackage(),
|
new expo.modules.font.FontLoaderPackage(),
|
||||||
new expo.modules.imageloader.ImageLoaderPackage(),
|
new expo.modules.permissions.PermissionsPackage()
|
||||||
new expo.modules.keepawake.KeepAwakePackage(),
|
|
||||||
new expo.modules.lineargradient.LinearGradientPackage(),
|
|
||||||
new expo.modules.location.LocationPackage(),
|
|
||||||
new expo.modules.permissions.PermissionsPackage(),
|
|
||||||
new expo.modules.sqlite.SQLitePackage(),
|
|
||||||
new expo.modules.webbrowser.WebBrowserPackage()
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import {Alert, Platform, View} from 'react-native';
|
import {Alert, View} from 'react-native';
|
||||||
import i18n from "i18n-js";
|
import i18n from "i18n-js";
|
||||||
import WebSectionList from "../../components/Screens/WebSectionList";
|
import WebSectionList from "../../components/Screens/WebSectionList";
|
||||||
import * as Notifications from "../../utils/Notifications";
|
import * as Notifications from "../../utils/Notifications";
|
||||||
import AsyncStorageManager from "../../managers/AsyncStorageManager";
|
import AsyncStorageManager from "../../managers/AsyncStorageManager";
|
||||||
import * as Expo from "expo";
|
// import * as Expo from "expo";
|
||||||
import {Avatar, Banner, Button, Card, Text, withTheme} from 'react-native-paper';
|
import {Avatar, Banner, Button, Card, Text, withTheme} from 'react-native-paper';
|
||||||
import ProxiwashListItem from "../../components/Lists/Proxiwash/ProxiwashListItem";
|
import ProxiwashListItem from "../../components/Lists/Proxiwash/ProxiwashListItem";
|
||||||
import ProxiwashConstants from "../../constants/ProxiwashConstants";
|
import ProxiwashConstants from "../../constants/ProxiwashConstants";
|
||||||
|
@ -92,18 +92,18 @@ class ProxiwashScreen extends React.Component<Props, State> {
|
||||||
this.setState({machinesWatched: fetchedList})
|
this.setState({machinesWatched: fetchedList})
|
||||||
});
|
});
|
||||||
// Get updated watchlist after received notification
|
// Get updated watchlist after received notification
|
||||||
Expo.Notifications.addListener(() => {
|
// Expo.Notifications.addListener(() => {
|
||||||
Notifications.getMachineNotificationWatchlist((fetchedList) => {
|
// Notifications.getMachineNotificationWatchlist((fetchedList) => {
|
||||||
this.setState({machinesWatched: fetchedList})
|
// this.setState({machinesWatched: fetchedList})
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
if (Platform.OS === 'android') {
|
// if (Platform.OS === 'android') {
|
||||||
Expo.Notifications.createChannelAndroidAsync('reminders', {
|
// Expo.Notifications.createChannelAndroidAsync('reminders', {
|
||||||
name: 'Reminders',
|
// name: 'Reminders',
|
||||||
priority: 'max',
|
// priority: 'max',
|
||||||
vibrate: [0, 250, 250, 250],
|
// vibrate: [0, 250, 250, 250],
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
|
||||||
import {checkNotifications, requestNotifications, RESULTS} from 'react-native-permissions';
|
import {checkNotifications, requestNotifications, RESULTS} from 'react-native-permissions';
|
||||||
import {Notifications} from 'expo';
|
// import {Notifications} from 'expo';
|
||||||
import AsyncStorageManager from "../managers/AsyncStorageManager";
|
import AsyncStorageManager from "../managers/AsyncStorageManager";
|
||||||
import LocaleManager from "../managers/LocaleManager";
|
import LocaleManager from "../managers/LocaleManager";
|
||||||
import passwords from "../../passwords";
|
import passwords from "../../passwords";
|
||||||
|
@ -40,15 +40,15 @@ export async function askPermissions() {
|
||||||
* @return {Promise<void>}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
export async function initExpoToken() {
|
export async function initExpoToken() {
|
||||||
let token = AsyncStorageManager.getInstance().preferences.expoToken.current;
|
// let token = AsyncStorageManager.getInstance().preferences.expoToken.current;
|
||||||
if (token === '') {
|
// if (token === '') {
|
||||||
askPermissions().then(() => {
|
// askPermissions().then(() => {
|
||||||
Notifications.getExpoPushTokenAsync().then((token) => {
|
// Notifications.getExpoPushTokenAsync().then((token) => {
|
||||||
// Save token for instant use later on
|
// // Save token for instant use later on
|
||||||
AsyncStorageManager.getInstance().savePref(AsyncStorageManager.getInstance().preferences.expoToken.key, token);
|
// AsyncStorageManager.getInstance().savePref(AsyncStorageManager.getInstance().preferences.expoToken.key, token);
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue