Commit a4f7541e authored by Phuengton Chummuel's avatar Phuengton Chummuel

.

parent 06f24f6b
export const MAIN_HOST = 'http://192.168.1.17:8000';
export const MAIN_HOST = 'http://192.168.43.188:8000';
export const IMAGE_TO_TEXT = MAIN_HOST + '/uploadimg'
export const SERVICE_HOST = "http://202.28.49.67/api"
\ No newline at end of file
......@@ -49,7 +49,7 @@ class ReminderDialogForm extends Component {
const Loading = ({ uploadProgress }) => {
return (
<View>
<Text>{"Upload : " + uploadProgress + "%\n" + onOk.toString()}</Text>
<Text>{"Upload : " + uploadProgress + "%"}</Text>
</View>
)
}
......@@ -60,7 +60,7 @@ class ReminderDialogForm extends Component {
if (imageToText && imageToText.closeMatches != -1) {
return (
<View>
<Text>{imageToText.closeMatches}</Text>
<Text>{imageToText.closeMatches[0]}</Text>
<Picker
selectedValue={this.state.selectedTime}
onValueChange={(value) => this.setState({ selectedTime: value })}
......@@ -91,6 +91,9 @@ class ReminderDialogForm extends Component {
<TouchableOpacity onPress={() => this.setState({ singlePickerVisible: true })}>
<Text>{"Dose: " + this.state.dose}</Text>
</TouchableOpacity>
<TouchableOpacity>
<Text>{"Add"}</Text>
</TouchableOpacity>
</View>
)
} else if (imageToText && imageToText.closeMatches == -1) {
......
......@@ -76,7 +76,6 @@ class AppCamera extends Component {
<ReminderDialogForm
uploadProgress={this.state.uploadProgress}
imageToText={this.state.imageToText}
onOk={this.state.onAddReminder}
/>
</MaterialDialog>
<MaterialDialog
......@@ -102,6 +101,7 @@ class AppCamera extends Component {
type: 'imge/jpeg',
name: 'image'
})
console.log(image)
futch(IMAGE_TO_TEXT, {
method: 'post',
......@@ -114,7 +114,6 @@ class AppCamera extends Component {
}).catch(err => {
this.setState({ imageToText: JSON.stringify(err) })
})
}
}
......
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