-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.js
143 lines (127 loc) · 3.44 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
import {
AppRegistry,
NativeModules,
} from 'react-native'
// import PushNotification from 'react-native-push-notification'
import App from './App'
import { name as appName } from './app.json'
console.disableYellowBox = ["Unable to symbolicate"];
// const {
// AWS_REGION,
// AWS_IDENTITY_POOL_ID,
// AWS_USER_POOL_ID,
// AWS_USER_POOL_WEB_CLIENT_ID,
// } = config
// Amplify.configure({
// Auth: {
// region: AWS_REGION,
// identityPoolId: AWS_IDENTITY_POOL_ID,
// userPoolId: AWS_USER_POOL_ID,
// userPoolWebClientId: AWS_USER_POOL_WEB_CLIENT_ID,
// },
// })
// PushNotification.configure({
// senderID: '275701935674',
// // (optional) Called when Token is generated (iOS and Android)
// onRegister(token) {
// console.log('TOKEN:', token)
// // make a http API call
// AsyncStorage.setItem('deviceToken', token.token.toString())
// },
// // (required) Called when a remote or local notification is opened or received
// onNotification: (notification) => {
// console.log('NOTIFICATION:', notification)
// },
// // IOS ONLY (optional): default: all - Permissions to register.
// permissions: {
// alert: true,
// badge: true,
// sound: true,
// },
// // Should the initial notification be popped automatically
// // default: true
// popInitialNotification: false,
// /**
// * (optional) default: true
// * - Specified if permissions (ios) and token (android and ios) will requested or not,
// * - if not, you must call PushNotificationsHandler.requestPermissions() later
// */
// requestPermissions: true,
// })
// Navigation.setDefaultOptions({
// animations: {
// push: {
// enabled: 'true',
// alpha: {
// from: 0.5,
// to: 1,
// duration: 400,
// startDelay: 0,
// interpolation: 'accelerate',
// },
// },
// setRoot: {
// enabled: 'true',
// alpha: {
// from: 0.5,
// to: 1,
// duration: 400,
// startDelay: 0,
// interpolation: 'accelerate',
// },
// },
// pop: {
// enabled: 'true',
// alpha: {
// from: 0.5,
// to: 1,
// duration: 400,
// startDelay: 0,
// interpolation: 'decelerate',
// },
// },
// showModal: {
// enabled: 'true',
// alpha: {
// from: 0.5,
// to: 1,
// duration: 400,
// startDelay: 0,
// interpolation: 'accelerate',
// },
// },
// dismissModal: {
// enabled: 'true',
// alpha: {
// from: 0.5,
// to: 1,
// duration: 400,
// startDelay: 0,
// interpolation: 'decelerate',
// },
// },
// },
// })
console.disableYellowBox = true
const { ImagePickerManager } = NativeModules
const DEFAULT_OPTIONS = {
title: 'Select a Photo',
cancelButtonTitle: 'Cancel',
takePhotoButtonTitle: 'Take Photo…',
chooseFromLibraryButtonTitle: 'Choose from Library…',
quality: 1.0,
allowsEditing: false,
permissionDenied: {
title: 'Permission denied',
text: 'To be able to take pictures with your camera and choose images from your library.',
reTryTitle: 're-try',
okTitle: 'I\'m sure',
},
}
module.exports = {
...ImagePickerManager,
showImagePicker: (options, callback) => {
ImagePickerManager.showImagePicker({ ...DEFAULT_OPTIONS, ...options }, callback)
},
}
AppRegistry.registerComponent(appName, () => App)