Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
yotta
/
pictogram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
60
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
2cf59947
authored
Feb 01, 2017
by
Fernando Martínez Santiago
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
issue #868, #869,#873,#874 closed
parent
c7abca0f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
184 additions
and
59 deletions
android/Pictogram/commonlibrary/src/main/java/com/yottacode/net/RestapiWrapper.java
android/Pictogram/commonlibrary/src/main/java/com/yottacode/pictogram/dao/Device.java
android/Pictogram/commonlibrary/src/main/java/com/yottacode/pictogram/tools/PCBcontext.java
android/Pictogram/commonlibrary/src/main/res/raw/pcbdb_create.sql
android/Pictogram/supervisor_tablet/supervisor_tablet.iml
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/PictogramActivity.java
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/session/SessionActivity.java
android/Pictogram/tabletlibrary/tabletlibrary.iml
android/Pictogram/watch/watch.iml
android/Pictogram/yotta_tablet/yotta_tablet.iml
android/Pictogram/commonlibrary/src/main/java/com/yottacode/net/RestapiWrapper.java
View file @
2cf59947
...
...
@@ -18,8 +18,6 @@ import java.net.UnknownHostException;
import
java.nio.charset.Charset
;
import
java.util.Hashtable
;
import
javax.net.ssl.HttpsURLConnection
;
/**
* Wrapper for connecting with a server using its tokenized RESTful API.
...
...
@@ -136,7 +134,7 @@ public class RestapiWrapper {
StringBuilder
response
=
new
StringBuilder
(
""
);
String
line
;
JSONObject
JSONresponse
;
BufferedReader
br
=
new
BufferedReader
(
new
InputStreamReader
(
responseCode
==
Http
s
URLConnection
.
HTTP_OK
BufferedReader
br
=
new
BufferedReader
(
new
InputStreamReader
(
responseCode
==
HttpURLConnection
.
HTTP_OK
?
urlConnection
.
getInputStream
()
:
urlConnection
.
getErrorStream
()));
// Log.i(LOG_TAG, "starting to read server answer for"+urlConnection.getURL().toString());
...
...
@@ -149,7 +147,7 @@ public class RestapiWrapper {
Log
.
i
(
LOG_TAG
,
"Raw server answer: "
+
response
);
try
{
JSONresponse
=
new
JSONObject
(
"{ "
+
SERVER_RESULT
+
": "
+
response
+
(
responseCode
==
Http
s
URLConnection
.
HTTP_OK
JSONresponse
=
new
JSONObject
(
"{ "
+
SERVER_RESULT
+
": "
+
response
+
(
responseCode
==
HttpURLConnection
.
HTTP_OK
?
"}"
:
", "
+
SERVER_ERROR
+
": "
+
responseCode
+
"}"
));
}
catch
(
JSONException
e
)
{
...
...
@@ -189,7 +187,7 @@ public class RestapiWrapper {
URL
url
=
new
URL
(
surl
);
HttpURLConnection
urlConnection
=
null
;
urlConnection
=
(
Http
s
URLConnection
)
url
.
openConnection
();
urlConnection
=
(
HttpURLConnection
)
url
.
openConnection
();
urlConnection
.
setReadTimeout
(
TIME_OUT
);
urlConnection
.
setConnectTimeout
(
TIME_OUT
);
urlConnection
.
setRequestMethod
(
request_method
);
...
...
android/Pictogram/commonlibrary/src/main/java/com/yottacode/pictogram/dao/Device.java
View file @
2cf59947
...
...
@@ -35,12 +35,12 @@ import java.util.Vector;
*/
public
class
Device
extends
SQLiteOpenHelper
{
private
static
final
String
LOG_TAG
=
SQLiteOpenHelper
.
class
.
getCanonicalName
();
Context
context
;
final
static
class
PARAMS
{
static
String
keyword
=
"key"
;
static
String
deviceID
=
"deviceID"
;
static
String
stu_id
=
"last__stu_id"
;
static
String
sup_id
=
"last__sup_id"
;
}
...
...
@@ -118,23 +118,6 @@ public class Device extends SQLiteOpenHelper {
return
getParamValue
(
PARAMS
.
keyword
);
}
/**
* Save the device ID, such as the Android ID.
* @param deviceID the platform dependent ID
* @see Device#getDeviceID()
*/
public
void
setDeviceID
(
String
deviceID
)
{
setParam
(
PARAMS
.
deviceID
,
deviceID
);
}
/**
* @return the platform device ID, such as Android ID, if it is registered, or null if it is not specified.
* @see Device#setDeviceID(String)
*/
public
String
getDeviceID
()
{
return
getParamValue
(
PARAMS
.
deviceID
);
}
/**
* Save the id of the student selected
...
...
@@ -446,5 +429,12 @@ public class Device extends SQLiteOpenHelper {
@Override
public
void
onUpgrade
(
SQLiteDatabase
db
,
int
oldVersion
,
int
newVersion
)
{
}
try
{
Log
.
i
(
LOG_TAG
,
"Upgrading db from "
+
oldVersion
+
" to "
+
newVersion
);
executeSQLScript
(
db
,
DeviceHelper
.
getDBScriptStream
(
this
.
context
));
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
"Update database ir cached Images error"
,
e
);
}
}
}
android/Pictogram/commonlibrary/src/main/java/com/yottacode/pictogram/tools/PCBcontext.java
View file @
2cf59947
...
...
@@ -37,7 +37,7 @@ public final class PCBcontext {
if
(!
init
)
{
init
=
true
;
context
=
c
;
device
=
new
Device
(
c
,
null
,
1
);
device
=
new
Device
(
c
,
null
,
2
);
SSLDummyContext
.
init
(
context
.
getResources
().
getBoolean
(
R
.
bool
.
ssl_connect
));
service
=
new
NetService
(
context
.
getResources
().
getInteger
(
R
.
integer
.
netservice_timing
),
listener
);
wrapper
=
new
RestapiWrapper
(
context
.
getResources
().
getString
(
R
.
string
.
server
),
null
,
service
);
...
...
android/Pictogram/commonlibrary/src/main/res/raw/pcbdb_create.sql
View file @
2cf59947
PRAGMA
foreign_keys
=
ON
;
--
DROP
TABLE
IF
EXISTS
params
;
--
CREATE
TABLE
params
(
key
TEXT
(
12
)
CHECK
(
key
in
(
'serial'
,
'deviceID'
,
'last__stu_id'
,
'last__sup_id'
,
'token'
,
'keyword'
))
UNIQUE
,
value
TEXT
(
40
)
NOT
NULL
...
...
@@ -10,6 +13,9 @@ value TEXT(40) NOT NULL
insert
into
params
values
(
"keyword"
,
"1234"
)
;
--
DROP
TABLE
IF
EXISTS
picto
;
--
CREATE
TABLE
picto
(
id
INTEGER
PRIMARY
KEY
,
url
VARCHAR
(
250
)
NOT
NULL
,
...
...
@@ -17,6 +23,9 @@ translation VARCHAR(60) NOT NULL
)
;
--
DROP
TABLE
IF
EXISTS
student
;
--
CREATE
TABLE
student
(
id
INTEGER
PRIMARY
KEY
,
nickname
TEXT
(
40
)
NOT
NULL
,
...
...
@@ -30,6 +39,8 @@ attributes TEXT(1024) NULL
)
;
--
DROP
TABLE
IF
EXISTS
supervisor
;
--
CREATE
TABLE
supervisor
(
id
INTEGER
PRIMARY
KEY
,
email
TEXT
(
140
)
NOT
NULL
,
...
...
@@ -47,6 +58,9 @@ office TEXT(140) NULL
insert
into
supervisor
values
(
-
1
,
""
,
""
,
""
,
""
,
""
,
"M"
,
"es-es"
,
NULL
,
NULL
)
;
--
DROP
TABLE
IF
EXISTS
users
;
--
CREATE
TABLE
users
(
id_stu
INTEGER
NOT
NULL
REFERENCES
student
ON
DELETE
CASCADE
,
id_sup
INTEGER
NOT
NULL
REFERENCES
supervisor
ON
DELETE
CASCADE
,
...
...
@@ -54,6 +68,8 @@ constraint ck_users UNIQUE(id_stu,id_sup)
)
;
--
DROP
TABLE
IF
EXISTS
collection
;
--
CREATE
TABLE
collection
(
id_stu
INTEGER
NOT
NULL
REFERENCES
student
ON
DELETE
CASCADE
,
...
...
@@ -63,23 +79,39 @@ constraint ck_collection UNIQUE(id_stu,id_picto,attributes)
)
;
--
DROP
INDEX
IF
EXISTS
idx_col_stu
;
--
CREATE
INDEX
idx_col_stu
ON
collection
(
id_stu
)
;
--
DROP
INDEX
IF
EXISTS
idx_col_pic
;
--
CREATE
INDEX
idx_col_pic
ON
collection
(
id_picto
)
;
--
DROP
TABLE
IF
EXISTS
action
;
--
CREATE
TABLE
action
(
json_action
TEXT
(
512
)
)
;
--
DROP
TABLE
IF
EXISTS
deprecated_images
;
--
CREATE
TABLE
deprecated_images
(
id
INTEGER
NOT
NULL
PRIMARY
KEY
,
type
TEXT
(
5
)
NOT
NULL
CHECK
(
type
in
(
'stu'
,
'sup'
,
'pic'
))
)
;
--
DROP
VIEW
IF
EXISTS
users_detail
;
--
CREATE
VIEW
users_detail
AS
SELECT
id_stu
,
...
...
@@ -107,12 +139,18 @@ CREATE VIEW users_detail AS
a
.
id
=
users
.
id_stu
AND
b
.
id
=
users
.
id_sup
;
--
DROP
VIEW
IF
EXISTS
collection_detail
;
--
CREATE
VIEW
collection_detail
AS
SELECT
id_stu
,
id_picto
,
b
.
url
,
translation
,
attributes
FROM
collection
a
,
picto
b
WHERE
a
.
id_picto
=
b
.
id
;
--
DROP
TRIGGER
IF
EXISTS
trg_delete_user_stu
;
--
--If a student is deleted and there is no longer any user with such a student, then it should be deleted
CREATE
TRIGGER
trg_delete_user_stu
AFTER
DELETE
ON
users
...
...
@@ -123,6 +161,9 @@ BEGIN
END
;
--
DROP
TRIGGER
IF
EXISTS
trg_delete_user_sup
;
--
--If a supervisor is deleted and there is no longer any user with such a supervisor, then it should be deleted
CREATE
TRIGGER
trg_delete_user_sup
AFTER
DELETE
ON
users
...
...
@@ -133,6 +174,9 @@ BEGIN
END
;
--
DROP
TRIGGER
IF
EXISTS
trg_delete_stu
;
--
--If a student is deleted, then the img should be deleted
CREATE
TRIGGER
trg_delete_stu
AFTER
DELETE
ON
student
...
...
@@ -142,6 +186,9 @@ BEGIN
END
;
--
DROP
TRIGGER
IF
EXISTS
trg_insert_stu
;
--
--If a student is inserted, then the img should be preserved
CREATE
TRIGGER
trg_insert_stu
AFTER
INSERT
ON
student
...
...
@@ -151,6 +198,9 @@ BEGIN
END
;
--
DROP
TRIGGER
IF
EXISTS
trg_delete_sup
;
--
--If a supervisor is deleted, then the img should be deleted
CREATE
TRIGGER
trg_delete_sup
AFTER
DELETE
ON
supervisor
...
...
@@ -160,6 +210,9 @@ BEGIN
END
;
--
DROP
TRIGGER
IF
EXISTS
trg_insert_sup
;
--
--If a supervisor is inserted, then the img should be preserved
CREATE
TRIGGER
trg_insert_sup
AFTER
INSERT
ON
supervisor
...
...
@@ -169,6 +222,9 @@ BEGIN
END
;
--
DROP
TRIGGER
IF
EXISTS
trg_delete_pic
;
--
--If a picto is deleted, then the img should be deleted
CREATE
TRIGGER
trg_delete_pic
AFTER
DELETE
ON
picto
...
...
@@ -178,6 +234,9 @@ BEGIN
END
;
--
DROP
TRIGGER
IF
EXISTS
trg_insert_pic
;
--
--If a picto is inserted, then the img should be preserved
CREATE
TRIGGER
trg_insert_pic
AFTER
INSERT
ON
picto
...
...
@@ -187,6 +246,10 @@ BEGIN
END
;
--
DROP
TRIGGER
IF
EXISTS
trg_delete_users_detail
;
--
CREATE
TRIGGER
trg_delete_users_detail
INSTEAD
OF
DELETE
ON
users_detail
FOR
EACH
ROW
...
...
@@ -195,6 +258,9 @@ BEGIN
END
;
--
DROP
TRIGGER
IF
EXISTS
trg_insert_users_detail
;
--
CREATE
TRIGGER
trg_insert_users_detail
INSTEAD
OF
INSERT
ON
users_detail
FOR
EACH
ROW
...
...
@@ -206,6 +272,10 @@ BEGIN
END
;
--
DROP
TRIGGER
IF
EXISTS
trg_delete_trg_insert_users_detail_as_sup
;
--
CREATE
TRIGGER
trg_insert_users_detail_as_sup
INSTEAD
OF
INSERT
ON
users_detail
FOR
EACH
ROW
...
...
@@ -219,6 +289,9 @@ END
;
--
DROP
TRIGGER
IF
EXISTS
trg_update_users_detail
;
--
CREATE
TRIGGER
trg_update_users_detail
INSTEAD
OF
UPDATE
ON
users_detail
FOR
EACH
ROW
...
...
@@ -228,6 +301,9 @@ BEGIN
END
;
--
DROP
TRIGGER
IF
EXISTS
trg_delete_collection
;
--
--If a collection is deleted and there is no longer any collection with such a picto, then the picto should be deleted
CREATE
TRIGGER
trg_delete_collection
AFTER
DELETE
ON
collection
...
...
@@ -238,6 +314,9 @@ BEGIN
END
;
--
DROP
TRIGGER
IF
EXISTS
trg_delete_collection_detail
;
--
CREATE
TRIGGER
trg_delete_collection_detail
INSTEAD
OF
DELETE
ON
collection_detail
FOR
EACH
ROW
...
...
@@ -246,6 +325,9 @@ BEGIN
END
;
--
DROP
TRIGGER
IF
EXISTS
trg_insert_collection_detail
;
--
CREATE
TRIGGER
trg_insert_collection_detail
INSTEAD
OF
INSERT
ON
collection_detail
FOR
EACH
ROW
...
...
android/Pictogram/supervisor_tablet/supervisor_tablet.iml
View file @
2cf59947
...
...
@@ -9,6 +9,7 @@
<facet
type=
"android"
name=
"Android"
>
<configuration>
<option
name=
"SELECTED_BUILD_VARIANT"
value=
"DevFlavorDebug"
/>
<option
name=
"SELECTED_TEST_ARTIFACT"
value=
"_android_test_"
/>
<option
name=
"ASSEMBLE_TASK_NAME"
value=
"assembleDevFlavorDebug"
/>
<option
name=
"COMPILE_JAVA_TASK_NAME"
value=
"compileDevFlavorDebugSources"
/>
<afterSyncTasks>
...
...
@@ -39,6 +40,7 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/DevFlavorDebug/assets"
type=
"java-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/DevFlavorDebug/aidl"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/DevFlavorDebug/java"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/DevFlavorDebug/jni"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/DevFlavorDebug/rs"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/DevFlavorDebug/shaders"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/build/generated/source/r/androidTest/DevFlavor/debug"
isTestSource=
"true"
generated=
"true"
/>
...
...
@@ -53,6 +55,7 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDevFlavorDebug/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDevFlavorDebug/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDevFlavorDebug/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDevFlavorDebug/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDevFlavorDebug/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDevFlavorDebug/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/DevFlavor/res"
type=
"java-resource"
/>
...
...
@@ -60,27 +63,31 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/DevFlavor/assets"
type=
"java-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/DevFlavor/aidl"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/DevFlavor/java"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/DevFlavor/jni"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/DevFlavor/rs"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/DevFlavor/shaders"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDevFlavor/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDevFlavor/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDevFlavor/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDevFlavor/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDevFlavor/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDevFlavor/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDevFlavor/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestDevFlavor/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestDevFlavor/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestDevFlavor/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestDevFlavor/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestDevFlavor/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestDevFlavor/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestDevFlavor/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestDevFlavor/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDevFlavor/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDevFlavor/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDevFlavor/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDevFlavor/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDevFlavor/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDevFlavor/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDevFlavor/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDevFlavor/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/res"
type=
"java-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/resources"
type=
"java-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/assets"
type=
"java-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/aidl"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/java"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/jni"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/rs"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/shaders"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDebug/res"
type=
"java-test-resource"
/>
...
...
@@ -88,6 +95,7 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDebug/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDebug/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDebug/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDebug/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDebug/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDebug/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/res"
type=
"java-resource"
/>
...
...
@@ -95,6 +103,7 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/assets"
type=
"java-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/aidl"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/java"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/jni"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/rs"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/shaders"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/res"
type=
"java-test-resource"
/>
...
...
@@ -102,6 +111,7 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/res"
type=
"java-test-resource"
/>
...
...
@@ -109,8 +119,10 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/shaders"
isTestSource=
"true"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/assets"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/blame"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/classes"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/dependency-cache"
/>
...
...
@@ -125,10 +137,14 @@
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/24.2.1/jars"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/incremental"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/incremental-safeguard"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/jniLibs"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/manifests"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/pre-dexed"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/res"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/rs"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/shaders"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/symbols"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/transforms"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/outputs"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/tmp"
/>
</content>
...
...
@@ -145,6 +161,7 @@
<orderEntry
type=
"library"
exported=
""
name=
"support-vector-drawable-24.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"support-core-utils-24.2.1"
level=
"project"
/>
<orderEntry
type=
"module"
module-name=
"tabletlibrary"
exported=
""
/>
<orderEntry
type=
"library"
exported=
""
name=
"android-android-24"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"okhttp-ws-2.3.0"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"play-services-base-9.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"socket.io-client-0.5.0"
level=
"project"
/>
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/PictogramActivity.java
View file @
2cf59947
...
...
@@ -771,7 +771,7 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
tapeAdapter
.
notifyDataSetChanged
();
showPictoMainGridView
();
PCBcontext
.
getActionLog
().
log
(
new
TalkAction
(
TalkAction
.
ADD
,
p
));
if
(
PictogramActivity
.
this
.
feedback_read
&&
!
PictogramActivity
.
this
.
tapeAdapter
.
play
())
if
(
PictogramActivity
.
this
.
feedback_read
&&
!
PictogramActivity
.
this
.
tapeAdapter
.
play
()
&&
!
p
.
is_category
()
)
PictogramActivity
.
this
.
tts
.
play
(
p
.
get_translation
());
if
(
PictogramActivity
.
this
.
feedback_highlight
)
execHighligthFeeback
(
p
,
false
);
}
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/session/SessionActivity.java
View file @
2cf59947
...
...
@@ -168,8 +168,8 @@ public class SessionActivity extends FragmentActivity implements ListInstruction
final
Button
supBtn
=((
Button
)
findViewById
(
R
.
id
.
btn_supervised
));
final
Button
modBtn
=((
Button
)
findViewById
(
R
.
id
.
btn_model
));
((
ListView
)
findViewById
(
R
.
id
.
session_serverlog
)).
setAdapter
(
new
ArrayAdapter
<
String
>(
getBaseContext
(),
R
.
layout
.
list_logsessions
));
StudentFullNameView
.
setText
(
student
.
get_name_stu
()
+
" "
+
student
.
get_surname_stu
()
+
" ("
+
student
.
get_office
()+
")"
);
StudentUserNameView
.
setText
(
student
.
get_
nickname_stu
());
StudentFullNameView
.
setText
(
student
.
get_name_stu
()
+
" "
+
student
.
get_surname_stu
());
StudentUserNameView
.
setText
(
student
.
get_
office
());
try
{
StudentPhotoView
.
setImageBitmap
(
student
.
get_bitmap_stu
(
this
.
getBaseContext
()));
}
catch
(
IOException
e
)
{
...
...
@@ -185,7 +185,7 @@ public class SessionActivity extends FragmentActivity implements ListInstruction
onoffBtn
.
setOnCheckedChangeListener
(
new
CompoundButton
.
OnCheckedChangeListener
()
{
@Override
public
void
onCheckedChanged
(
CompoundButton
buttonView
,
boolean
isChecked
)
{
set_fragment
(
isChecked
);
set_fragment
(
isChecked
,
onoffBtn
);
}
});
onoffBtn
.
setEnabled
(
false
);
...
...
@@ -350,7 +350,7 @@ public class SessionActivity extends FragmentActivity implements ListInstruction
finish
();
startActivity
(
new
Intent
(
SessionActivity
.
this
,
PictogramActivity
.
class
));
}
private
void
set_fragment
(
boolean
isChecked
)
{
private
void
set_fragment
(
boolean
isChecked
,
final
ToggleButton
onoffBtn
)
{
if
(
isChecked
)
{
addLogMsg
(
getString
(
R
.
string
.
session_log_startingsession
));
...
...
@@ -360,6 +360,7 @@ public class SessionActivity extends FragmentActivity implements ListInstruction
addLogMsg
(
getString
(
R
.
string
.
session_log_startsession
));
SessionActivity
.
this
.
id_session
=
id_session
;
SessionFragment
session
=
set_fragment_sesion
();
onoffBtn
.
setText
(
"STOP"
);
new_try
(
session
,
id_first_try
);
}
...
...
@@ -375,6 +376,7 @@ public class SessionActivity extends FragmentActivity implements ListInstruction
});
}
else
{
addLogMsg
(
getString
(
R
.
string
.
session_log_closingsession
));
onoffBtn
.
setText
(
"REC"
);
SessionWrapper
.
closeSession
(
id_session
,
new
SessionWrapper
.
iCloseSession
()
{
@Override
public
void
closed
(
String
end
)
{
...
...
android/Pictogram/tabletlibrary/tabletlibrary.iml
View file @
2cf59947
...
...
@@ -15,6 +15,7 @@
<facet
type=
"android"
name=
"Android"
>
<configuration>
<option
name=
"SELECTED_BUILD_VARIANT"
value=
"debug"
/>
<option
name=
"SELECTED_TEST_ARTIFACT"
value=
"_android_test_"
/>
<option
name=
"ASSEMBLE_TASK_NAME"
value=
"assembleDebug"
/>
<option
name=
"COMPILE_JAVA_TASK_NAME"
value=
"compileDebugSources"
/>
<afterSyncTasks>
...
...
@@ -25,7 +26,7 @@
<option
name=
"RES_FOLDER_RELATIVE_PATH"
value=
"/src/main/res"
/>
<option
name=
"RES_FOLDERS_RELATIVE_PATH"
value=
"file://$MODULE_DIR$/src/main/res"
/>
<option
name=
"ASSETS_FOLDER_RELATIVE_PATH"
value=
"/src/main/assets"
/>
<option
name=
"
PROJECT_TYPE"
value=
"1
"
/>
<option
name=
"
LIBRARY_PROJECT"
value=
"true
"
/>
</configuration>
</facet>
</component>
...
...
@@ -53,6 +54,7 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/assets"
type=
"java-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/aidl"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/java"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/jni"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/rs"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/shaders"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDebug/res"
type=
"java-test-resource"
/>
...
...
@@ -60,6 +62,7 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDebug/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDebug/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDebug/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDebug/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDebug/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDebug/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/res"
type=
"java-resource"
/>
...
...
@@ -67,6 +70,7 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/assets"
type=
"java-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/aidl"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/java"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/jni"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/rs"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/shaders"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/res"
type=
"java-test-resource"
/>
...
...
@@ -74,6 +78,7 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/res"
type=
"java-test-resource"
/>
...
...
@@ -81,6 +86,7 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/shaders"
isTestSource=
"true"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/annotations"
/>
...
...
@@ -124,6 +130,7 @@
<orderEntry
type=
"library"
exported=
""
name=
"support-vector-drawable-24.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"support-core-utils-24.2.1"
level=
"project"
/>
<orderEntry
type=
"module"
module-name=
"commonlibrary"
exported=
""
/>
<orderEntry
type=
"library"
exported=
""
name=
"android-android-24"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"okhttp-ws-2.3.0"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"play-services-base-9.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"socket.io-client-0.5.0"
level=
"project"
/>
...
...
android/Pictogram/watch/watch.iml
View file @
2cf59947
This diff is collapsed.
Click to expand it.
android/Pictogram/yotta_tablet/yotta_tablet.iml
View file @
2cf59947
This diff is collapsed.
Click to expand it.
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