Commit 29b4dddf authored by W.D.R.P. Sandeepa's avatar W.D.R.P. Sandeepa

Merge branch 'it18218640' into 'master'

some changes

See merge request !153
parents 394fc21b d77e9e7f
...@@ -135,7 +135,16 @@ def store(): ...@@ -135,7 +135,16 @@ def store():
time = "2S" time = "2S"
usersId = 1 usersId = 1
response = storeResult(value, date, result, time, usersId) try:
response = storeResult(value, date, result, time, usersId)
return response
except Exception as e:
print(e)
return e
# Read Function Route (IT) # Read Function Route (IT)
......
from flask import jsonify from flask import jsonify
from API.db.dbConnection import get_all_data, insert_data_json, insert_data from API.db.dbConnection import get_all_data, insert_data_json, insert_data, insert
def get_color_activities1(): def get_color_activities1():
...@@ -45,11 +45,17 @@ def get_color_activities2(): ...@@ -45,11 +45,17 @@ def get_color_activities2():
def storeResult(value, date, result, time, usersId): def storeResult(value, date, result, time, usersId):
qry = 'INSERT INTO coloractivityresult VALUES (NULL, % s, % s, % s, % s, % s)', (date, result, time, usersId, value) try:
qry = 'INSERT INTO coloractivityresult VALUES (NULL, %s, %s, %s, %s, %s)'
response = insert_data(qry) args = (date, result, usersId, time, value)
return response response = insert(qry, args)
return response
except Exception as e:
print(e)
return e
def get_color_activity_result(): def get_color_activity_result():
data_dic = [] data_dic = []
......
...@@ -4,6 +4,7 @@ import android.app.Application; ...@@ -4,6 +4,7 @@ import android.app.Application;
import android.content.Context; import android.content.Context;
import com.facebook.react.PackageList; import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication; import com.facebook.react.ReactApplication;
import net.no_mad.tts.TextToSpeechPackage;
import com.facebook.react.ReactInstanceManager; import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage; import com.facebook.react.ReactPackage;
......
rootProject.name = 'firstApp' rootProject.name = 'firstApp'
include ':react-native-tts'
project(':react-native-tts').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-tts/android')
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app' include ':app'
...@@ -12,6 +12,8 @@ target 'firstApp' do ...@@ -12,6 +12,8 @@ target 'firstApp' do
:hermes_enabled => false :hermes_enabled => false
) )
pod 'TextToSpeech', :path => '../node_modules/react-native-tts'
target 'firstAppTests' do target 'firstAppTests' do
inherit! :complete inherit! :complete
# Pods for testing # Pods for testing
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
"react-native-safe-area-context": "^3.3.2", "react-native-safe-area-context": "^3.3.2",
"react-native-screens": "^3.9.0", "react-native-screens": "^3.9.0",
"react-native-table-component": "^1.2.1", "react-native-table-component": "^1.2.1",
"react-native-tts": "^4.1.0",
"react-native-vector-icons": "^9.0.0", "react-native-vector-icons": "^9.0.0",
"react-redux": "^7.2.6", "react-redux": "^7.2.6",
"redux": "^4.1.2" "redux": "^4.1.2"
...@@ -12830,6 +12831,11 @@ ...@@ -12830,6 +12831,11 @@
"resolved": "https://registry.npmjs.org/react-native-table-component/-/react-native-table-component-1.2.2.tgz", "resolved": "https://registry.npmjs.org/react-native-table-component/-/react-native-table-component-1.2.2.tgz",
"integrity": "sha512-7bbsi5431iWcjj3toASh8lFHGi6AG/+MTd4M7GuksXKxx/CFs/Qwv1Ys7D2wgyuYKe3hxWNfSVrteFj0tOYXYw==" "integrity": "sha512-7bbsi5431iWcjj3toASh8lFHGi6AG/+MTd4M7GuksXKxx/CFs/Qwv1Ys7D2wgyuYKe3hxWNfSVrteFj0tOYXYw=="
}, },
"node_modules/react-native-tts": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/react-native-tts/-/react-native-tts-4.1.0.tgz",
"integrity": "sha512-tvf3lQ6u9MqztUie37qoPw5YQPqi0ql1lPhDsBBs/RRA6A/H1J9X9H/qb1A0Hx0ZpjavrEdtVSqQQ2JDZvZCTQ=="
},
"node_modules/react-native-vector-icons": { "node_modules/react-native-vector-icons": {
"version": "9.0.0", "version": "9.0.0",
"resolved": "https://registry.npmjs.org/react-native-vector-icons/-/react-native-vector-icons-9.0.0.tgz", "resolved": "https://registry.npmjs.org/react-native-vector-icons/-/react-native-vector-icons-9.0.0.tgz",
...@@ -25332,6 +25338,11 @@ ...@@ -25332,6 +25338,11 @@
"resolved": "https://registry.npmjs.org/react-native-table-component/-/react-native-table-component-1.2.2.tgz", "resolved": "https://registry.npmjs.org/react-native-table-component/-/react-native-table-component-1.2.2.tgz",
"integrity": "sha512-7bbsi5431iWcjj3toASh8lFHGi6AG/+MTd4M7GuksXKxx/CFs/Qwv1Ys7D2wgyuYKe3hxWNfSVrteFj0tOYXYw==" "integrity": "sha512-7bbsi5431iWcjj3toASh8lFHGi6AG/+MTd4M7GuksXKxx/CFs/Qwv1Ys7D2wgyuYKe3hxWNfSVrteFj0tOYXYw=="
}, },
"react-native-tts": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/react-native-tts/-/react-native-tts-4.1.0.tgz",
"integrity": "sha512-tvf3lQ6u9MqztUie37qoPw5YQPqi0ql1lPhDsBBs/RRA6A/H1J9X9H/qb1A0Hx0ZpjavrEdtVSqQQ2JDZvZCTQ=="
},
"react-native-vector-icons": { "react-native-vector-icons": {
"version": "9.0.0", "version": "9.0.0",
"resolved": "https://registry.npmjs.org/react-native-vector-icons/-/react-native-vector-icons-9.0.0.tgz", "resolved": "https://registry.npmjs.org/react-native-vector-icons/-/react-native-vector-icons-9.0.0.tgz",
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
"react-native-safe-area-context": "^3.3.2", "react-native-safe-area-context": "^3.3.2",
"react-native-screens": "^3.9.0", "react-native-screens": "^3.9.0",
"react-native-table-component": "^1.2.1", "react-native-table-component": "^1.2.1",
"react-native-tts": "^4.1.0",
"react-native-vector-icons": "^9.0.0", "react-native-vector-icons": "^9.0.0",
"react-redux": "^7.2.6", "react-redux": "^7.2.6",
"redux": "^4.1.2" "redux": "^4.1.2"
......
...@@ -37,6 +37,8 @@ import GameScreenSix from '../screen/memory/elementry/GameScreenSix'; ...@@ -37,6 +37,8 @@ import GameScreenSix from '../screen/memory/elementry/GameScreenSix';
import GameScreenSixAll from '../screen/memory/elementry/GameScreenSixAll'; import GameScreenSixAll from '../screen/memory/elementry/GameScreenSixAll';
import GameOverScreen from '../screen/memory/GameOverScreen'; import GameOverScreen from '../screen/memory/GameOverScreen';
import Sam from '../screen/sample/sam';
const Stack = createNativeStackNavigator(); const Stack = createNativeStackNavigator();
const AppRouter = () => { const AppRouter = () => {
...@@ -230,6 +232,11 @@ const AppRouter = () => { ...@@ -230,6 +232,11 @@ const AppRouter = () => {
name="SecondaryType" name="SecondaryType"
component={SecondaryType} component={SecondaryType}
/> />
<Stack.Screen
options={{headerShown: false}}
name="Sam"
component={Sam}
/>
</Stack.Navigator> </Stack.Navigator>
</NavigationContainer> </NavigationContainer>
); );
......
import { useNavigation } from "@react-navigation/native";
import Orientation from 'react-native-orientation-locker';
import React, { useEffect, useState } from "react";
import { Text,TouchableOpacity, StyleSheet, View, Dimensions, SafeAreaView, ImageBackground, Button, Image, StatusBar} from 'react-native'
import Tts from 'react-native-tts';
export default function sam() {
const hand = () =>{
Tts.speak('Hello');
Tts.setDefaultLanguage('si-US');
Tts.voices().then(voices => console.log(voices));
Tts.sto
}
React.useEffect(() => {
// Tts.speak('Hello, world!');
// Tts.voices().then(voices => console.log(voices));
}, []);
return (
<SafeAreaView>
<Text onPress={() => hand()} >Hellow</Text>
</SafeAreaView>
)
}
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