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
301df6ae
authored
May 19, 2017
by
Fernando Martínez Santiago
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
working on javadoc
parent
d9c3fac8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
3 deletions
android/Pictogram/commonlibrary/src/main/java/com/yottacode/pictogram/dao/Device.java
android/Pictogram/commonlibrary/src/main/java/com/yottacode/pictogram/dao/Picto.java
android/Pictogram/commonlibrary/src/main/java/com/yottacode/pictogram/dao/Device.java
View file @
301df6ae
...
...
@@ -218,7 +218,12 @@ public class Device extends SQLiteOpenHelper {
//db.close(); <--no es necesario cerrar la bbdd https://groups.google.com/forum/#!msg/android-developers/NwDRpHUXt0U/jIam4Q8-cqQJ
return
users
;
}
/**
* Recupera los estudiantes de un determinado alumno
* @param id_sup
* @return
* @throws JSONException
*/
public
Vector
<
User
>
recoverStudents
(
Integer
id_sup
)
throws
JSONException
{
SQLiteDatabase
db
=
this
.
getReadableDatabase
();
Vector
<
User
>
users
=
new
Vector
<>();
...
...
android/Pictogram/commonlibrary/src/main/java/com/yottacode/pictogram/dao/Picto.java
View file @
301df6ae
...
...
@@ -30,7 +30,11 @@ public class Picto extends Img {
private
static
final
String
LOG_TAG
=
Img
.
class
.
getName
();
public
static
final
int
STUPICTO_NULL
=
-
1
;
/**
* Set the id of the picto for a given student and scene.
* IMPORTANT: Do not confuse with Img.ID, the id of the image!
* @param id
*/
public
void
set_stupicto_id
(
int
id
){
this
.
id_stupicto
=
id
;
}
...
...
@@ -132,13 +136,27 @@ public class Picto extends Img {
}
/**
* Get the path where the audios are saved
* @return
*/
public
static
String
getAudioPictosPath
()
{
return
Environment
.
getExternalStorageDirectory
()
+
File
.
separator
+
Environment
.
DIRECTORY_MUSIC
+
File
.
separator
+
"PictoAudio"
;
}
/**
* Get the full path for a given picto
* @return
*/
public
String
get_audioPath
()
{
String
audioPath
=
getAudioPictosPath
();
return
audioPath
+
File
.
separator
+
"pictosound_"
+
PCBcontext
.
getPcbdb
().
getCurrentUser
().
get_id_stu
()+
"_"
+
this
.
get_id
()+
".mp3"
;
}
/**
*
* @return the file of audio associated with the Picto
*/
public
File
get_audioFile
()
{
File
file
=
new
File
(
get_audioPath
());
...
...
@@ -160,7 +178,7 @@ public class Picto extends Img {
/**
*
* @return true if it's a local pictogram
* @return true if it's a local pictogram
--> is was not uploaded ever
*/
public
boolean
is_local
()
{
return
this
.
get_id
()<
0
;}
...
...
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