Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
21_22-J 38
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
21_22-J 38
21_22-J 38
Commits
29b4dddf
Commit
29b4dddf
authored
Apr 29, 2022
by
W.D.R.P. Sandeepa
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'it18218640' into 'master'
some changes See merge request
!153
parents
394fc21b
d77e9e7f
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
75 additions
and
5 deletions
+75
-5
API/app.py
API/app.py
+10
-1
API/model/colorModel.py
API/model/colorModel.py
+10
-4
frontend/android/app/src/main/java/com/firstapp/MainApplication.java
...droid/app/src/main/java/com/firstapp/MainApplication.java
+1
-0
frontend/android/settings.gradle
frontend/android/settings.gradle
+2
-0
frontend/ios/Podfile
frontend/ios/Podfile
+2
-0
frontend/package-lock.json
frontend/package-lock.json
+11
-0
frontend/package.json
frontend/package.json
+1
-0
frontend/src/router/router.js
frontend/src/router/router.js
+7
-0
frontend/src/screen/sample/sam.js
frontend/src/screen/sample/sam.js
+31
-0
No files found.
API/app.py
View file @
29b4dddf
...
...
@@ -135,7 +135,16 @@ def store():
time
=
"2S"
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)
...
...
API/model/colorModel.py
View file @
29b4dddf
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
():
...
...
@@ -45,11 +45,17 @@ def get_color_activities2():
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
():
data_dic
=
[]
...
...
frontend/android/app/src/main/java/com/firstapp/MainApplication.java
View file @
29b4dddf
...
...
@@ -4,6 +4,7 @@ import android.app.Application;
import
android.content.Context
;
import
com.facebook.react.PackageList
;
import
com.facebook.react.ReactApplication
;
import
net.no_mad.tts.TextToSpeechPackage
;
import
com.facebook.react.ReactInstanceManager
;
import
com.facebook.react.ReactNativeHost
;
import
com.facebook.react.ReactPackage
;
...
...
frontend/android/settings.gradle
View file @
29b4dddf
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
)
include
':app'
frontend/ios/Podfile
View file @
29b4dddf
...
...
@@ -12,6 +12,8 @@ target 'firstApp' do
:hermes_enabled
=>
false
)
pod
'TextToSpeech'
,
:path
=>
'../node_modules/react-native-tts'
target
'firstAppTests'
do
inherit!
:complete
# Pods for testing
...
...
frontend/package-lock.json
View file @
29b4dddf
...
...
@@ -30,6 +30,7 @@
"react-native-safe-area-context": "^3.3.2",
"react-native-screens": "^3.9.0",
"react-native-table-component": "^1.2.1",
"react-native-tts": "^4.1.0",
"react-native-vector-icons": "^9.0.0",
"react-redux": "^7.2.6",
"redux": "^4.1.2"
...
...
@@ -12830,6 +12831,11 @@
"resolved": "https://registry.npmjs.org/react-native-table-component/-/react-native-table-component-1.2.2.tgz",
"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": {
"version": "9.0.0",
"resolved": "https://registry.npmjs.org/react-native-vector-icons/-/react-native-vector-icons-9.0.0.tgz",
...
...
@@ -25332,6 +25338,11 @@
"resolved": "https://registry.npmjs.org/react-native-table-component/-/react-native-table-component-1.2.2.tgz",
"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": {
"version": "9.0.0",
"resolved": "https://registry.npmjs.org/react-native-vector-icons/-/react-native-vector-icons-9.0.0.tgz",
frontend/package.json
View file @
29b4dddf
...
...
@@ -32,6 +32,7 @@
"react-native-safe-area-context"
:
"^3.3.2"
,
"react-native-screens"
:
"^3.9.0"
,
"react-native-table-component"
:
"^1.2.1"
,
"react-native-tts"
:
"^4.1.0"
,
"react-native-vector-icons"
:
"^9.0.0"
,
"react-redux"
:
"^7.2.6"
,
"redux"
:
"^4.1.2"
...
...
frontend/src/router/router.js
View file @
29b4dddf
...
...
@@ -37,6 +37,8 @@ import GameScreenSix from '../screen/memory/elementry/GameScreenSix';
import
GameScreenSixAll
from
'
../screen/memory/elementry/GameScreenSixAll
'
;
import
GameOverScreen
from
'
../screen/memory/GameOverScreen
'
;
import
Sam
from
'
../screen/sample/sam
'
;
const
Stack
=
createNativeStackNavigator
();
const
AppRouter
=
()
=>
{
...
...
@@ -230,6 +232,11 @@ const AppRouter = () => {
name
=
"
SecondaryType
"
component
=
{
SecondaryType
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Sam
"
component
=
{
Sam
}
/
>
<
/Stack.Navigator
>
<
/NavigationContainer
>
);
...
...
frontend/src/screen/sample/sam.js
0 → 100644
View file @
29b4dddf
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
>
)
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment