Commit 6c0762d0 authored by Phuengton Chummuel's avatar Phuengton Chummuel

remove useless library

parent fc65b4b2
......@@ -140,24 +140,11 @@ dependencies {
compile project(':react-native-picker')
compile project(':realm')
compile project(':react-native-push-notification')
compile ('com.google.android.gms:play-services-gcm:11.4.2') {
force = true;
}
compile project(':react-native-google-signin')
compile(project(':react-native-firebase')) {
transitive = false
}
compile project(':react-native-vector-icons')
compile project(':react-native-camera')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
compile "com.google.android.gms:play-services-base:11.4.2"
compile 'com.google.android.gms:play-services-auth:11.4.2'
compile "com.google.firebase:firebase-core:11.4.2"
compile 'com.google.firebase:firebase-auth:11.4.2'
}
// Run this once to be able to run the application with BUCK
......@@ -167,4 +154,4 @@ task copyDownloadableDepsToLibs(type: Copy) {
into 'libs'
}
apply plugin: 'com.google.gms.google-services'
\ No newline at end of file
// apply plugin: 'com.google.gms.google-services'
\ No newline at end of file
......@@ -6,16 +6,12 @@ import com.facebook.react.ReactApplication;
import com.beefe.picker.PickerViewPackage;
import io.realm.react.RealmReactPackage;
import com.dieam.reactnativepushnotification.ReactNativePushNotificationPackage;
import co.apptailor.googlesignin.RNGoogleSigninPackage;
import com.oblador.vectoricons.VectorIconsPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;
import io.invertase.firebase.RNFirebasePackage;
import io.invertase.firebase.auth.RNFirebaseAuthPackage;
import org.reactnative.camera.RNCameraPackage;
import java.util.Arrays;
import java.util.List;
......@@ -31,13 +27,10 @@ public class MainApplication extends Application implements ReactApplication {
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new PickerViewPackage(),
new PickerViewPackage(),
new RealmReactPackage(),
new ReactNativePushNotificationPackage(),
new RNGoogleSigninPackage(),
new VectorIconsPackage(),
new RNFirebasePackage(),
new RNFirebaseAuthPackage(),
new RNCameraPackage()
);
}
......
......@@ -5,7 +5,8 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
// classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.android.tools.build:gradle:3.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
......@@ -17,6 +18,7 @@ allprojects {
repositories {
mavenLocal()
jcenter()
google()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
......
......@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
......@@ -5,10 +5,6 @@ include ':realm'
project(':realm').projectDir = new File(rootProject.projectDir, '../node_modules/realm/android')
include ':react-native-push-notification'
project(':react-native-push-notification').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-push-notification/android')
include ':react-native-google-signin'
project(':react-native-google-signin').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-google-signin/android')
include ':react-native-firebase'
project(':react-native-firebase').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firebase/android')
include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
include ':react-native-camera'
......
......@@ -72,11 +72,6 @@
"integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=",
"dev": true
},
"andlog": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/andlog/-/andlog-1.0.0.tgz",
"integrity": "sha1-JbOQR6ycHl9rLI5M2157+eZeU0s="
},
"ansi": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz",
......@@ -883,28 +878,6 @@
"babel-types": "6.26.0"
}
},
"babel-polyfill": {
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.23.0.tgz",
"integrity": "sha1-g2TKYt+Or7gwSZ9pkXdGbDsDSZ0=",
"requires": {
"babel-runtime": "6.26.0",
"core-js": "2.5.1",
"regenerator-runtime": "0.10.5"
},
"dependencies": {
"core-js": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.1.tgz",
"integrity": "sha1-rmh03GaTd4m4B1T/VCjfZoGcpQs="
},
"regenerator-runtime": {
"version": "0.10.5",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz",
"integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg="
}
}
},
"babel-preset-es2015-node": {
"version": "6.1.1",
"resolved": "https://registry.npmjs.org/babel-preset-es2015-node/-/babel-preset-es2015-node-6.1.1.tgz",
......@@ -1260,14 +1233,6 @@
"hoek": "4.2.0"
}
},
"bows": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/bows/-/bows-1.7.0.tgz",
"integrity": "sha1-o1mO2c72GnoMqxpyQPKRZUhl7HY=",
"requires": {
"andlog": "1.0.0"
}
},
"bplist-creator": {
"version": "0.0.7",
"resolved": "https://registry.npmjs.org/bplist-creator/-/bplist-creator-0.0.7.tgz",
......@@ -6604,76 +6569,6 @@
"mimic-fn": "1.1.0"
}
},
"opencollective": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/opencollective/-/opencollective-1.0.3.tgz",
"integrity": "sha1-ruY3K8KBRFg2kMPKja7PwSDdDvE=",
"requires": {
"babel-polyfill": "6.23.0",
"chalk": "1.1.3",
"inquirer": "3.0.6",
"minimist": "1.2.0",
"node-fetch": "1.6.3",
"opn": "4.0.2"
},
"dependencies": {
"ansi-escapes": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz",
"integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4="
},
"chalk": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"requires": {
"ansi-styles": "2.2.1",
"escape-string-regexp": "1.0.5",
"has-ansi": "2.0.0",
"strip-ansi": "3.0.1",
"supports-color": "2.0.0"
}
},
"inquirer": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.0.6.tgz",
"integrity": "sha1-4EqqnQW3o8ubD0B9BDdfBEcZA0c=",
"requires": {
"ansi-escapes": "1.4.0",
"chalk": "1.1.3",
"cli-cursor": "2.1.0",
"cli-width": "2.2.0",
"external-editor": "2.0.5",
"figures": "2.0.0",
"lodash": "4.11.2",
"mute-stream": "0.0.7",
"run-async": "2.3.0",
"rx": "4.1.0",
"string-width": "2.1.1",
"strip-ansi": "3.0.1",
"through": "2.3.8"
}
},
"node-fetch": {
"version": "1.6.3",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.6.3.tgz",
"integrity": "sha1-3CNO3WSJmC1Y6PDbT2lQKavNjAQ=",
"requires": {
"encoding": "0.1.12",
"is-stream": "1.1.0"
}
},
"opn": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/opn/-/opn-4.0.2.tgz",
"integrity": "sha1-erwi5kTf9jsKltWrfyeQwPAavJU=",
"requires": {
"object-assign": "4.1.1",
"pinkie-promise": "2.0.1"
}
}
}
},
"opn": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/opn/-/opn-3.0.3.tgz",
......@@ -7301,21 +7196,6 @@
"lodash": "4.11.2"
}
},
"react-native-firebase": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/react-native-firebase/-/react-native-firebase-3.1.0.tgz",
"integrity": "sha512-EC4i/cs2DSSZw6w/k1aF+MUPCNQ0dwJzr6ZzNLDzqlQStI5FMteQ6VthJ1wpXajBO6rIW3nlaOqSNyV1WGM/+g==",
"requires": {
"bows": "1.7.0",
"opencollective": "1.0.3",
"prop-types": "15.6.0"
}
},
"react-native-google-signin": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/react-native-google-signin/-/react-native-google-signin-0.12.0.tgz",
"integrity": "sha512-Ek84p6g3XzQJ/YC7eik+3cvS/S069eIMSdVVXhd9eEJORnTHsvRboD7aDjNi2PjLutqFEXnxVJBmwJ4EPvx1+w=="
},
"react-native-keyboard-aware-scroll-view": {
"version": "git+https://github.com/GeekyAnts/react-native-keyboard-aware-scroll-view.git#f4805f254d6cc8e3329f5fb224944401f66655db",
"requires": {
......@@ -7791,11 +7671,6 @@
"is-promise": "2.1.0"
}
},
"rx": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/rx/-/rx-4.1.0.tgz",
"integrity": "sha1-pfE/957zt0D+MKqAP7CfmIBdR4I="
},
"rx-lite": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz",
......
......@@ -13,8 +13,6 @@
"react-native": "0.50.3",
"react-native-camera": "^1.0.2",
"react-native-datepicker": "^1.6.0",
"react-native-firebase": "^3.1.0",
"react-native-google-signin": "^0.12.0",
"react-native-material-dialog": "^0.7.4",
"react-native-modal-datetime-picker": "^4.13.0",
"react-native-picker": "^4.3.5",
......
import React, { Component } from 'react';
import { Container } from 'native-base';
import { Provider } from 'react-redux';
import configureStore from './configureStore'
import reducers from './reducers'
import RootNavigator from './navigators/RootNavigator';
......
import PushNotification from 'react-native-push-notification';
import moment from 'moment'
export function formatDate(date) {
var monthNames = [
......
import React, { Component } from 'react';
import { DrawerNavigator, StackNavigator } from 'react-navigation';
import HomeScreen from './../screens/HomeScreen';
......@@ -6,15 +5,12 @@ import CameraScreen from './../screens/CameraScreen';
import PreviewPhotoScreen from './../screens/PreviewPhotoScreen';
import SettingsScreen from './../screens/SettingsScreen';
import MedicationsScreen from './../screens/MedicationsScreen';
import SignInScreen from './../screens/SignInScreen';
import MainScreen from './../screens/MainScreen';
import SettingsTimePeriod from './../screens/SettingsTimePeriod';
import ReminderDetail from './../screens/ReminderDetail';
import AppointmentsScreen from './../screens/AppointmentsScreen';
import MedicationsListScreen from './../screens/MedicationListScreen';
import AppointmentsListScreen from './../screens/AppointmentListScreen';
const HomeNavigator = StackNavigator({
Home: {
screen: HomeScreen
......@@ -92,10 +88,7 @@ const RootNavigator = StackNavigator(
screen: SettingsNavigator,
}
})
},
SignIn: {
screen: SignInScreen,
},
}
}, {
headerMode: 'none'
}
......
import React, { Component } from 'react';
import { Alert, ToastAndroid, TouchableOpacity } from 'react-native';
import {
Container,
Content,
View,
Text,
Button,
Icon,
List,
ListItem,
Right,
Left,
} from 'native-base';
import AppHeader from './../components/Header';
import appointmentList from './../components/AppointmentList'
import realm from './../Database/';
import moment from 'moment';
import { cancleNotification } from './../Utils';
import AppointmentList from './../components/AppointmentList';
class AppointmentListScreen extends Component {
......
import React from 'react';
import { DatePickerAndroid, TimePickerAndroid, Alert, Keyboard, ToastAndroid } from 'react-native';
import { DatePickerAndroid, TimePickerAndroid, Keyboard } from 'react-native';
import {
Container,
Content,
View,
Button,
Icon,
Form,
......@@ -16,7 +15,7 @@ import { connect } from 'react-redux';
import AppHeader from './../components/Header';
import MedForm from './../components/MedForm';
import { Grid, Col } from 'react-native-easy-grid';
import { appointmentNotification, generateID } from './../Utils';
import { generateID } from './../Utils';
import { appointmentCreate } from './../actions'
import realm from './../Database';
import moment from 'moment';
......
import React, { Component } from 'react';
import { BackHandler, ToastAndroid, Alert } from 'react-native';
import {
StyleSheet,
Text,
......@@ -7,10 +6,10 @@ import {
TouchableOpacity
} from 'react-native';
import { IMAGE_TO_TEXT } from './../ServiceUrl';
import { Container, Header, Content, Icon, Button } from 'native-base';
import { Container } from 'native-base';
import { MaterialDialog } from 'react-native-material-dialog';
import { RNCamera } from 'react-native-camera';
import { scheduleLocalNotification, appointmentNotification, futch, generateID } from './../Utils';
import { futch, generateID } from './../Utils';
import { connect } from 'react-redux'
import { reminderCreate, appointmentCreate } from './../actions'
import ReminderDialogForm from './../components/ReminderDialogForm';
......
import React, { Component } from 'react';
import { ToastAndroid, AsyncStorage, TouchableOpacity } from 'react-native';
import { ToastAndroid, AsyncStorage } from 'react-native';
import {
Container,
Content,
Footer,
FooterTab,
Left,
Button,
Icon,
Fab,
View,
Text
} from 'native-base';
......@@ -45,7 +41,7 @@ class HomeScreen extends Component {
render() {
var { containerStyle, timePeriodLeftStyle, timePeriodRightStyle, dateTitle } = styles;
var { timePeriodLeftStyle, timePeriodRightStyle, dateTitle } = styles;
return (
<Container style={{ backgroundColor: 'white' }}>
......
import React, { Component } from 'react';
import firebase from 'react-native-firebase'
import HomeScreen from './HomeScreen';
import SignInScreen from './SignInScreen';
class MainScreen extends Component {
constructor() {
super();
this.state = {
user: null,
}
}
componentWillMount() {
firebase.auth().onAuthStateChanged((user) => {
if (user) {
this.setState({ user: user })
}
})
}
render() {
// return this.state.user != null ? <HomeScreen /> : <SignInScreen />;
return <HomeScreen />
}
}
export default MainScreen;
\ No newline at end of file
import React, { Component } from 'react';
import { TouchableOpacity, Alert } from 'react-native';
import {
Container,
Content,
View,
Button,
Icon
} from 'native-base';
import ReminderList from './../components/ReminderList';
import { cancleNotification } from './../Utils';
import AppHeader from './../components/Header';
import realm from './../Database/';
import moment from 'moment';
class MedicationListScreen extends Component {
......
import React, { Component } from 'react';
import { DeviceEventEmitter, ToastAndroid, Alert } from 'react-native';
import { formatDate, scheduleLocalNotification, generateID } from './../Utils';
import { generateID } from './../Utils';
import { Grid, Col } from 'react-native-easy-grid';
import { SinglePickerMaterialDialog } from 'react-native-material-dialog';
import PushNotification from 'react-native-push-notification';
......@@ -21,7 +21,6 @@ import {
Left,
Body,
} from 'native-base';
import DatePicker from 'react-native-datepicker';
import AppHeader from './../components/Header';
import MedForm from '../components/MedForm';
import { connect } from 'react-redux';
......
import React, { Component } from 'react';
import { Image, Text, ToastAndroid, Dimensions, View } from 'react-native';
import { Image, Dimensions } from 'react-native';
import { Container } from 'native-base';
class PreviewPhotoScreen extends Component {
......
......@@ -12,7 +12,6 @@ import {
import AppHeader from './../components/Header';
import MedicineDetailCard from './../components/MedicineDetailCard';
import { formatDate } from './../Utils';
import moment from 'moment';
class ReminderDetail extends React.Component {
render() {
......
import React, { Component } from 'react';
import { ScrollView, ToastAndroid } from 'react-native';
import { ScrollView } from 'react-native';
import {
Container,
Content,
......@@ -7,7 +7,6 @@ import {
Text,
Icon,
} from 'native-base';
import firebase from 'react-native-firebase';
import AppHeader from '../components/Header';
import BtnSettings from '../components/BtnSettings';
......@@ -35,29 +34,12 @@ class Menu extends Component {
<Content>
<ScrollView>
<BtnSettings
text={"Language"}
onPress={() => {
ToastAndroid.show("Language", ToastAndroid.SHORT)
}}
/>
<BtnSettings
text={"Time Period"}
onPress={() => {
this.props.navigation.navigate('SettingsTime', { keyBScreen: this.props.navigation.state.key });
}}
/>
<BtnSettings
text={"Log Out"}
onPress={() => {
firebase.auth().signOut().then(() => {
// Sign-out successful.
this.props.navigation.navigate('Main');
}).catch((error) => {
// An error happened.
});
}}
/>
</ScrollView>
</Content>
......
import React from 'react';
import { ToastAndroid, View, TimePickerAndroid, Alert } from 'react-native';
import { View, TimePickerAndroid, Alert } from 'react-native';
import {
Container,
Content,
......@@ -10,7 +10,6 @@ import {
Right
} from 'native-base'
import AppHeader from './../components/Header';
import BtnSettings from './../components/BtnSettings';
import moment from 'moment';
import realm from './../Database';
......
import React, { Component } from 'react';
import { Image, ToastAndroid } from 'react-native';
import {
Container,
Content,
Button,
Text
} from 'native-base';
import { GoogleSignin, GoogleSigninButton } from 'react-native-google-signin';
import { NavigationActions } from 'react-navigation';
import firebase from 'react-native-firebase';
class SignInScreen extends Component {
componentWillMount() {
firebase.auth().onAuthStateChanged((user) => {
if (user) {
this.goToHomeScreen()
}
})
}
componentDidMount() {
GoogleSignin.hasPlayServices({ autoResolve: true })
.then(() => {
})
.catch((err) => {
console.log("Play service error", err.code, err.message);
})
}
render() {
const { rootContainer, appLogo, loginButton } = styles;
return (
<Container style={rootContainer}>
<Content>
<Image source={require('./../../public/images/logo.png')} style={appLogo} resizeMode="contain" />
<GoogleSigninButton
style={loginButton}
size={GoogleSigninButton.Size.Wide}
color={GoogleSigninButton.Color.Light}
onPress={this.doGoogleSignin.bind(this)}
/>
</Content>
</Container>
)
}
goToHomeScreen() {
const resetAction = NavigationActions.reset({
index: 0,
actions: [
NavigationActions.navigate({ routeName: 'Home' })
]
})
this.props.navigation.dispatch(resetAction);
}
doGoogleSignin() {
GoogleSignin.configure()
.then(() => {
GoogleSignin.signIn()
.then((data) => {
// create a new firebase credential with the token
const credential = firebase.auth.GoogleAuthProvider.credential(data.idToken, data.accessToken)
// login with credential
return firebase.auth().signInWithCredential(credential)
})
.then((currentUser) => {
if (currentUser != null) {
ToastAndroid.show(JSON.stringify(currentUser), ToastAndroid.SHORT);
this.goToHomeScreen()
}
// console.info(JSON.stringify(currentUser.toJSON()))
})
.catch((error) => {
console.error(`Login fail with error: ${error}`)
})
})
}
}
const styles = {
rootContainer: {
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
},
appLogo: {
height: 150,
width: 150,
borderWidth: 1,
borderRadius: 75,
alignSelf: 'center',
marginTop: 100,
marginBottom: 100,
},
loginButton: {
flex: 1,
width: 312,
height: 48,
justifyContent: 'space-around',
margin: 20,
}
}
export default SignInScreen;
\ No newline at end of file
......@@ -3692,10 +3692,11 @@ react-native-animatable@^1.2.3:
dependencies:
prop-types "^15.5.10"
react-native-camera@^0.12.0:
version "0.12.0"
resolved "https://registry.yarnpkg.com/react-native-camera/-/react-native-camera-0.12.0.tgz#51afa8acf1696d9d973074b6454c5ba2cce6ac18"
react-native-camera@^1.0.2:
version "1.1.4"
resolved "https://registry.yarnpkg.com/react-native-camera/-/react-native-camera-1.1.4.tgz#5a01be906507cc2f232405f903c52c9d99988dba"
dependencies:
lodash "^4.17.4"
prop-types "^15.5.10"
react-native-datepicker@^1.6.0:
......@@ -3776,6 +3777,10 @@ react-native-modal@3.1.0:
prop-types "15.5.10"
react-native-animatable "^1.2.3"
react-native-picker@^4.3.5:
version "4.3.7"
resolved "https://registry.yarnpkg.com/react-native-picker/-/react-native-picker-4.3.7.tgz#9842e8c62ff0d8b676e9514d9f9172413c0518a8"
react-native-push-notification@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/react-native-push-notification/-/react-native-push-notification-3.0.2.tgz#3fa7d654cfd915436597b0dd5ba8b0f898c4b0f5"
......@@ -3996,6 +4001,10 @@ realm@^2.1.1:
sync-request "^3.0.1"
url-parse "^1.1.7"
redux-thunk@^2.2.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.3.0.tgz#51c2c19a185ed5187aaa9a2d08b666d0d6467622"
redux@^3.7.2:
version "3.7.2"
resolved "https://registry.yarnpkg.com/redux/-/redux-3.7.2.tgz#06b73123215901d25d065be342eb026bc1c8537b"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment