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/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"
|
||||
|
||||
|
@ -196,7 +193,16 @@ android {
|
|||
dependencies {
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
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) {
|
||||
def hermesPath = "../../node_modules/hermes-engine/android/";
|
||||
|
|
|
@ -10,16 +10,9 @@ public class BasePackageList {
|
|||
new expo.modules.barcodescanner.BarCodeScannerPackage(),
|
||||
new expo.modules.camera.CameraPackage(),
|
||||
new expo.modules.constants.ConstantsPackage(),
|
||||
new expo.modules.errorrecovery.ErrorRecoveryPackage(),
|
||||
new expo.modules.filesystem.FileSystemPackage(),
|
||||
new expo.modules.font.FontLoaderPackage(),
|
||||
new expo.modules.imageloader.ImageLoaderPackage(),
|
||||
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()
|
||||
new expo.modules.permissions.PermissionsPackage()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
// @flow
|
||||
|
||||
import * as React from 'react';
|
||||
import {Alert, Platform, View} from 'react-native';
|
||||
import {Alert, View} from 'react-native';
|
||||
import i18n from "i18n-js";
|
||||
import WebSectionList from "../../components/Screens/WebSectionList";
|
||||
import * as Notifications from "../../utils/Notifications";
|
||||
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 ProxiwashListItem from "../../components/Lists/Proxiwash/ProxiwashListItem";
|
||||
import ProxiwashConstants from "../../constants/ProxiwashConstants";
|
||||
|
@ -92,18 +92,18 @@ class ProxiwashScreen extends React.Component<Props, State> {
|
|||
this.setState({machinesWatched: fetchedList})
|
||||
});
|
||||
// Get updated watchlist after received notification
|
||||
Expo.Notifications.addListener(() => {
|
||||
Notifications.getMachineNotificationWatchlist((fetchedList) => {
|
||||
this.setState({machinesWatched: fetchedList})
|
||||
});
|
||||
});
|
||||
if (Platform.OS === 'android') {
|
||||
Expo.Notifications.createChannelAndroidAsync('reminders', {
|
||||
name: 'Reminders',
|
||||
priority: 'max',
|
||||
vibrate: [0, 250, 250, 250],
|
||||
});
|
||||
}
|
||||
// Expo.Notifications.addListener(() => {
|
||||
// Notifications.getMachineNotificationWatchlist((fetchedList) => {
|
||||
// this.setState({machinesWatched: fetchedList})
|
||||
// });
|
||||
// });
|
||||
// if (Platform.OS === 'android') {
|
||||
// Expo.Notifications.createChannelAndroidAsync('reminders', {
|
||||
// name: 'Reminders',
|
||||
// priority: 'max',
|
||||
// vibrate: [0, 250, 250, 250],
|
||||
// });
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// @flow
|
||||
|
||||
import {checkNotifications, requestNotifications, RESULTS} from 'react-native-permissions';
|
||||
import {Notifications} from 'expo';
|
||||
// import {Notifications} from 'expo';
|
||||
import AsyncStorageManager from "../managers/AsyncStorageManager";
|
||||
import LocaleManager from "../managers/LocaleManager";
|
||||
import passwords from "../../passwords";
|
||||
|
@ -40,15 +40,15 @@ export async function askPermissions() {
|
|||
* @return {Promise<void>}
|
||||
*/
|
||||
export async function initExpoToken() {
|
||||
let token = AsyncStorageManager.getInstance().preferences.expoToken.current;
|
||||
if (token === '') {
|
||||
askPermissions().then(() => {
|
||||
Notifications.getExpoPushTokenAsync().then((token) => {
|
||||
// Save token for instant use later on
|
||||
AsyncStorageManager.getInstance().savePref(AsyncStorageManager.getInstance().preferences.expoToken.key, token);
|
||||
});
|
||||
});
|
||||
}
|
||||
// let token = AsyncStorageManager.getInstance().preferences.expoToken.current;
|
||||
// if (token === '') {
|
||||
// askPermissions().then(() => {
|
||||
// Notifications.getExpoPushTokenAsync().then((token) => {
|
||||
// // Save token for instant use later on
|
||||
// AsyncStorageManager.getInstance().savePref(AsyncStorageManager.getInstance().preferences.expoToken.key, token);
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue