Commit f54e02e8 by Arturo Montejo Ráez

Merge branch 'develop'

parents 90586c44 9836ef65
Showing with 3038 additions and 734 deletions
......@@ -15,6 +15,8 @@ sails/arasaac*
sails/arasaac
sails/src/assets/symbolstx*
sails/src/assets/upload
sails/src/assets/arasaac*
sails/src/assets/arasaac
sails/upload.tgz
# Webapp #
......@@ -24,12 +26,13 @@ sails/src/assets/app/bower_components
sails/src/assets/app/modules
sails/src/assets/app/css
sails/src/assets/app/js
sails/src/assets/scripts/config.js
sails/src/config/ssl/**/*.key
sails/src/config/ssl/**/*.crt
sails/src/config/ssl/**/*.csr
sails/src/config/ssl/**/*.pem
sails/src/config/local.js
sails/src/config/local.js
sails/src/assets/scripts/config.js
sails/src/node_modules
sails/src/certbot.log
sails/.vagrant
......
......@@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
classpath 'com.android.tools.build:gradle:2.3.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
......
......@@ -8,10 +8,10 @@ android {
minSdkVersion 21
targetSdkVersion 21
versionCode 1
versionName "1.0"
versionName "1.2"
resValue "string", "db_name", "PCB.db"
resValue "integer", "db_version", "4"
resValue "string", "app_version", "1.1"
resValue "integer", "db_version", "8"
//resValue "string", "app_version", "1.1"
resValue "string", "core_vocabulary", "core_vocabulary"
resValue "string", "apk", "to_be_set_in_subproject"
resValue "string", "VersionManagerClass", "to_be_set_in_subproject"
......
......@@ -19,12 +19,12 @@ import java.nio.charset.Charset;
import java.util.Hashtable;
/**
* Wrapper for connecting with a server using its tokenized RESTful API.
* Connections are implemented asynchronous, and responses are handled by an instance of
* iRestapiListener.
*
* @author dofer
/*
Wrapper for connecting with a server using its tokenized RESTful API.
Connections are implemented asynchronous, and responses are handled by an instance of
iRestapiListener.
@author dofer
*/
/**
......@@ -32,12 +32,12 @@ import java.util.Hashtable;
* LastUpdate: 22 de enero de 2016
*/
public class RestapiWrapper {
String server;
String token;
iSilentLogin silentLogin;
public static final int TIME_OUT=20000;
private final String server;
private String token;
private final iSilentLogin silentLogin;
private static final int TIME_OUT=20000;
private static final String SERVER_RESULT="result";
public static final String SERVER_ERROR="error";
private static final String SERVER_ERROR="error";
// String constant for logs
private final static String LOG_TAG = RestapiWrapper.class.getSimpleName(); // Or .getCanonicalName()
......@@ -59,10 +59,27 @@ public class RestapiWrapper {
return server;
}
public void ask(String operation, Hashtable<String, String> params, String postOrGet, iRestapiListener listener) {
ask(operation, params, postOrGet, false, listener);
/**
* Executes a server RESTful operation with a given number of params. The request mode is POST, PUT or GET
* @param operation to be executed
* @param params to be sent
* @param requestMethod "POST" or "GET" or "PUT"
* @param listener when the server response is read, the listener is called
*/
public void ask(String operation, Hashtable<String, String> params, String requestMethod, iRestapiListener listener) {
ask(operation, params, requestMethod, false, listener);
}
public void ask(String operation, Hashtable<String, String> params, String postOrGet, boolean json, iRestapiListener listener) {
/**
* Executes a server RESTful operation with a given number of params.
* @param operation to be executed
* @param params to be sent
* @param requestMethod "POST" or "GET" or "PUT"
* @param json if the parameters should be interpreted as a json field
* @param listener when the server response is read, the listener is called
* @see #ask(String, Hashtable, String, boolean, iRestapiListener)
*/
public void ask(String operation, Hashtable<String, String> params, String requestMethod, boolean json, iRestapiListener listener) {
// call preExecute listener to show loading window
listener.preExecute();
......@@ -74,7 +91,7 @@ public class RestapiWrapper {
params.put("token", this.token);
}
HttpAsyncTaskParams httpAsyncTaskParams=new HttpAsyncTaskParams();
httpAsyncTaskParams.request_method=postOrGet.toUpperCase();
httpAsyncTaskParams.request_method=requestMethod.toUpperCase();
httpAsyncTaskParams.listener=listener;
httpAsyncTaskParams.url_params=params;
httpAsyncTaskParams.url=this.server + '/' + operation;
......@@ -83,33 +100,24 @@ public class RestapiWrapper {
new HttpAsyncTask().executeOnExecutor(HttpAsyncTask.THREAD_POOL_EXECUTOR,httpAsyncTaskParams);
}
/**
*
* @param operation
* @param listener
*
* @see #ask(String, Hashtable, String, iRestapiListener)
*/
public void ask(String operation, iRestapiListener listener) {
this.ask(operation, null, "get", listener);
}
/**
* asynchronous ping
* @param ping_op
* @param error_listener
* @return
*/
/**
* synchronous ping
* @param ping_op
* @param error_listener
* @return
*/
/*
public boolean ping_session(String ping_op, iRestapiListener error_listener) {
return ping(this.server,ping_op+"?token="+this.token, error_listener);
}
*/
/**
* synchronous ping
* @param ping_op
* @return
* @param server the server where the ping should be done
* @param ping_op the url to be done
* @return true if success
*/
public static boolean ping(String server, String ping_op) {
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
......@@ -145,21 +153,29 @@ public class RestapiWrapper {
if (Character.isAlphabetic(response.charAt(0)))
response.append('\'').insert(0,'\'');
Log.i(LOG_TAG, "Raw server answer: " + response);
for (int i=0;i<(int)(((float)response.length())/3000)+1;i++) {
int begin= i * 3000;
int end = (i+1) * 3000;
if (end>response.length()) end=response.length();
Log.d(LOG_TAG, "Raw server answer(" + i+ "): " + response.substring(begin, end));
}
try {
JSONresponse = new JSONObject("{ "+SERVER_RESULT+": " + response + (responseCode == HttpURLConnection.HTTP_OK
? "}"
: ", "+SERVER_ERROR+": " + responseCode +"}"));
Log.i(LOG_TAG, "Server answer: " + JSONresponse.toString());
} catch (JSONException e) {
JSONresponse = null;
Log.e(RestapiWrapper.class.getCanonicalName(),e.getMessage());
}
Log.i(LOG_TAG, "server answer: " + JSONresponse.toString());
return JSONresponse;
}
public static JSONObject GET(String surl, Hashtable<String, String> params) throws IOException {
private static JSONObject GET(String surl, Hashtable<String, String> params) throws IOException {
URL url;
......@@ -182,10 +198,10 @@ public class RestapiWrapper {
return RestapiWrapper.resultToJSON(urlConnection);
}
public JSONObject POST(String surl, String request_method, Hashtable<String, String> params, boolean json_params) throws IOException {
private JSONObject POST(String surl, String request_method, Hashtable<String, String> params, boolean json_params) throws IOException {
URL url = new URL(surl);
HttpURLConnection urlConnection = null;
HttpURLConnection urlConnection;
urlConnection = (HttpURLConnection) url.openConnection();
urlConnection.setReadTimeout(TIME_OUT);
urlConnection.setConnectTimeout(TIME_OUT);
......@@ -233,13 +249,13 @@ public class RestapiWrapper {
public int getCode() {return this.code;}
}
private class HttpAsyncTaskParams {
protected String request_method;
protected String url;
protected Hashtable<String, String> url_params;
protected boolean json_params;
protected iRestapiListener listener;
protected Object result;
protected HTTPException error;
String request_method;
String url;
Hashtable<String, String> url_params;
boolean json_params;
iRestapiListener listener;
Object result;
HTTPException error;
}
private class HttpAsyncTask extends AsyncTask<HttpAsyncTaskParams, Void, HttpAsyncTaskParams> {
......@@ -263,7 +279,7 @@ public class RestapiWrapper {
params[0].error=new HTTPException(e.getMessage(),-1);
} catch (JSONException e) {
Log.e(LOG_TAG, "Error: '" + e.getLocalizedMessage() +
"' when parsing " + jresult==null ? "null json result" : jresult.toString());
"' when parsing " + (jresult==null ? "null json result" : jresult.toString()));
params[0].result=null;
params[0].error=new HTTPException(e.getMessage(),-1);
}
......
......@@ -40,7 +40,7 @@ public abstract class Action {
public JSONObject get_json() {
final String param_id_stu="id_stu";
final String param_id_sup="id_sup";
final String param_id_dev="id_dev";
final String param_id_scene="id_scene";
final String param_timestamp="timestamp";
final Date currentTime = new Date();
SimpleDateFormat datetime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSSZ");
......@@ -49,8 +49,10 @@ public abstract class Action {
.put(param_id_stu, PCBcontext.getPcbdb().getCurrentUser().get_id_stu())
.put(param_timestamp, datetime.format(currentTime));
Log.d("TIMESTAMP-----------> ", datetime.format(currentTime));
if (PCBcontext.getPcbdb().getCurrentUser().has_supervisor())
jsonObject.put(param_id_sup,PCBcontext.getPcbdb().getCurrentUser().get_id_sup());
if (PCBcontext.getPcbdb().getCurrentUser().has_supervisor()) {
jsonObject.put(param_id_sup, PCBcontext.getPcbdb().getCurrentUser().get_id_sup());
jsonObject.put(param_id_scene, PCBcontext.getPcbdb().getCurrentUser().get_active_scene());
}
//TODO Decidir qué almacenar con DEVICE
//if (PCBcontext.getDevice().getDeviceID()!=null)
//jsonObject.put(param_id_dev, PCBcontext.getDevice().getDeviceID());
......
package com.yottacode.pictogram.dao;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.util.Log;
import com.yottacode.pictogram.BuildConfig;
import com.yottacode.pictogram.R;
import android.util.Log;
import com.yottacode.pictogram.tools.PCBcontext;
import java.io.InputStream;
......@@ -16,7 +20,8 @@ import java.io.InputStream;
* @version 1.0
*/
public class DeviceHelper {
public static float version= Float.valueOf(PCBcontext.getContext().getResources().getString(R.string.app_version)).floatValue();
public static float version= Float.valueOf(BuildConfig.VERSION_NAME);
public static String getDBName(Context context) {
return context.getResources().getString(R.string.db_name);
}
......
......@@ -2,6 +2,7 @@ package com.yottacode.pictogram.dao;
import android.graphics.Color;
import android.os.Environment;
import android.util.Log;
import com.yottacode.pictogram.action.VocabularyAction;
......@@ -12,6 +13,11 @@ import com.yottacode.pictogram.tools.PCBcontext;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
/**
* A object which represents a pictogram
......@@ -24,15 +30,24 @@ 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;
}
public int get_stupicto_id() {
int stupicto_id;
/*int stupicto_id;
try {
stupicto_id=this.attributes.getInt(JSON_ATTTRS.STUPICTO_ID);
return this.attributes.getInt(JSON_ATTTRS.STUPICTO_ID);
} catch (JSONException e) {
e.printStackTrace();
stupicto_id=STUPICTO_NULL ;
}
return stupicto_id;
stupicto_id = STUPICTO_NULL ;
}*/
return id_stupicto;
}
public final static class JSON_ATTTRS {
......@@ -52,7 +67,6 @@ public class Picto extends Img {
public static String LEGEND = "legend";
public static String URI_SOUND = "uri_sound";
public static String USER_AVATAR = "user_avatar";
}
public final static class JSON_ATTTR_LEGEND_VALUES {
......@@ -70,7 +84,7 @@ public class Picto extends Img {
public final static int COL_UNCATEGORIZED_CONCEPTS=0;
private int id_stupicto;
private JSONObject attributes;
private boolean is_mirror=false;
private boolean highlight_background=false;
......@@ -90,8 +104,8 @@ public class Picto extends Img {
Log.e(LOG_TAG,e.getMessage());
}
}
public Picto(int id, String url, String translation, int cat, int row, int column, int freeRow, int freeColumn, int stupicto_id, String uri_sound, String user_avatar) throws JSONException {
this(id, url, new JSONObject()
public Picto(int id, String url, String translation, int cat, int row, int column, int freeRow, int freeColumn, int stupicto_id, String user_avatar) throws JSONException {
this(id, url,stupicto_id, new JSONObject()
.put(JSON_ATTTRS.CATEGORY, cat)
.put(JSON_ATTTRS.COLUMN, column)
.put(JSON_ATTTRS.ROW, row)
......@@ -101,17 +115,17 @@ public class Picto extends Img {
.put(JSON_ATTTRS.LEGEND,JSON_ATTTR_LEGEND_VALUES.NONE)
.put(JSON_ATTTRS.STUPICTO_ID,stupicto_id)
.put(JSON_ATTTRS.EXPRESSION,translation)
.put(JSON_ATTTRS.URI_SOUND,uri_sound)
.put(JSON_ATTTRS.USER_AVATAR,user_avatar)
);
}
public Picto(int id, String url,String translation, String attributes) throws JSONException {
this(id, url, new JSONObject(attributes).put(JSON_ATTTRS.EXPRESSION,translation));
public Picto(int id, String url,int id_stupicto, String translation, String attributes) throws JSONException {
this(id, url,id_stupicto, new JSONObject(attributes).put(JSON_ATTTRS.EXPRESSION,translation));
}
public Picto(int id, String url, JSONObject attributes) {
super(id,url,Img.VOCABULARY);;
public Picto(int id, String url,int id_stupicto, JSONObject attributes) {
super(id,url,Img.VOCABULARY);
this.id_stupicto = id_stupicto;
this.attributes = attributes;
try {
if (this.attributes.get(JSON_ATTTRS.CATEGORY)==null)
......@@ -123,8 +137,48 @@ 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());
return file.exists() ? file : null;
}
/*
* @override
*/
public void update_id(int id) {
if (get_audioFile()!=null) { //es necesario actualizar el nombre del audio, si lo hay
File from = get_audioFile();
super.update_id(id);
File to = new File(get_audioPath());
from.renameTo(to);
}
else
super.update_id(id);
}
/**
*
* @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;}
......@@ -301,6 +355,21 @@ public class Picto extends Img {
/**
*
* @return the associated person of a picto
*/
public String get_user_avatar() {
String associated_user;
try {
associated_user = this.attributes.has(JSON_ATTTRS.USER_AVATAR) ?this.attributes.getString(JSON_ATTTRS.USER_AVATAR) : null;
} catch (JSONException e) {
e.printStackTrace();
associated_user=null;
}
return associated_user;
}
/**
*
* @return the row of the picto
*/
public int get_row() {
......@@ -351,7 +420,35 @@ public class Picto extends Img {
* @return the uri of associated sound of the picto
*/
public String getUriSound(){
return this.attributes.optString(JSON_ATTTRS.URI_SOUND);
String uri;
try {
uri = this.attributes.has(JSON_ATTTRS.URI_SOUND) && !this.attributes.getString(JSON_ATTTRS.URI_SOUND).equals("null")
? this.attributes.getString(JSON_ATTTRS.URI_SOUND) : null;
} catch (JSONException e) {
uri=null;
Log.e(LOG_TAG,"Error getting URI sound from JSON:"+e.getMessage());
}
return uri;
}
public void setUriSound(String uriSound){
try {
this.attributes.put(JSON_ATTTRS.URI_SOUND,uriSound);
} catch (JSONException e) {
Log.e(LOG_TAG,"Error setting uri sound:"+e.getMessage());
}
}
/**
*
* @return the uri of associated sound of the picto
*/
public void ok(String path){
try {
this.attributes.put(JSON_ATTTRS.URI_SOUND, path);
} catch (JSONException e) {
e.printStackTrace();
}
}
/**
......@@ -397,7 +494,7 @@ public class Picto extends Img {
* @return true if current status is enabled. False in other case.
*/
public boolean alter_status(String status) {
Log.i(LOG_TAG,"Picto id. "+get_id()+" status enabled/disabled modified to "+is_enabled());
Log.i(LOG_TAG,"Picto id. "+get_stupicto_id()+" status enabled/disabled modified to "+is_enabled());
try {
this.attributes.put(JSON_ATTTRS.STATUS, status);
set_local_status(true);
......@@ -439,4 +536,25 @@ public class Picto extends Img {
}
}
/**
* Save an picto into disk
* @param is the stream where the image is available
* @throws IOException
*/
public void save_sound(InputStream is) throws IOException {
File file = new File(get_audioPath());
if (file.exists())
file.delete();
FileOutputStream os = new FileOutputStream(file);
int count;
byte buffer[]=new byte[1024];
while ((count = is.read(buffer)) != -1) {
os.write(buffer, 0, count);
}
os.flush();
os.close();
System.gc();
}
}
......@@ -30,14 +30,12 @@ public class User {
public final static class JSON_STUDENT_ATTTRS{
public enum delivery {clean, one, many}
static String CATEGORIES = "categories";
static String INPUT_FEEDBACK = "input_feedback";
static String INPUT_SELECTION = "input_selection";
static String PICTOGRAM_SIZE ="size";
static String TTS_ENGINE = "tts engine";
static String TTS_VOICE = "tts voice";
static String DELIVERY = "delivery";
static String SUPERVISORS = "supervisors";
}
public final static class JSON_STUDENT_INPUT_FEEDBACK {
public static String VIBRATION="vibration";
......@@ -46,25 +44,26 @@ public class User {
public static String HIGHLIGHT="highlight";
}
private Img img_stu;
private int id_scene_stu;
private String nickname_stu, pwd_stu, name_stu, surname_stu, gender_stu, lang_stu;
private JSONObject attributes_stu;
private Img img_sup;
private String email_sup, pwd_sup, name_sup, surname_sup, gender_sup, lang_sup, tts_engine_sup, office_sup;
private String supervisors;
private boolean mirror_mode=false;
public User(int id_stu, String nickname_stu, String pwd_stu, String name_stu, String surname_stu, String url_img_stu, String gender_stu, String lang_stu, String attributes_stu) throws JSONException {
this(id_stu, nickname_stu, pwd_stu, name_stu, surname_stu, url_img_stu, gender_stu, lang_stu, attributes_stu,User.NO_SUPERVISOR,"","","","","","M","es-es",null,null);
public User(int id_stu, String nickname_stu, String pwd_stu, String name_stu, String surname_stu, int id_scene_stu, String url_img_stu, String gender_stu, String lang_stu, String attributes_stu) throws JSONException {
this(id_stu, nickname_stu, pwd_stu, name_stu, surname_stu,id_scene_stu, url_img_stu, gender_stu, lang_stu, attributes_stu,User.NO_SUPERVISOR,"","","","","","M","es-es",null,null);
}
public User(int id_stu, String nickname_stu, String pwd_stu, String name_stu, String surname_stu, String url_img_stu, String gender_stu, String lang_stu, String attributes_stu,
public User(int id_stu, String nickname_stu, String pwd_stu, String name_stu, String surname_stu,int id_scene_stu, String url_img_stu, String gender_stu, String lang_stu, String attributes_stu,
int id_sup, String email_sup, String pwd_sup, String name_sup, String surname_sup, String url_img_sup, String gender_sup, String lang_sup, String tts_engine_sup, String office_sup) throws JSONException {
this.img_stu=new Img(id_stu,url_img_stu,Img.STUDENT);
this.nickname_stu=nickname_stu;
this.pwd_stu=pwd_stu;
this.name_stu=name_stu;
this.surname_stu=surname_stu;
this.id_scene_stu=id_scene_stu;
this.gender_stu=gender_stu;
this.lang_stu=lang_stu;
this.attributes_stu= attributes_stu!=null && attributes_stu.trim().length()>0 ? new JSONObject(attributes_stu) : new JSONObject();
......@@ -249,13 +248,15 @@ public class User {
}
/**
*
* @return true if the collection is organized by categories (default: True)
* @return The id of the active scene of this student
*/
public boolean has_categories() {
return this.attributes_stu.optBoolean(JSON_STUDENT_ATTTRS.CATEGORIES, true);
public int get_active_scene() {
return this.id_scene_stu;
}
public void set_active_scene(int id) {
this.id_scene_stu = id;
}
/**
*
* @return input feedback of the student configuration (default: "vibration")
......@@ -268,13 +269,6 @@ public class User {
}
}
public String get_Supervisors(){
return this.supervisors;
}
public void set_Supervisors(String newSup){
this.supervisors = newSup;
}
/**
*
* @return delivery method
......
......@@ -27,6 +27,7 @@ public class UserLogin {
private static final String TAG_USER = "user";
private static final String TAG_TOKEN = "token";
private static final String TAG_ID = "id";
private static final String TAG_ID_SCENE = "id_active_scene";
private static final String TAG_NAME = "name";
private static final String TAG_SURNAME = "surname";
private static final String TAG_GENDER = "gender";
......@@ -150,9 +151,10 @@ public class UserLogin {
} catch (JSONException e) {
e.printStackTrace();
} catch (LoginException e) {
if (e.login_failed())
GUITools.show_alert(activity, R.string.userInetErrorMsg);
else if (e.no_supervisor_students())
if (e.login_failed()) {
Log.e(LOG_TAG,"Login offline not possible: "+e.getMessage());
GUITools.show_alert(activity, R.string.userInetErrorMsg);
}else if (e.no_supervisor_students())
GUITools.show_alert(activity, R.string.noStudentsError);
}
}
......@@ -179,25 +181,28 @@ public class UserLogin {
if(progressDialog.isShowing()) progressDialog.dismiss();
try {
JSONObject user = result.getJSONObject(TAG_USER);
Log.i(LOG_TAG,user.toString());
int st_id_int = user.getInt(TAG_ID);
int st_id_scene = user.getInt(TAG_ID_SCENE);
String st_name = user.getString(TAG_NAME);
String st_surname = user.getString(TAG_SURNAME);
String st_pic = user.getString(TAG_PIC);
String st_gender = user.getString(TAG_GENDER);
String st_lang = user.getString(TAG_LANG);
String st_attributes = user.getString(TAG_ATTRIBUTES);
set_student_oline(
new User(st_id_int,
username,
password,
st_name,
st_surname,
st_pic,
st_gender,
st_lang,
st_attributes,
User.NO_SUPERVISOR, "", "", "", "", "", "M", "es-es", "", "")
User newStu = new User(st_id_int,
username,
password,
st_name,
st_surname,
st_id_scene,
st_pic,
st_gender,
st_lang,
st_attributes,
User.NO_SUPERVISOR, "", "", "", "", "", "M", "es-es", "", "");
//newStu.set_active_scene(st_id_scene);
set_student_oline(newStu
, result.getString(TAG_TOKEN)
, pictogramActivity, activity);
} catch (JSONException e) {
......@@ -235,6 +240,7 @@ public class UserLogin {
} catch (JSONException e) {
e.printStackTrace();
} catch (LoginException e) {
Log.e(LOG_TAG,"Login offline not possible: "+e.getMessage());
GUITools.show_alert(activity, R.string.userInetErrorMsg);
}
} //offline student login
......
......@@ -21,13 +21,13 @@ public class VocabularyIterator implements Iterator<Picto> {
int location;
VocabularyIterator(Hashtable<Integer,LinkedList<Picto>> pictos) {
this.keys = pictos.keys();
if (pictos.size()>1) {
if (pictos.size()>=1) {
this.pictos=pictos;
this.category = this.keys.nextElement();
}
else {
this.category=-1;
this.category=-2;
this.pictos=new Hashtable<>(1);
this.pictos.put(this.category, new LinkedList<Picto>());
}
......@@ -47,7 +47,8 @@ public class VocabularyIterator implements Iterator<Picto> {
this.location = 0;
this.category = this.keys.nextElement();
}
picto=pictos.get(category).get(location++);
picto=pictos.get(category).get(location++);
return picto;
}
......@@ -56,4 +57,4 @@ public class VocabularyIterator implements Iterator<Picto> {
public void remove() {
}
}
\ No newline at end of file
}
......@@ -7,6 +7,7 @@ import android.os.AsyncTask;
import android.util.Log;
import com.yottacode.pictogram.R;
import com.yottacode.pictogram.dao.Picto;
import com.yottacode.pictogram.tools.Img;
import java.io.File;
......@@ -51,6 +52,23 @@ public class ImgDownloader extends AsyncTask<Vector<Img>, Void, Img> {
protected void onPreExecute() {
}
private InputStream getStreamImg(Img img) throws IOException {
String surl = context.getResources().getString(R.string.server) + "/" + img.get_url();
URL url = new URL(surl);
URLConnection ucon = url.openConnection();
return ucon.getInputStream();
}
private void downloadSoundImage(Picto picto)throws IOException {
String surl = context.getResources().getString(R.string.server) + "/" + picto.getUriSound();
URL url = new URL(surl);
URLConnection ucon = url.openConnection();
InputStream is = ucon.getInputStream();
picto.save_sound(is);
if (is != null) is.close();
}
protected Img doInBackground( Vector<Img> imgs) {
InputStream is=null;
......@@ -58,21 +76,21 @@ public class ImgDownloader extends AsyncTask<Vector<Img>, Void, Img> {
Log.d(this.getClass().getCanonicalName(), "Required images: " + imgs.size());
this.current= ImgDownloader.status.downloading;
int i=0,j=0,allsize=0;
int i=0,j=0,allsize=0,isound=0;
Long availableMegs = mi.availMem / 1048576L;
int seconds = Calendar.getInstance().get(Calendar.SECOND);
try {
;
for (Img img: imgs) {
if (!img.exists_bitmap(this.context) || this.force_download || this.source==source.local) try {
this.activityManager.getMemoryInfo(mi);
if (this.source==source.remote) {
String surl = context.getResources().getString(R.string.server) + "/" + img.get_url();
URL url = new URL(surl);
URLConnection ucon = url.openConnection();
is = ucon.getInputStream();
}else {
is=getStreamImg(img);
}
else {
File file=new File(img.get_url());
is=new FileInputStream(file);
}
......@@ -86,10 +104,18 @@ public class ImgDownloader extends AsyncTask<Vector<Img>, Void, Img> {
} finally {
if (is != null) is.close();
}
if (img instanceof Picto) {
Picto picto = (Picto) img;
if (picto.getUriSound() != null) {
downloadSoundImage(picto);
isound++;
}
}
}
this.current= status.downloaded_ok;
} catch (IOException e) {
Log.d(this.getClass().getCanonicalName(), "Error: " + e);
Log.e(this.getClass().getCanonicalName(), "Error: " + e);
this.current= status.downloaded_failed;
}
seconds=Calendar.getInstance().get(Calendar.SECOND)-seconds;
......@@ -98,6 +124,7 @@ public class ImgDownloader extends AsyncTask<Vector<Img>, Void, Img> {
". Cached: "+ (imgs.size()-i)+"/"+imgs.size()+
". Download failed: "+ j+"/"+imgs.size()+
". Memory required:"+((mi.availMem / 1048576L)-availableMegs)+" MB"+
". Sounds downloaded:"+isound+
". Used time: "+seconds+" seconds at "+new SimpleDateFormat("HH:mm:ss"));
return imgs.size() > 1 ? null
......
......@@ -33,13 +33,13 @@ import java.util.concurrent.TimeUnit;
public class NetService implements Runnable, RestapiWrapper.iSilentLogin {
static final String LOG_TAG=NetService.class.getCanonicalName();
static final String ping_session="server/ping";
private static final String LOG_TAG=NetService.class.getCanonicalName();
private static final String ping_session="server/ping";
private boolean updated;
private Vector<iNetServiceStatus> listeners;
private final Vector<iNetServiceStatus> listeners;
private static final long restfullSynchroTimming=PCBcontext.getContext().getResources().getInteger(R.integer.netservice_force_restfull_synchro)*1000;
private long lastRestfullSynchro;
private long nextRestfullSynchro;
public NetService(int delay, iNetServiceStatus listener) {
this.updated=RestapiWrapper.ping(PCBcontext.getContext().getResources().getString(R.string.server), ping_session);
......@@ -138,7 +138,7 @@ public class NetService implements Runnable, RestapiWrapper.iSilentLogin {
/**
* ping to the server by using a restapi call. If ok, the call will return the empty set
*/
Context newVersionContext=null;
private Context newVersionContext=null;
@Override
public void run() {
try {
......@@ -154,7 +154,7 @@ public class NetService implements Runnable, RestapiWrapper.iSilentLogin {
@Override
public void result(JSONObject result) {
try {
final float version = Float.valueOf(result.getString("version")).floatValue();
final float version = Float.valueOf(result.getString("version"));
if (PCBcontext.getActivityContext() != null && version > DeviceHelper.getAppVersion() && newVersionContext!=PCBcontext.getActivityContext()) {
newVersionContext=PCBcontext.getActivityContext(); // prevent from showing several times the alert
......@@ -164,7 +164,7 @@ public class NetService implements Runnable, RestapiWrapper.iSilentLogin {
Log.e(LOG_TAG, "PING JSON ERROR: " + result + " " + e.getMessage());
}
if (!updated) {
lastRestfullSynchro = new Date().getTime();
nextRestfullSynchro = new Date().getTime();
updated = true;
if (PCBcontext.is_user_logged()) //si el usuario aun no hizo login, en realidad no es necesario hacer nada
// Comprobar si hay usuario offline, para hacer login transparente
......@@ -183,13 +183,13 @@ public class NetService implements Runnable, RestapiWrapper.iSilentLogin {
//cada restfullSynchroTimming aprox. se fuerza sincronización de vocabulario y configuración de usuario
long now = new Date().getTime();
if (PCBcontext.is_user_logged()) {
if (restfullSynchroTimming > 0 && (now - lastRestfullSynchro > restfullSynchroTimming)) {
if (restfullSynchroTimming > 0 && (now>= nextRestfullSynchro)) {
Log.i(LOG_TAG, "Vocabulary request.");
PCBcontext.getVocabulary().synchronize();
synchronizeStudentAttributes();
lastRestfullSynchro = now;
nextSynchro(now+restfullSynchroTimming);
}
} else lastRestfullSynchro = new Date().getTime();
} else nextSynchro(now+restfullSynchroTimming);
}
}
......@@ -206,6 +206,13 @@ public class NetService implements Runnable, RestapiWrapper.iSilentLogin {
}
}
public void nextSynchro(long next) {
nextRestfullSynchro = next;
}
public long getSynchroTimingLength(){
return restfullSynchroTimming;
}
private void synchronizeStudentAttributes() {
int id=PCBcontext.getPcbdb().getCurrentUser().get_id_stu();
PCBcontext.getRestapiWrapper().ask("stu/" + id, new RestapiWrapper.iRestapiListener() {
......@@ -262,15 +269,11 @@ public class NetService implements Runnable, RestapiWrapper.iSilentLogin {
device=(iNetServiceDevice)listener;
return device;
}
static void newVersionAlert(final float version, final Context context, final float vnew) {
private static void newVersionAlert(final float version, final Context context, final float vnew) {
try {
iVersionManager versionManager = (iVersionManager)Class.forName(context.getResources().getString(R.string.VersionManagerClass)).newInstance();
versionManager.newVersionAlert(version,context,vnew);
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
} catch (InstantiationException | ClassNotFoundException | IllegalAccessException e) {
e.printStackTrace();
}
......@@ -280,15 +283,15 @@ public class NetService implements Runnable, RestapiWrapper.iSilentLogin {
*/
public static interface iNetServiceStatus {
public void notifyStatus(boolean updated);
public interface iNetServiceStatus {
void notifyStatus(boolean updated);
}
public static interface iNetServiceDevice extends iNetServiceStatus {
public void build();
public void closeNotifyStatus();
public void restart_app(boolean direct_login);
public void updateUserConfig(User user);
public interface iNetServiceDevice extends iNetServiceStatus {
void build();
void closeNotifyStatus();
void restart_app(boolean direct_login);
void updateUserConfig(User user);
}
}
......@@ -20,14 +20,13 @@ import java.util.Vector;
public class ActionTalk implements Emitter.Listener {
private static final String URL ="action";
private Room room;
Vector<iActionListener> listeners;
private final Vector<iActionListener> listeners;
private static final String LOG_TAG=ActionTalk.class.getCanonicalName();
public ActionTalk(Room room, iActionListener listener) {
this.room = room;
this.room.listen(URL, this);
room.listen(URL, this);
this.listeners=new Vector<>(2);
listeners.add(listener);
}
......@@ -52,7 +51,6 @@ public class ActionTalk implements Emitter.Listener {
if (action.equals(action_add) || action.equals(action_select) || action.equals(action_show) || action.equals(action_delete)) {
int picto_id;
int picto_cat;
boolean mirroing=PCBcontext.getPcbdb().getCurrentUser().is_mirror_on();
if (action.equals(action_show)) {
picto_id=picto_cat=-1;
} else {
......@@ -61,12 +59,10 @@ public class ActionTalk implements Emitter.Listener {
JSONObject picto_stupicto = stu_picto.optJSONObject(param_picto);
picto_id = picto_stupicto.getInt(param_picto_id);
picto_cat = attrs_stu_picto != null ? attrs_stu_picto.optInt(param_picto_cat, Picto.NO_CATEGORY) : 0;
mirroing|=attrs_stu_picto.has(Picto.JSON_ATTTRS.MIRROR);
}
if ( mirroing) {
Log.i(LOG_TAG, "Received message '" + action +
Log.d(LOG_TAG, "Received message '" + action +
"' for picto " + picto_id + " (cat " + picto_cat);
for (iActionListener listener : this.listeners)
for (iActionListener listener : this.listeners)
listener.action(action.equals(action_add)
? iActionListener.action.add
: action.equals(action_select)
......@@ -74,8 +70,8 @@ public class ActionTalk implements Emitter.Listener {
: action.equals(action_delete)
? iActionListener.action.delete
: iActionListener.action.show
, picto_cat, picto_id);
}
, picto_cat, picto_id,msg);
}
} catch (JSONException e) {
......@@ -95,12 +91,12 @@ public class ActionTalk implements Emitter.Listener {
}
/**
* Vocabulary Listener
* Action Listener
* @author Fernando Martinez Santiago
* @version 1.0
*/
public interface iActionListener {
enum action {add,delete,select,show}
void action(action action, int picto_cat, int picto_id);
void action(action action, int picto_cat, int picto_id,JSONObject msg);
}
}
......@@ -29,9 +29,9 @@ import java.util.Hashtable;
*/
public class Room {
protected SailsSocketsIO socket=null;
protected boolean inRoom=false;
protected Hashtable<String, Emitter.Listener> listeners;
private SailsSocketsIO socket=null;
private boolean inRoom=false;
private final Hashtable<String, Emitter.Listener> listeners;
public Room( ) {
Log.i(this.getClass().getName(), "Entering room");
listeners=new Hashtable<>();
......@@ -100,7 +100,7 @@ public class Room {
}
}
void subscribe() {
private void subscribe() {
try {
SubscribeAction action = new SubscribeAction();
this.emit(action);
......@@ -108,14 +108,14 @@ public class Room {
Log.e(this.getClass().getCanonicalName(), "subscribe room failed:"+e.getMessage());
}
}
void unlisten() {
private void unlisten() {
for (String msg: this.listeners.keySet()) {
Log.i(this.getClass().getName(), "Unlistening to "+msg);
this.socket.unregisterMessage(msg);
}
}
void unsubscribe() {
private void unsubscribe() {
try {
UnsubscribeAction action = new UnsubscribeAction();
......
package com.yottacode.pictogram.net.websockets;
/**
* Created by Fernando on 10/12/2016.
*/
import android.util.Log;
import com.github.nkzawa.emitter.Emitter;
......@@ -21,13 +17,12 @@ import org.json.JSONObject;
public class StudentTalk implements Emitter.Listener {
private static final String URL ="updateStudent";
private Room room;
iStudentListener listeners[];
private final iStudentListener[] listeners;
public StudentTalk(Room room, iStudentListener listeners[]) {
this.room = room;
this.room.listen(URL, this);
room.listen(URL, this);
this.listeners=listeners;
}
......@@ -41,12 +36,13 @@ public class StudentTalk implements Emitter.Listener {
String username=msg.getString("username");
String name=msg.getString("name");
String surname=msg.getString("surname");
int id_active_scene = msg.getInt("id_active_scene");
String gender=msg.getString("gender");
String pic=msg.getString("pic");
String lang=msg.getString("lang");
String attributes=msg.getString("attributes");
User user=PCBcontext.getPcbdb().getCurrentUser();
User updatedUser=new User(id, username, user.get_pwd_stu(), name, surname, pic, gender, lang, attributes,
User updatedUser=new User(id, username, user.get_pwd_stu(), name, surname, id_active_scene, pic, gender, lang, attributes,
user.get_id_sup(), user.get_email_sup(), user.get_pwd_sup(), user.get_name_sup(), user.get_surname_sup(), user.get_url_img_sup(), user.get_gender_sup(),
user.get_lang_sup(), user.get_tts_engine_sup(), user.get_office());
Log.i(this.getClass().getName(), "Attributes" +attributes+" listeners:"+listeners.length);
......@@ -64,7 +60,7 @@ public class StudentTalk implements Emitter.Listener {
* @author Fernando Martinez Santiago
* @version 1.0
*/
public static interface iStudentListener {
public void change(User updatedStudent);
public interface iStudentListener {
void change(User updatedStudent);
}
}
......@@ -4,10 +4,13 @@ import android.util.Log;
import com.github.nkzawa.emitter.Emitter;
import com.yottacode.pictogram.dao.Picto;
import com.yottacode.pictogram.tools.PCBcontext;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.Date;
/**
* Websocket Vocabulary Room based on Room
* @author Fernando Martinez Santiago
......@@ -16,13 +19,11 @@ import org.json.JSONObject;
public class VocabularyTalk implements Emitter.Listener {
private static final String URL ="vocabulary";
private Room room;
private final String LOG_TAG=this.getClass().getName();
iVocabularyListener listeners[];
private final iVocabularyListener[] listeners;
public VocabularyTalk(Room room, iVocabularyListener listeners[]) {
this.room = room;
this.room.listen(URL, this);
room.listen(URL, this);
this.listeners=listeners;
}
......@@ -33,6 +34,7 @@ public class VocabularyTalk implements Emitter.Listener {
final String param_picto="picto";
final String param_stu_picto="stu_picto";
final String param_picto_id="id";
final String param_stupicto_scene="id_scene";
final String param_picto_cat="id_cat";
final String action_update="update";
final String action_update_category="update_category";
......@@ -40,26 +42,26 @@ public class VocabularyTalk implements Emitter.Listener {
final String action_delete="delete";
JSONObject msg = (JSONObject) args[0];
try {
Log.i(LOG_TAG, "raw Received message " +msg.toString());
String action = msg.getString(param_action).toLowerCase();
JSONObject stu_picto= msg.getJSONObject(param_attributes).getJSONObject(param_stu_picto);
int stupicto_id=stu_picto.getInt(param_picto_id);
JSONObject attributes = msg.getJSONObject(param_attributes);
JSONObject attrs_stu_picto = stu_picto.optJSONObject(param_attributes);
JSONObject picto_stupicto = stu_picto.optJSONObject(param_picto);
int picto_id = picto_stupicto.getInt(param_picto_id);
int picto_cat = attrs_stu_picto!=null ? attrs_stu_picto.optInt(param_picto_cat, Picto.NO_CATEGORY) : 0;
Log.i(LOG_TAG, "Received message '" + action +
"' for picto " + picto_id + " (cat " + picto_cat + ", picto: " + picto_stupicto);
for (iVocabularyListener listener: this.listeners)
listener.change(action.equals(action_update) ? iVocabularyListener.action.update
: action.equals(action_update_category) ? iVocabularyListener.action.update_category
: action.equals(action_add) ? iVocabularyListener.action.add
: iVocabularyListener.action.delete
, picto_cat, picto_id, stu_picto);
if(PCBcontext.getPcbdb().getCurrentUser().get_active_scene() == attributes.getInt(param_stupicto_scene)) {
PCBcontext.getNetService().nextSynchro(new Date().getTime() + PCBcontext.getNetService().getSynchroTimingLength() * 2); //nos saltamos una sincronización para evitar que llegue antes que los websockets
for (iVocabularyListener listener : this.listeners)
listener.change(action.equals(action_update) ? iVocabularyListener.action.update
: action.equals(action_update_category) ? iVocabularyListener.action.update_category
: action.equals(action_add) ? iVocabularyListener.action.add
: iVocabularyListener.action.delete
, picto_cat, picto_id, stu_picto);
}
} catch (JSONException e) {
Log.e(LOG_TAG, e.getClass().getCanonicalName() + "--" + e);
}
......@@ -71,8 +73,8 @@ public class VocabularyTalk implements Emitter.Listener {
* @author Fernando Martinez Santiago
* @version 1.0
*/
public static interface iVocabularyListener {
public enum action {delete,add, update_category, update}
public void change(action action, int picto_cat, int picto_id, JSONObject args);
public interface iVocabularyListener {
enum action {delete,add, update_category, update}
void change(action action, int picto_cat, int picto_id, JSONObject args);
}
}
......@@ -65,7 +65,6 @@ public final class PCBcontext {
throw new java.lang.AssertionError("init must be called once previously ");
}
Log.i(PCBcontext.class.getCanonicalName(), "User set at student " + student.get_name_stu()+ (student.is_supervisor() ? " with supervisor "+student.get_name_sup():"."));
wrapper.setToken(token);
pcbdb = new PCBDBHelper(null, 2, student);
pcbdb.user_online(token!=null);
......@@ -73,16 +72,22 @@ public final class PCBcontext {
actionLog = new ActionLog();
vocabulary = new Vocabulary(listener);
getNetService().notifyStatus();
studentTalk=new StudentTalk(room, new StudentTalk.iStudentListener[] {new StudentTalk.iStudentListener() {
@Override
public void change(User updatedStudent) {
PCBcontext.getDevice().insertUser(updatedStudent);
if (updatedStudent.is_picto_size_big()!=getPcbdb().getCurrentUser().is_picto_size_big() || updatedStudent.has_categories()!=getPcbdb().getCurrentUser().has_categories())
PCBcontext.getNetService().restart_app(true);
else {
PCBcontext.getPcbdb().setCurrentUser(updatedStudent);
PCBcontext.getNetService().getNetServiceDevice().updateUserConfig(updatedStudent);
}
PCBcontext.getDevice().insertUser(updatedStudent);
if (updatedStudent.is_picto_size_big()!=getPcbdb().getCurrentUser().is_picto_size_big() || PCBcontext.getVocabulary().has_categories() != vocabulary.has_categories()
|| updatedStudent.get_active_scene() != PCBcontext.getPcbdb().getCurrentUser().get_active_scene()){
PCBcontext.getNetService().restart_app(false);
}else {
PCBcontext.getPcbdb().setCurrentUser(updatedStudent);
PCBcontext.getNetService().getNetServiceDevice().updateUserConfig(updatedStudent);
}
}
}});
......@@ -90,14 +95,18 @@ public final class PCBcontext {
}
public static void unset_user() {
Log.i(PCBcontext.class.getCanonicalName(), "User unset. Student " + getPcbdb().getCurrentUser().get_name_stu());
Log.e(PCBcontext.class.getCanonicalName(), "User unset. Student " + getPcbdb().getCurrentUser().get_name_stu());
if (room!=null) room.exit();
pcbdb = null;
room = null;
vocabulary = null;
getNetService().notifyStatus();
}
@Override
protected void finalize() {
Log.e("PCBcontext", "FINALIZE Pictogram Activity");
}
/**
*
* @return true if a given user has been logged into the system (the login window was successfully filled)
......
......@@ -2,6 +2,7 @@ package com.yottacode.pictogram.tts;
import android.annotation.TargetApi;
import android.content.Context;
import android.media.SoundPool;
import android.os.Build;
import android.os.Bundle;
import android.speech.tts.TextToSpeech;
......@@ -10,6 +11,10 @@ import android.speech.tts.Voice;
import android.util.Log;
import android.widget.ArrayAdapter;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
......@@ -22,13 +27,15 @@ import java.util.Set;
*/
public class TTSHelper {
private static final String LOG_TAG = TTSHelper.class.getName();
TextToSpeech ttobj=null;
Voice voice;
SoundPool sp=null;
Hashtable<String, Integer> recorded_sounds=null;
boolean voice_ok;
public void createTTS(final Context context, String engine, final Locale locale, final String voice) {
public void createTTS(final Context context, String engine, final Locale locale, final String voice) {
if (this.ttobj==null) {
if (this.ttobj == null) {
this.ttobj = new TextToSpeech(context, new TextToSpeech.OnInitListener() {
public void onInit(int status) {
Log.e(this.getClass().getCanonicalName(), "TTS engine " + status);
......@@ -40,8 +47,11 @@ public class TTSHelper {
}
}, engine);
}
}
if (sp == null) {
sp = new SoundPool.Builder().build();
recorded_sounds = new Hashtable<>(3);
}
}
public TTSHelper(Context context, String engine, Locale locale,String voice) {
createTTS(context ,engine,locale,voice);
}
......@@ -142,4 +152,35 @@ public class TTSHelper {
params.putString(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, "TAPE_READ");
ttobj.speak(input, TextToSpeech.QUEUE_FLUSH, params, "TAPE_READ");
}
private void addRecord(final File mp3) {
try {
final FileInputStream fis = new FileInputStream(mp3);
sp.setOnLoadCompleteListener(new SoundPool.OnLoadCompleteListener() {
@Override
public void onLoadComplete(SoundPool sp, int sampleId, int status) {
TTSHelper.this.recorded_sounds.put(mp3.getAbsolutePath(),new Integer(sampleId));
playRecord(mp3);
try {
fis.close();
} catch (IOException e) {
Log.e(LOG_TAG,"Error playing audio "+mp3.getAbsolutePath());
}
}
});
sp.load(fis.getFD(),0,mp3.length(),1);
} catch (Exception e) {
Log.e(LOG_TAG,"READING MP3 ERROR "+e.getMessage());
e.printStackTrace();
}
}
public void playRecord(final File mp3) {
Integer mp3id=this.recorded_sounds.get(mp3.getAbsolutePath());
if (mp3id==null)
addRecord(mp3);
else
sp.play(mp3id.intValue(), 1, 1, 1, 0, 1);
}
}
package com.yottacode.tools;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.BlurMaskFilter;
import android.graphics.Canvas;
import android.graphics.Color;
......@@ -8,12 +9,22 @@ import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.drawable.BitmapDrawable;
import android.os.Environment;
import android.util.Log;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
/**
* Created by Fernando on 15/03/2016.
*/
public class BitmapTools {
Bitmap bitmap;
private static String LOG_TAG=BitmapTools.class.getName();
Bitmap bitmap;
public BitmapTools(Bitmap bitmap) { this.bitmap=bitmap;}
public Bitmap get() {return this.bitmap;}
......@@ -167,4 +178,36 @@ public class BitmapTools {
canvas.drawBitmap(new BitmapTools(drawable.getBitmap()).resize(w,h).get(),
(int)((this.bitmap.getWidth()-w)/2),(int)((this.bitmap.getHeight()-h)/2),null);
}
public static void save_temporal(Bitmap bitmap) {
File f3=new File(Environment.getExternalStorageDirectory()+"/inpaint/");
if(!f3.exists())
f3.mkdirs();
OutputStream outStream = null;
File file = new File(Environment.getExternalStorageDirectory() + "/inpaint/"+"seconds"+".png");
try {
outStream = new FileOutputStream(file);
bitmap.compress(Bitmap.CompressFormat.PNG, 100, outStream);
outStream.close();
} catch (Exception e) {
e.printStackTrace();
}
}
public static Bitmap load_temporal() {
InputStream inStream;
inStream = null;
File file = new File(Environment.getExternalStorageDirectory() + "/inpaint/"+"seconds"+".png");
try {
inStream = new FileInputStream(file);
} catch (FileNotFoundException e) {
e.printStackTrace();
Log.e(BitmapTools.LOG_TAG,e.getMessage());
}
Bitmap originalBitmap = BitmapFactory.decodeStream(inStream);
file.delete();
return originalBitmap ;
}
}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="es">
<head>
<!-- Generated by javadoc (version 1.7.0_71) on Sat Mar 21 11:03:45 CET 2015 -->
<title>Index</title>
<meta name="date" content="2015-03-21">
<link rel="stylesheet" type="text/css" href="./stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Index";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="./com/yottacode/pictogram/tts/package-summary.html">Package</a></li>
<li>Class</li>
<li><a href="./overview-tree.html">Tree</a></li>
<li><a href="./deprecated-list.html">Deprecated</a></li>
<li class="navBarCell1Rev">Index</li>
<li><a href="./help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="./index.html?index-all.html" target="_top">Frames</a></li>
<li><a href="index-all.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="./allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="contentContainer"><a href="#_C_">C</a>&nbsp;<a href="#_D_">D</a>&nbsp;<a href="#_E_">E</a>&nbsp;<a href="#_I_">I</a>&nbsp;<a href="#_S_">S</a>&nbsp;<a href="#_T_">T</a>&nbsp;<a href="#_V_">V</a>&nbsp;<a name="_C_">
<!-- -->
</a>
<h2 class="title">C</h2>
<dl>
<dt><a href="./com/yottacode/pictogram/tts/package-summary.html">com.yottacode.pictogram.tts</a> - package com.yottacode.pictogram.tts</dt>
<dd>&nbsp;</dd>
<dt><span class="strong"><a href="./com/yottacode/pictogram/tts/TTSHelper.html#createTTS(android.content.Context,%20java.lang.String)">createTTS(Context, String)</a></span> - Method in class com.yottacode.pictogram.tts.<a href="./com/yottacode/pictogram/tts/TTSHelper.html" title="class in com.yottacode.pictogram.tts">TTSHelper</a></dt>
<dd>&nbsp;</dd>
</dl>
<a name="_D_">
<!-- -->
</a>
<h2 class="title">D</h2>
<dl>
<dt><span class="strong"><a href="./com/yottacode/pictogram/tts/TTSHelper.html#destroy()">destroy()</a></span> - Method in class com.yottacode.pictogram.tts.<a href="./com/yottacode/pictogram/tts/TTSHelper.html" title="class in com.yottacode.pictogram.tts">TTSHelper</a></dt>
<dd>&nbsp;</dd>
</dl>
<a name="_E_">
<!-- -->
</a>
<h2 class="title">E</h2>
<dl>
<dt><span class="strong"><a href="./com/yottacode/pictogram/tts/TTSHelper.html#engine_ok">engine_ok</a></span> - Variable in class com.yottacode.pictogram.tts.<a href="./com/yottacode/pictogram/tts/TTSHelper.html" title="class in com.yottacode.pictogram.tts">TTSHelper</a></dt>
<dd>&nbsp;</dd>
</dl>
<a name="_I_">
<!-- -->
</a>
<h2 class="title">I</h2>
<dl>
<dt><span class="strong"><a href="./com/yottacode/pictogram/tts/TTSHelper.html#isEngine_ok()">isEngine_ok()</a></span> - Method in class com.yottacode.pictogram.tts.<a href="./com/yottacode/pictogram/tts/TTSHelper.html" title="class in com.yottacode.pictogram.tts">TTSHelper</a></dt>
<dd>&nbsp;</dd>
<dt><span class="strong"><a href="./com/yottacode/pictogram/tts/TTSHelper.html#isVoice_ok()">isVoice_ok()</a></span> - Method in class com.yottacode.pictogram.tts.<a href="./com/yottacode/pictogram/tts/TTSHelper.html" title="class in com.yottacode.pictogram.tts">TTSHelper</a></dt>
<dd>&nbsp;</dd>
</dl>
<a name="_S_">
<!-- -->
</a>
<h2 class="title">S</h2>
<dl>
<dt><span class="strong"><a href="./com/yottacode/pictogram/tts/TTSHelper.html#setVoice(android.content.Context,%20java.lang.String)">setVoice(Context, String)</a></span> - Method in class com.yottacode.pictogram.tts.<a href="./com/yottacode/pictogram/tts/TTSHelper.html" title="class in com.yottacode.pictogram.tts">TTSHelper</a></dt>
<dd>&nbsp;</dd>
<dt><span class="strong"><a href="./com/yottacode/pictogram/tts/TTSHelper.html#show(android.widget.ArrayAdapter)">show(ArrayAdapter)</a></span> - Method in class com.yottacode.pictogram.tts.<a href="./com/yottacode/pictogram/tts/TTSHelper.html" title="class in com.yottacode.pictogram.tts">TTSHelper</a></dt>
<dd>&nbsp;</dd>
<dt><span class="strong"><a href="./com/yottacode/pictogram/tts/TTSHelper.html#speakText(java.lang.String)">speakText(String)</a></span> - Method in class com.yottacode.pictogram.tts.<a href="./com/yottacode/pictogram/tts/TTSHelper.html" title="class in com.yottacode.pictogram.tts">TTSHelper</a></dt>
<dd>&nbsp;</dd>
</dl>
<a name="_T_">
<!-- -->
</a>
<h2 class="title">T</h2>
<dl>
<dt><a href="./com/yottacode/pictogram/tts/TTSHelper.html" title="class in com.yottacode.pictogram.tts"><span class="strong">TTSHelper</span></a> - Class in <a href="./com/yottacode/pictogram/tts/package-summary.html">com.yottacode.pictogram.tts</a></dt>
<dd>
<div class="block">PCB TTS service</div>
</dd>
<dt><span class="strong"><a href="./com/yottacode/pictogram/tts/TTSHelper.html#TTSHelper(android.content.Context)">TTSHelper(Context)</a></span> - Constructor for class com.yottacode.pictogram.tts.<a href="./com/yottacode/pictogram/tts/TTSHelper.html" title="class in com.yottacode.pictogram.tts">TTSHelper</a></dt>
<dd>&nbsp;</dd>
<dt><span class="strong"><a href="./com/yottacode/pictogram/tts/TTSHelper.html#TTSHelper(android.content.Context,%20java.lang.String)">TTSHelper(Context, String)</a></span> - Constructor for class com.yottacode.pictogram.tts.<a href="./com/yottacode/pictogram/tts/TTSHelper.html" title="class in com.yottacode.pictogram.tts">TTSHelper</a></dt>
<dd>&nbsp;</dd>
</dl>
<a name="_V_">
<!-- -->
</a>
<h2 class="title">V</h2>
<dl>
<dt><span class="strong"><a href="./com/yottacode/pictogram/tts/TTSHelper.html#voice_ok">voice_ok</a></span> - Variable in class com.yottacode.pictogram.tts.<a href="./com/yottacode/pictogram/tts/TTSHelper.html" title="class in com.yottacode.pictogram.tts">TTSHelper</a></dt>
<dd>&nbsp;</dd>
</dl>
<a href="#_C_">C</a>&nbsp;<a href="#_D_">D</a>&nbsp;<a href="#_E_">E</a>&nbsp;<a href="#_I_">I</a>&nbsp;<a href="#_S_">S</a>&nbsp;<a href="#_T_">T</a>&nbsp;<a href="#_V_">V</a>&nbsp;</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="./com/yottacode/pictogram/tts/package-summary.html">Package</a></li>
<li>Class</li>
<li><a href="./overview-tree.html">Tree</a></li>
<li><a href="./deprecated-list.html">Deprecated</a></li>
<li class="navBarCell1Rev">Index</li>
<li><a href="./help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="./index.html?index-all.html" target="_top">Frames</a></li>
<li><a href="index-all.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="./allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
......@@ -5,7 +5,7 @@ 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,
key TEXT(12) CHECK (key in ('db_version', 'last__sup_id', 'last__stu_id', 'keyword')) UNIQUE,
value TEXT(40) NOT NULL
)
;--
......@@ -32,7 +32,8 @@ nickname TEXT(40) NOT NULL,
pwd TEXT(40) NULL,
name TEXT(40) NOT NULL,
surname TEXT(60) NOT NULL,
url_img VARCHAR(250) NOT NULL,
id_scene INTEGER NOT NULL REFERENCES scene,
url_img VARCHAR(250) NOT NULL,
gender TEXT(1) NOT NULL CHECK (gender IN ('M','F')),
lang TEXT(5) NOT NULL CHECK (lang in ('en-gb','en-us','es-es')),
attributes TEXT(1024) NULL
......@@ -68,14 +69,29 @@ constraint ck_users UNIQUE(id_stu,id_sup)
)
;--
DROP TABLE IF EXISTS scene
;--
CREATE TABLE scene (
id INTEGER PRIMARY KEY,
id_sup INTEGER NOT NULL REFERENCES supervisor,
id_stu INTEGER NOT NULL REFERENCES student,
name TEXT(100) NOT NULL,
active BOOLEAN NOT NULL,
categories BOOLEAN NOT NULL
)
;--
DROP TABLE IF EXISTS collection
;--
CREATE TABLE collection (
id_stu INTEGER NOT NULL REFERENCES student ON DELETE CASCADE,
id_picto INTEGER NOT NULL REFERENCES picto ON DELETE CASCADE,
id_scene INTEGER NOT NULL REFERENCES scene ON DELETE CASCADE,
id_stupicto INTEGER NOT NULL,
attributes VARCHAR(1024),
constraint ck_collection UNIQUE(id_stu,id_picto,attributes)
constraint ck_collection UNIQUE(id_stu,id_picto,id_scene)
)
;--
......@@ -119,6 +135,7 @@ CREATE VIEW users_detail AS
a.pwd pwd_stu,
a.name name_stu,
a.surname surname_stu,
a.id_scene id_scene_stu,
a.url_img url_img_stu,
a.gender gender_stu,
a.lang lang_stu,
......@@ -143,7 +160,7 @@ DROP VIEW IF EXISTS collection_detail
;--
CREATE VIEW collection_detail AS
SELECT id_stu, id_picto, b.url, translation,attributes
SELECT id_stu, id_picto, id_scene, id_stupicto, b.url, translation, attributes
FROM collection a, picto b
WHERE a.id_picto=b.id
;--
......@@ -266,7 +283,7 @@ INSTEAD OF INSERT ON users_detail
FOR EACH ROW
WHEN NEW.pwd_stu IS NOT NULL
BEGIN
INSERT OR REPLACE INTO student VALUES (NEW.id_stu, NEW.nickname_stu, NEW.pwd_stu, NEW.name_stu, NEW.surname_stu, NEW.url_img_stu, NEW.gender_stu, NEW.lang_stu, NEW.attributes_stu);
INSERT OR REPLACE INTO student VALUES (NEW.id_stu, NEW.nickname_stu, NEW.pwd_stu, NEW.name_stu, NEW.surname_stu, NEW.id_scene_stu, NEW.url_img_stu, NEW.gender_stu, NEW.lang_stu, NEW.attributes_stu);
INSERT OR REPLACE INTO supervisor VALUES (NEW.id_sup, NEW.email_sup, NEW.pwd_sup, NEW.name_sup, NEW.surname_sup, NEW.url_img_sup, NEW.gender_sup, NEW.lang_sup, NEW.tts_engine_sup, NEW.office_sup);
INSERT OR REPLACE INTO users VALUES (NEW.id_stu,NEW.id_sup);
END
......@@ -281,8 +298,8 @@ INSTEAD OF INSERT ON users_detail
FOR EACH ROW
WHEN NEW.pwd_stu IS NULL
BEGIN
INSERT OR REPLACE INTO student(id,nickname, pwd, name, surname, url_img, gender, lang, attributes)
VALUES (NEW.id_stu, NEW.nickname_stu, (SELECT pwd FROM student WHERE id=NEW.id_stu), NEW.name_stu, NEW.surname_stu, NEW.url_img_stu, NEW.gender_stu, NEW.lang_stu, NEW.attributes_stu);
INSERT OR REPLACE INTO student(id,nickname, pwd, name, surname, id_scene, url_img, gender, lang, attributes)
VALUES (NEW.id_stu, NEW.nickname_stu, (SELECT pwd FROM student WHERE id=NEW.id_stu), NEW.name_stu, NEW.surname_stu,NEW.id_scene_stu, NEW.url_img_stu, NEW.gender_stu, NEW.lang_stu, NEW.attributes_stu);
INSERT OR REPLACE INTO supervisor VALUES (NEW.id_sup, NEW.email_sup, NEW.pwd_sup, NEW.name_sup, NEW.surname_sup, NEW.url_img_sup, NEW.gender_sup, NEW.lang_sup, NEW.tts_engine_sup, NEW.office_sup);
INSERT OR REPLACE INTO users VALUES (NEW.id_stu,NEW.id_sup);
END
......@@ -344,6 +361,6 @@ INSTEAD OF INSERT ON collection_detail
FOR EACH ROW
BEGIN
INSERT OR REPLACE INTO picto VALUES (NEW.id_picto,NEW.url, NEW.translation);
INSERT INTO collection VALUES (NEW.id_stu,NEW.id_picto,NEW.attributes);
INSERT INTO collection VALUES (NEW.id_stu,NEW.id_picto,NEW.id_scene,NEW.id_stupicto,NEW.attributes);
END
;--
......@@ -21,6 +21,7 @@ android {
resValue "bool","NotifyAllwaysVisible","false"
resValue "string", "VersionManagerClass", "com.yottacode.pictogram.supervisor_tablet.net.VersionManager"
resValue "string","apk","pictograms.apk"
resValue "string","google_play_apk","https://play.google.com/store/apps/details?id=com.yottacode.supervisor_tablet"
// signingConfig signingConfigs.config
}
productFlavors {
......
......@@ -62,4 +62,7 @@
android:launchMode="singleTop"
android:screenOrientation="landscape" />
</application>
</manifest>
......@@ -26,8 +26,7 @@ public class VersionManager implements iVersionManager {
public void newVersionAlert(final float version, final Context context, final float vnew) {
final SpannableString s = new SpannableString(context.getResources().getString(R.string.server)
+ "/" + context.getResources().getString(com.yottacode.pictogram.R.string.apk));
final SpannableString s = new SpannableString(context.getResources().getString(R.string.google_play_apk));
final TextView tx1 = new TextView(context);
tx1.setText("\t"+context.getResources().getString(R.string.new_version_detail) +
......
......@@ -8,7 +8,7 @@ android {
targetSdkVersion 22
versionCode 1
versionName "1.0"
resValue "bool","NotifyAllwaysVisible","false"
resValue "bool", "NotifyAllwaysVisible", "false"
resValue "integer", "rows", "5"
resValue "integer", "columns", "10"
resValue "integer", "rows_big", "4"
......
package com.yottacode.pictogram.tabletlibrary.gui.communicator;
import android.net.Uri;
import android.os.Bundle;
import android.app.Fragment;
import android.provider.ContactsContract;
import android.support.annotation.NonNull;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import com.yottacode.pictogram.tabletlibrary.R;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
public class Message_Fragment extends Fragment {
LinearLayout layout = null;
ArrayList<ImageView> pictos = null;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.fragment_message, null);
Button button = (Button) v.findViewById(R.id.aceptar);
button.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v)
{
Log.i("TAG_PRUEBAS","Hace click");
// do something
getActivity().getFragmentManager().beginTransaction().remove(Message_Fragment.this).commit();
}
});
/*layout = (LinearLayout) v.findViewById(R.id.layoutImages);
pictos = new ArrayList<>();
for(int i = 0;i<layout.getChildCount();i++){
pictos.add((ImageView) layout.getChildAt(i));
}*/
// Inflate the layout for this fragment
return v;
}
public void cargar_pictos(JSONArray arrayPictos){
for(int i = 0; i < arrayPictos.length(); i++) {
//ImageView imagen = (ImageView) layout.getChildAt(i);
JSONObject picto = null;
try {
picto = arrayPictos.getJSONObject(i).getJSONObject("attributes");
Log.i("TAG_PRUEBAS", "picto :" + i);
//pictos.get(i).setImageResource(R.drawable.anonymous_student);
//pictos.get(i).setImageURI(Uri.parse(picto.getString("uri")));
Log.i("TAG_PRUEBAS", "picto received:" + picto.getString("expression").toString());
} catch (JSONException e) {
e.printStackTrace();
}
}
}
}
......@@ -16,7 +16,9 @@ import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.Toast;
import com.yottacode.pictogram.dao.Device;
import com.yottacode.pictogram.dao.User;
import com.yottacode.pictogram.dao.UserLogin;
import com.yottacode.pictogram.tabletlibrary.R;
......@@ -34,7 +36,7 @@ import java.util.Vector;
*/
public class SerialActivity extends Activity {
public static final String PREFS_NAME = "MyPrefsFile";
// String constant for logs
private final String LOG_TAG = this.getClass().getSimpleName(); // Or .getCanonicalName()
......@@ -55,7 +57,7 @@ public class SerialActivity extends Activity {
String password = intent.getStringExtra("switch_pwd");
if (username==null || password==null) {
SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);
SharedPreferences settings = getSharedPreferences(Device.PREFS_NAME, 0);
username = settings.getString("username", "");
password = settings.getString("password", "");
}
......@@ -83,13 +85,22 @@ public class SerialActivity extends Activity {
listaSup.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);
SharedPreferences.Editor editor = settings.edit();
editor.putString("username", supUsers.elementAt(position).get_email_sup());
editor.putString("password", supUsers.elementAt(position).get_pwd_sup());
editor.commit();
new UserLogin().login(supUsers.elementAt(position).get_email_sup(),
supUsers.elementAt(position).get_pwd_sup(),SerialActivity.this, PictogramActivity.class, LoginActivity.class);
if (supUsers.elementAt(position).get_pwd_sup().equals("_")) {
mSerialViewMail.setText(supUsers.elementAt(position).get_email_sup());
mSerialViewPass.setText("");
mSerialViewPass.requestFocus();
Toast toast = Toast.makeText(PCBcontext.getContext(), R.string.insertPasswordLogin, Toast.LENGTH_SHORT);
toast.show();
} else {
SharedPreferences settings = getSharedPreferences(Device.PREFS_NAME, 0);
SharedPreferences.Editor editor = settings.edit();
editor.putString("username", supUsers.elementAt(position).get_email_sup());
editor.putString("password", supUsers.elementAt(position).get_pwd_sup());
editor.commit();
new UserLogin().login(supUsers.elementAt(position).get_email_sup(),
supUsers.elementAt(position).get_pwd_sup(), SerialActivity.this, PictogramActivity.class, LoginActivity.class);
}
}
});
}
......@@ -116,7 +127,7 @@ public class SerialActivity extends Activity {
listaStu.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);
SharedPreferences settings = getSharedPreferences(Device.PREFS_NAME, 0);
SharedPreferences.Editor editor = settings.edit();
editor.putString("username", stuUsers.elementAt(position).get_nickname_stu());
editor.putString("password", stuUsers.elementAt(position).get_pwd_stu());
......@@ -155,7 +166,7 @@ public class SerialActivity extends Activity {
String username = mSerialViewMail.getText().toString();
String password = mSerialViewPass.getText().toString();
SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);
SharedPreferences settings = getSharedPreferences(Device.PREFS_NAME, 0);
SharedPreferences.Editor editor = settings.edit();
editor.putString("username", username);
editor.putString("password", password);
......
......@@ -6,8 +6,11 @@ import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.Window;
import android.widget.TextView;
import com.yottacode.pictogram.dao.DeviceHelper;
import com.yottacode.pictogram.tabletlibrary.R;
import com.yottacode.pictogram.tools.PCBcontext;
import java.util.Timer;
import java.util.TimerTask;
......@@ -30,6 +33,9 @@ public class SplashScreenActivity extends Activity {
setContentView(R.layout.activity_splash_screen);
TextView version = (TextView) findViewById(R.id.labelVersion);
version.setText(getResources().getString(R.string.version_label)+" "+DeviceHelper.getAppVersion());
TimerTask task = new TimerTask() {
@Override
public void run() {
......
......@@ -18,7 +18,6 @@ import com.yottacode.pictogram.dao.User;
import com.yottacode.pictogram.net.ImgDownloader;
import com.yottacode.pictogram.tabletlibrary.R;
import com.yottacode.pictogram.tabletlibrary.gui.communicator.PictogramActivity;
import com.yottacode.pictogram.tabletlibrary.gui.communicator.cropper.EditPictoActivity;
import com.yottacode.pictogram.tools.Img;
import com.yottacode.pictogram.tools.PCBcontext;
import com.yottacode.tools.GUITools;
......@@ -28,8 +27,7 @@ import org.json.JSONException;
import org.json.JSONObject;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Hashtable;
import java.util.Vector;
/**
......@@ -42,8 +40,9 @@ public class StudentFragmentGrid extends Fragment{
final String TAG_ID = "id";
final String TAG_USERNAME = "username";
final String TAG_NAME = "name";
final String TAG_NAME = "name";
final String TAG_SURNAME = "surname";
final String TAG_ID_SCENE = "id_active_scene";
final String TAG_GENDER = "gender";
final String TAG_PIC = "pic";
final String TAG_LANG = "lang";
......@@ -91,14 +90,18 @@ public class StudentFragmentGrid extends Fragment{
private void new_user(int i) {
JSONObject st = this.downloaded_students.get(i);
Intent intent = getActivity().getIntent();
try {
Log.i(LOG_TAG,st.toString());
PCBcontext.getPcbdb();
User new_user = new User(
st.getInt(TAG_ID),
st.getString(TAG_USERNAME),
st.getString(TAG_USERNAME),
null,
st.getString(TAG_NAME),
st.getString(TAG_SURNAME),
st.getInt(TAG_ID_SCENE),
st.getString(TAG_PIC),
st.getString(TAG_GENDER),
st.getString(TAG_LANG),
......@@ -203,7 +206,12 @@ public class StudentFragmentGrid extends Fragment{
downloader.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, imgs);
}
private void download_supervisors(int stu_id) {
/**
* Recupera los supervisores de un alumno
* @author Germán Callejas
* @param stu_id
*/
private void download_supervisors(final int stu_id) {
String token = getActivity().getIntent().getExtras().getString("token");
RestapiWrapper wrapper = PCBcontext.getRestapiWrapper();
......@@ -225,17 +233,41 @@ public class StudentFragmentGrid extends Fragment{
}
@Override
public void result(JSONArray supervisors) {
String supervisorsFormat = "";
Vector<String> idSupervisoresJSON = new Vector<>();
for (int i=0;i<supervisors.length();i++) {
JSONObject supervisor;
JSONObject supervisor = null;
try {
supervisor = supervisors.getJSONObject(i);
supervisorsFormat += supervisor.get("name") +" " + supervisor.get("surname") + "," + supervisor.get("email") + ";";
idSupervisoresJSON.add(supervisor.getString("email"));
if(!PCBcontext.getDevice().isSupervisorOnLocal((int) supervisor.get("id"),stu_id)) {//Para comprobar si ya existe en local
User currentUser = PCBcontext.getPcbdb().getCurrentUser();
PCBcontext.getDevice().insertUser(new User(stu_id, currentUser.get_nickname_stu(), currentUser.get_pwd_stu()
, currentUser.get_name_stu(),currentUser.get_surname_stu(),currentUser.get_active_scene(), currentUser.get_url_img_stu()
, currentUser.get_gender_stu(), currentUser.get_lang_stu(), currentUser.get_json_attrs(),
(int) supervisor.get("id"), supervisor.get("email").toString(), "_", supervisor.get("name").toString(), supervisor.get("surname").toString(), supervisor.get("pic").toString(),
supervisor.get("gender").toString(), supervisor.get("lang").toString(), supervisor.get("ttsEngine").toString(), supervisor.get("office").toString()));
}
} catch (JSONException e) {
e.printStackTrace();
}
}
PCBcontext.getPcbdb().getCurrentUser().set_Supervisors(supervisorsFormat);
/**Eliminar los que habia y que ya no vienen en el JSON */
try {
Hashtable<String,String> supervisorsLocal = PCBcontext.getDevice().recoverSupervisors(stu_id);
if(supervisorsLocal != null && !supervisorsLocal.isEmpty()){
for(String email_sup: supervisorsLocal.keySet()){
if(!idSupervisoresJSON.contains(email_sup)){
//Coge la segunda parte ya que el formato del dato es Nombre, Apellidos;id_sup
PCBcontext.getDevice().deleteSupervisor(stu_id,Integer.parseInt(supervisorsLocal.get(email_sup).split(";")[1]));
}
}
}
} catch (JSONException e) {
e.printStackTrace();
}
}
@Override
......@@ -287,7 +319,7 @@ public class StudentFragmentGrid extends Fragment{
GUITools.show_alert(getActivity(), R.string.loginErrorTxt,getString(R.string.noStudentsError), new GUITools.iOKListener() {
@Override
public void ok() {
PCBcontext.getNetService().restart_app(false);
PCBcontext.getNetService().restart_app(true);
}
});
......
......@@ -45,7 +45,7 @@ public class SessionActivity extends FragmentActivity implements ListInstruction
float firstTouchX=-1;
ListInstructionsFragment listInstructionsFragment= new ListInstructionsFragment();
boolean previous_mirrormode=PCBcontext.getPcbdb().getCurrentUser().is_mirror_on();
private void addLogMsg(final String msg) {
......@@ -71,39 +71,42 @@ public class SessionActivity extends FragmentActivity implements ListInstruction
}
private void evaluateMsg(final int msg_pos, final String evaluation_value, final int evaluation_translation, final int evaluation_bitmap) {
final SessionFragment sessionFragment = (SessionFragment) getSupportFragmentManager().findFragmentByTag(SessionActivity.FRAGMENT_SESSION);
final int currentMsgId=SessionActivity.this.msgs.get(msg_pos);
SessionWrapper.evaluateTry(currentMsgId, msg_pos==this.msgs.size()-1, evaluation_value, new SessionWrapper.iTryUpdated() {
@Override
public void update(int next_try_id) {
Bitmap bitmap = BitmapFactory.decodeResource(getResources(),evaluation_bitmap);
sessionFragment.evaluateMsg(bitmap,getString(evaluation_translation),msg_pos);
addLogMsg("#"+(msg_pos<9 ? "0" : "")+(msg_pos+1)+sessionFragment.get_msg_text(msg_pos));
if (!msgs.containsValue(next_try_id))
new_try(sessionFragment, next_try_id);
if (evaluation_value!=null && msg_pos==msgs.size()-1){
SessionWrapper.newTry(id_session, new SessionWrapper.iTryUpdated() {
@Override
public void update(int id) {
int pos_newmsg = sessionFragment.newMsg();
msgs.put(pos_newmsg, id);
addLogMsg(getString(R.string.session_log_newtry));
}
@Override
public void error(String error) {
addLogMsg(getString(R.string.session_error));
}
});
if (sessionFragment.get_current_msg_text().trim().length()>0) //no se permiten trys vacios
SessionWrapper.evaluateTry(currentMsgId, msg_pos==this.msgs.size()-1, evaluation_value, new SessionWrapper.iTryUpdated() {
@Override
public void update(int next_try_id) {
addLogMsg("añadiendo "+ sessionFragment.get_current_msg_text()+".");
Bitmap bitmap = BitmapFactory.decodeResource(getResources(),evaluation_bitmap);
sessionFragment.evaluateMsg(bitmap,getString(evaluation_translation),msg_pos);
addLogMsg("#"+(msg_pos<9 ? "0" : "")+(msg_pos+1)+sessionFragment.get_msg_text(msg_pos));
if (!msgs.containsValue(next_try_id))
new_try(sessionFragment, next_try_id);
if (evaluation_value!=null && msg_pos==msgs.size()-1){
SessionWrapper.newTry(id_session, new SessionWrapper.iTryUpdated() {
@Override
public void update(int id) {
int pos_newmsg = sessionFragment.newMsg();
msgs.put(pos_newmsg, id);
addLogMsg(getString(R.string.session_log_newtry));
}
@Override
public void error(String error) {
addLogMsg(getString(R.string.session_error));
}
});
}
}
}
@Override
public void error(String error) {
addLogMsg(getString(R.string.session_error)+":"+error);
Log.e(LOG_TAG,"server error:"+error+" when updating try "+currentMsgId+" to "+evaluation_value);
}
});
@Override
public void error(String error) {
addLogMsg(getString(R.string.session_error)+":"+error);
Log.e(LOG_TAG,"server error:"+error+" when updating try "+currentMsgId+" to "+evaluation_value);
}
});
......@@ -298,9 +301,7 @@ public class SessionActivity extends FragmentActivity implements ListInstruction
final Button failBtn =((Button)findViewById(R.id.btn_fail));
final Button supBtn =((Button)findViewById(R.id.btn_supervised));
final Button modBtn =((Button)findViewById(R.id.btn_model));
previous_mirrormode=PCBcontext.getPcbdb().getCurrentUser().is_mirror_on();
if (!PCBcontext.getPcbdb().getCurrentUser().is_mirror_on())
PCBcontext.getPcbdb().getCurrentUser().alter_mirror_mode();
SessionFragment sessionFragment = (SessionFragment) getSupportFragmentManager().findFragmentByTag(SessionActivity.FRAGMENT_SESSION);
if (sessionFragment==null) sessionFragment=new SessionFragment();
getSupportFragmentManager()
......@@ -327,10 +328,6 @@ 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));
if (previous_mirrormode!=PCBcontext.getPcbdb().getCurrentUser().is_mirror_on())
PCBcontext.getPcbdb().getCurrentUser().alter_mirror_mode();
getSupportFragmentManager()
.beginTransaction()
.replace(R.id.sessions_fragment_container, listInstructionsFragment, SessionActivity.FRAGMENT_METHOD)
......
......@@ -19,12 +19,12 @@ import com.yottacode.pictogram.tabletlibrary.R;
import com.yottacode.pictogram.tools.PCBcontext;
import com.yottacode.tools.BitmapTools;
import org.json.JSONObject;
import java.io.IOException;
public class SessionFragment extends Fragment implements ActionTalk.iActionListener {
interface iSessionFragment {
public void selectedMsg(int msg_pos);
public void play_msg();
......@@ -108,7 +108,7 @@ public class SessionFragment extends Fragment implements ActionTalk.iActionListe
}
@Override
public void action(action action, int picto_cat, int picto_id) {
public void action(action action, int picto_cat, int picto_id,JSONObject msg) {
if (action==ActionTalk.iActionListener.action.show) {
if (!paused) {
mListener.play_msg();
......
......@@ -98,6 +98,6 @@ public class NetServiceTablet implements NetService.iNetServiceDevice {
}
public void setPictogramActivity(PictogramActivity pictogramActivity) {this.pictogramActivity=pictogramActivity;}
public void updateUserConfig(User user) {
this.pictogramActivity.setConfig();
if (this.pictogramActivity!=null) this.pictogramActivity.setConfig();
}
}
......@@ -80,6 +80,7 @@
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_below="@+id/loginTopbarLayout"
android:background="#eeeeee"
android:paddingTop="10dp">
<fragment
......
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:layout_width="match_parent"
......@@ -6,95 +7,102 @@
android:orientation="horizontal"
android:background="#BDBDBD"
android:keepScreenOn="true"
android:id="@+id/pictogramLayout"
tools:context="com.yottacode.pictogram.tabletlibrary.gui.communicator.PictogramActivity"
android:padding="@dimen/small_padding">
<!-- android:keepScreenOn - To keep the screen bright as long as the app is visible (also forever) -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/pictogramLayout"
>
<!-- android:keepScreenOn - To keep the screen bright as long as the app is visible (also forever) -->
<ImageButton
android:layout_width="@dimen/picto_normal_width"
android:layout_height="@dimen/tape_normal_height"
android:src="@drawable/remove_picto_from_tape"
android:id="@+id/button_delete"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:clickable="true"
android:background="@android:color/holo_red_light" />
<GridView
android:id="@+id/tape_grid_view"
android:layout_toEndOf="@+id/button_delete"
android:layout_toStartOf="@+id/button_tts"
android:layout_width="@dimen/picto_normal_width"
android:layout_height="@dimen/tape_normal_height"
android:padding="@dimen/small_padding"
android:gravity="center"
android:numColumns="8"
android:accessibilityLiveRegion="none"
android:background="@android:color/holo_red_light"
android:clickable="true"
android:horizontalSpacing="@dimen/picto_grid_spacing">
</GridView>
<ImageButton
android:layout_width="@dimen/picto_normal_width"
android:layout_height="@dimen/tape_normal_height"
android:src="@drawable/remove_picto_from_tape"
android:id="@+id/button_delete"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:clickable="true"
android:background="@android:color/holo_red_light" />
<ImageButton
android:layout_width="@dimen/picto_normal_width"
android:layout_height="@dimen/tape_normal_height"
android:src="@drawable/send_tape"
android:background="@android:color/holo_red_light"
android:id="@+id/button_tts"
android:adjustViewBounds="true"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:clickable="true" />
<GridView
android:id="@+id/tape_grid_view"
android:layout_width="@dimen/picto_normal_width"
android:layout_height="@dimen/tape_normal_height"
android:layout_toEndOf="@+id/button_delete"
android:layout_toStartOf="@+id/button_tts"
android:accessibilityLiveRegion="none"
android:background="@android:color/holo_red_light"
android:clickable="true"
android:gravity="center"
android:horizontalSpacing="@dimen/picto_grid_spacing"
android:numColumns="8"></GridView>
<ImageButton
android:layout_width="96dp"
android:layout_height="match_parent"
android:id="@+id/showPictoCategoriesViewButton"
android:layout_alignParentStart="true"
android:src="@drawable/show_categories_grid"
android:background="#EEEEEE"
android:layout_below="@+id/tape_grid_view"
android:scaleType="fitCenter" />
<ImageButton
android:layout_width="@dimen/picto_normal_width"
android:layout_height="@dimen/tape_normal_height"
android:src="@drawable/send_tape"
android:background="@android:color/holo_red_light"
android:id="@+id/button_tts"
android:adjustViewBounds="true"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:clickable="true" />
<GridView
android:id="@+id/picto_category_grid_view"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:layout_below="@+id/tape_grid_view"
android:layout_alignParentBottom="true"
android:numColumns="10"
android:gravity="center_vertical|center|center_horizontal"
android:background="#DDDDDD"
android:layout_alignParentEnd="true"
android:layout_toEndOf="@+id/showPictoCategoriesViewButton"
android:paddingLeft="@dimen/small_padding"
android:paddingTop="@dimen/small_padding"
android:paddingRight="@dimen/small_padding"
android:paddingBottom="@dimen/small_padding"
android:verticalSpacing="@dimen/picto_grid_spacing"
android:horizontalSpacing="@dimen/picto_grid_spacing">
</GridView>
<ImageButton
android:layout_width="96dp"
android:layout_height="match_parent"
android:id="@+id/showPictoCategoriesViewButton"
android:layout_alignParentStart="true"
android:src="@drawable/show_categories_grid"
android:background="#EEEEEE"
android:layout_below="@+id/tape_grid_view"
android:scaleType="fitCenter" />
<GridView
android:id="@+id/picto_main_grid_view"
android:layout_height="match_parent"
<GridView
android:id="@+id/picto_category_grid_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_below="@+id/tape_grid_view"
android:layout_toEndOf="@+id/showPictoCategoriesViewButton"
android:background="#DDDDDD"
android:gravity="center_vertical|center|center_horizontal"
android:horizontalSpacing="@dimen/picto_grid_spacing"
android:numColumns="10"
android:paddingLeft="@dimen/small_padding"
android:paddingRight="@dimen/small_padding"
android:verticalSpacing="@dimen/picto_grid_spacing"></GridView>
<GridView
android:id="@+id/picto_main_grid_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_alignParentStart="true"
android:layout_below="@+id/tape_grid_view"
android:background="#DDDDDD"
android:gravity="center_vertical|center|center_horizontal"
android:horizontalSpacing="@dimen/picto_grid_spacing"
android:verticalSpacing="@dimen/picto_grid_spacing"></GridView>
</RelativeLayout>
<FrameLayout
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_below="@+id/tape_grid_view"
android:layout_alignParentStart="true"
android:gravity="center_vertical|center|center_horizontal"
android:background="#DDDDDD"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:paddingLeft="@dimen/small_padding"
android:paddingTop="@dimen/small_padding"
android:horizontalSpacing="@dimen/picto_grid_spacing"
android:verticalSpacing="@dimen/picto_grid_spacing">
</GridView>
android:layout_height="match_parent"
android:layout_gravity="center"
android:orientation="horizontal">
</RelativeLayout>
</FrameLayout>
</FrameLayout>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:layout_width="match_parent"
......@@ -6,96 +7,105 @@
android:orientation="horizontal"
android:background="#BDBDBD"
android:keepScreenOn="true"
android:id="@+id/pictogramLayout"
tools:context="com.yottacode.pictogram.tabletlibrary.gui.communicator.PictogramActivity"
android:padding="@dimen/small_padding">
<!-- android:keepScreenOn - To keep the screen bright as long as the app is visible (also forever) -->
<RelativeLayout
android:id="@+id/pictogramLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- android:keepScreenOn - To keep the screen bright as long as the app is visible (also forever) -->
<ImageButton
android:layout_width="@dimen/picto_big_width"
android:layout_height="@dimen/tape_big_height"
android:src="@drawable/remove_picto_from_tape"
android:id="@+id/button_delete"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:clickable="true"
android:background="@android:color/holo_red_light" />
<GridView
android:id="@+id/tape_grid_view"
android:layout_toEndOf="@+id/button_delete"
android:layout_toStartOf="@+id/button_tts"
android:layout_width="@dimen/picto_big_width"
android:layout_height="@dimen/tape_big_height"
android:padding="@dimen/small_padding"
android:gravity="center"
android:numColumns="6"
android:accessibilityLiveRegion="none"
android:background="@android:color/holo_red_light"
android:clickable="true"
android:longClickable="true"
android:horizontalSpacing="@dimen/picto_grid_spacing">
</GridView>
<ImageButton
android:id="@+id/button_delete"
android:layout_width="@dimen/picto_big_width"
android:layout_height="@dimen/tape_big_height"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:background="@android:color/holo_red_light"
android:clickable="true"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:src="@drawable/remove_picto_from_tape" />
<ImageButton
android:layout_width="@dimen/picto_big_width"
android:layout_height="@dimen/tape_big_height"
android:src="@drawable/send_tape"
android:background="@android:color/holo_red_light"
android:id="@+id/button_tts"
android:adjustViewBounds="true"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:clickable="true" />
<GridView
android:id="@+id/tape_grid_view"
android:layout_width="@dimen/picto_big_width"
android:layout_height="@dimen/tape_big_height"
android:layout_toEndOf="@+id/button_delete"
android:layout_toStartOf="@+id/button_tts"
android:accessibilityLiveRegion="none"
android:background="@android:color/holo_red_light"
android:clickable="true"
android:gravity="center"
android:horizontalSpacing="@dimen/picto_grid_spacing"
android:longClickable="true"
android:numColumns="6"></GridView>
<ImageButton
android:layout_width="96dp"
android:layout_height="match_parent"
android:id="@+id/showPictoCategoriesViewButton"
android:layout_alignParentStart="true"
android:src="@drawable/show_categories_grid"
android:background="#EEEEEE"
android:layout_below="@+id/tape_grid_view"
android:scaleType="fitCenter" />
<GridView
android:id="@+id/picto_category_grid_view"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:layout_below="@+id/tape_grid_view"
android:layout_alignParentBottom="true"
android:numColumns="8"
android:gravity="center_vertical|center|center_horizontal"
android:background="#DDDDDD"
android:layout_alignParentEnd="true"
android:layout_toEndOf="@+id/showPictoCategoriesViewButton"
android:paddingLeft="@dimen/small_padding"
android:paddingTop="@dimen/small_padding"
android:paddingRight="@dimen/small_padding"
android:paddingBottom="@dimen/small_padding"
android:verticalSpacing="@dimen/picto_grid_spacing"
android:horizontalSpacing="@dimen/picto_grid_spacing">
</GridView>
<ImageButton
android:id="@+id/button_tts"
android:layout_width="@dimen/picto_big_width"
android:layout_height="@dimen/tape_big_height"
android:layout_alignParentEnd="true"
android:layout_alignParentTop="true"
android:adjustViewBounds="true"
android:background="@android:color/holo_red_light"
android:clickable="true"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:src="@drawable/send_tape" />
<GridView
android:id="@+id/picto_main_grid_view"
android:layout_height="match_parent"
<ImageButton
android:id="@+id/showPictoCategoriesViewButton"
android:layout_width="96dp"
android:layout_height="match_parent"
android:layout_alignParentStart="true"
android:layout_below="@+id/tape_grid_view"
android:background="#EEEEEE"
android:scaleType="fitCenter"
android:src="@drawable/show_categories_grid" />
<GridView
android:id="@+id/picto_category_grid_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_below="@+id/tape_grid_view"
android:layout_toEndOf="@+id/showPictoCategoriesViewButton"
android:background="#DDDDDD"
android:gravity="center_vertical|center|center_horizontal"
android:horizontalSpacing="@dimen/picto_grid_spacing"
android:numColumns="8"
android:paddingLeft="@dimen/small_padding"
android:paddingRight="@dimen/small_padding"
android:verticalSpacing="@dimen/picto_grid_spacing"></GridView>
<GridView
android:id="@+id/picto_main_grid_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_alignParentStart="true"
android:layout_below="@+id/tape_grid_view"
android:background="#DDDDDD"
android:gravity="center_vertical|center|center_horizontal"
android:horizontalSpacing="@dimen/picto_grid_spacing"
android:paddingLeft="@dimen/small_padding"
android:verticalSpacing="@dimen/picto_grid_spacing"></GridView>
</RelativeLayout>
<FrameLayout
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_below="@+id/tape_grid_view"
android:layout_alignParentStart="true"
android:gravity="center_vertical|center|center_horizontal"
android:background="#DDDDDD"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:paddingLeft="@dimen/small_padding"
android:paddingTop="@dimen/small_padding"
android:horizontalSpacing="@dimen/picto_grid_spacing"
android:verticalSpacing="@dimen/picto_grid_spacing">
</GridView>
android:layout_height="match_parent"
android:layout_gravity="center"
android:orientation="horizontal">
</FrameLayout>
</RelativeLayout>
</FrameLayout>
......@@ -68,7 +68,7 @@
android:layout_height="wrap_content"
android:layout_below="@+id/serialmail"
android:layout_marginTop="25dp"
android:layout_toStartOf="@+id/imageView"
android:layout_toStartOf="@+id/imageView1"
android:background="@drawable/edit_text_login_style"
android:fontFamily="monospace"
android:hint="@string/prompt_serial_pass"
......@@ -100,7 +100,7 @@
</LinearLayout>
<ImageView
android:id="@+id/imageView"
android:id="@+id/imageView1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="end"
......
......@@ -8,17 +8,17 @@
tools:context="com.yottacode.pictogram.tabletlibrary.gui.login.SplashScreenActivity" >
<ImageView
android:id="@+id/imageView2"
android:layout_width="400px"
android:layout_height="120px"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_marginBottom="44dp"
android:contentDescription="@string/app_name"
android:orientation="vertical"
android:src="@drawable/yottacode_logo"
android:scaleX="0.5"
android:scaleY="0.5"
android:id="@+id/imageView2"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_marginBottom="44dp" />
android:src="@drawable/yottacode_logo" />
<ImageView
android:layout_width="200px"
......@@ -26,10 +26,24 @@
android:contentDescription="@string/app_name"
android:orientation="vertical"
android:src="@drawable/pictogram_logo"
android:id="@+id/imageView"
android:id="@+id/imageView1"
android:scaleX="1.5"
android:scaleY="1.5"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true" />
<TextView
android:id="@+id/labelVersion"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/imageView2"
android:layout_alignParentStart="true"
android:layout_alignTop="@+id/imageView2"
android:layout_marginStart="37dp"
android:gravity="center"
android:paddingTop="15dp"
android:text="@string/version_label"
android:textAlignment="center"
android:textColor="@color/black" />
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#99000000"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="5dp"
android:text="¡Alerta!"
android:textAlignment="center"
android:textColor="@android:color/background_light"
android:textSize="24sp"
android:textStyle="bold" />
<LinearLayout
android:id="@+id/layoutImages"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="horizontal">
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp" />
<ImageView
android:id="@+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp" />
<ImageView
android:id="@+id/imageView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp" />
<ImageView
android:id="@+id/imageView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp" />
<ImageView
android:id="@+id/imageView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_weight="1" />
<ImageView
android:id="@+id/imageView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_weight="1" />
<ImageView
android:id="@+id/imageView8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_weight="1" />
</LinearLayout>
<Button
android:id="@+id/aceptar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Vale" />
</LinearLayout>
</LinearLayout>
......@@ -3,5 +3,6 @@
android:id="@+id/loginStudentGridView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#eeeeee"
android:numColumns="5"
android:stackFromBottom="false" />
......@@ -4,7 +4,8 @@
android:layout_height="match_parent">
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@android:id/list" />
android:background="#eeeeee" />
</LinearLayout>
......@@ -6,7 +6,8 @@
android:layout_height="match_parent">
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@android:id/list" />
android:background="#eeeeee" />
</LinearLayout>
......@@ -43,9 +43,13 @@
<!-- Cropper -->
<string name="crop_TextRequired">Por favor, introduzca una leyenda para el pictograma</string>
<string name="uploadingImage">Subiendo imagen al servidor</string>
<string name="uploadingImage">Uploading image to server</string>
<string name="titleCropperEdit">Edit Picto</string>
<string name="titleCropperNew">New Picto</string>
<string name="insertPasswordLogin">Insert Password</string>
<string name="version_label">Version:</string>
<string name="message_from">Message from</string>
<string name="says">Says</string>
</resources>
<resources>
<string name="app_name">com.yottacode.pictogram.Tablet</string>
<string name="alumnos">Estrudiantes</string>
<string name="alumnos">Alumnos</string>
<string name="supervisores">Supervisores</string>
<item name="maxInTape" type="integer">8</item>
<item name="maxInTape_big" type="integer">6</item>
......@@ -45,6 +45,10 @@
<string name="cancel">Cancelar</string>
<string name="titleCropperEdit">Editar Pictograma</string>
<string name="titleCropperNew">Nuevo Pictograma</string>
<string name="insertPasswordLogin">Inserte Contraseña</string>
<string name="version_label">Versión:</string>
<string name="message_from">Mensaje de</string>
<string name="says">Dice</string>
</resources>
......@@ -3,7 +3,7 @@
<color name="white_translucent">#AAFFFFFF</color>
<color name="black_translucent">#b4000000</color>
<color name="black">#FF000000</color>
<color name="black">#000000</color>
<color name="white">#FFFFFFFF</color>
<color name="gray_blue">#FF78909C</color>
<color name="blue_light">#40c4ff</color>
......
<resources>
<string name="app_name">com.yottacode.pictogram.Tablet</string>
<string name="version_label">Versión:</string>
<string name="alumnos">Alumnos</string>
<string name="supervisores">Supervisores</string>
<item name="maxInTape" type="integer">8</item>
......@@ -47,4 +48,12 @@
<string name="crop_TextRequired">Por favor, introduzca una leyenda para el pictograma</string>
<string name="uploadingImage">Subiendo imagen al servidor</string>
<string name="cancel">Cancel</string>
<string name="drawer_open">Open Menu</string>
<string name="drawer_close">Close Menu</string>
<string name="insertPasswordLogin">Inserte Contraseña</string>
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>
<string name="message_from">Mensaje de</string>
<string name="says">Dice</string>
</resources>
......@@ -97,27 +97,28 @@
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="support-v4-24.2.1" level="project" />
<orderEntry type="library" exported="" name="support-compat-24.2.1" level="project" />
<orderEntry type="library" exported="" name="support-media-compat-24.2.1" level="project" />
<orderEntry type="library" exported="" name="animated-vector-drawable-24.2.1" level="project" />
<orderEntry type="library" exported="" name="support-fragment-24.2.1" level="project" />
<orderEntry type="library" exported="" name="play-services-base-9.2.1" level="project" />
<orderEntry type="library" exported="" name="androidasync-2.1.9" level="project" />
<orderEntry type="library" exported="" name="play-services-clearcut-9.2.1" level="project" />
<orderEntry type="library" exported="" name="android-gif-drawable-1.1.7" level="project" />
<orderEntry type="library" exported="" name="support-v4-23.0.0" level="project" />
<orderEntry type="library" exported="" name="support-media-compat-24.2.1" level="project" />
<orderEntry type="library" exported="" name="play-services-gcm-9.2.1" level="project" />
<orderEntry type="library" exported="" name="play-services-auth-base-9.2.1" level="project" />
<orderEntry type="library" exported="" name="support-core-ui-24.2.1" level="project" />
<orderEntry type="library" exported="" name="play-services-base-9.2.1" level="project" />
<orderEntry type="library" exported="" name="play-services-gass-9.2.1" level="project" />
<orderEntry type="library" exported="" name="play-services-iid-9.2.1" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-24.2.1" level="project" />
<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="library" exported="" name="androidasync-2.1.9" level="project" />
<orderEntry type="library" exported="" name="play-services-clearcut-9.2.1" level="project" />
<orderEntry type="library" exported="" name="play-services-basement-9.2.1" level="project" />
<orderEntry type="library" exported="" name="play-services-tasks-9.2.1" level="project" />
<orderEntry type="library" exported="" name="support-annotations-24.2.1" level="project" />
<orderEntry type="library" exported="" name="play-services-auth-9.2.1" level="project" />
<orderEntry type="library" exported="" name="play-services-ads-9.2.1" level="project" />
<orderEntry type="library" exported="" name="ion-2.1.9" level="project" />
<orderEntry type="library" exported="" name="support-v4-23.0.0" level="project" />
<orderEntry type="library" exported="" name="play-services-ads-lite-9.2.1" level="project" />
<orderEntry type="module" module-name="commonlibrary" exported="" />
<orderEntry type="library" exported="" name="android-android-24" level="project" />
......
package com.yottacode.pictogram.yotta_tablet.net;
import android.app.DownloadManager;
import android.app.ProgressDialog;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.net.Uri;
import android.os.Environment;
import android.util.Log;
import com.yottacode.pictogram.dao.DeviceHelper;
import com.yottacode.pictogram.net.iVersionManager;
import com.yottacode.pictogram.tools.PCBcontext;
import com.yottacode.pictogram.yotta_tablet.R;
import com.yottacode.tools.GUITools;
import java.io.File;
/**
* Created by Fernando on 10/03/2017.
*/
public class VersionManager implements iVersionManager {
static final String LOG_TAG=VersionManager.class.getCanonicalName();
public void newVersionAlert(final float version, final Context context, final float vnew) {
GUITools.show_alert(
PCBcontext.getActivityContext(), R.string.new_version_title,
PCBcontext.getContext().getResources().getString(R.string.new_version_detail)+" v" + version, new GUITools.iOKListener() {
@Override
public void ok() {
downloadNewVersion(version,PCBcontext.getActivityContext(), version);
}
});
}
private void downloadNewVersion(final float version, final Context context, final float vnew) {
final ProgressDialog progressDialog=ProgressDialog.show(context, context.getString(R.string.userLoadingTxt),context.getString(R.string.new_version_downloading));
progressDialog.show();
String destination = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + "/";
String fileName = context.getResources().getString(com.yottacode.pictogram.R.string.apk);
String apkurl=context.getResources().getString(com.yottacode.pictogram.R.string.server);
apkurl="https://pre.yottacode.com"
+ "/" + fileName;
destination += fileName;
final Uri uri = Uri.parse("file://" + destination);
Log.i(LOG_TAG,"Downloading new version from "+apkurl+" to "+destination);
//Delete update file if exists
File file = new File(destination);
if (file.exists())
file.delete();
//set downloadmanager
DownloadManager.Request request = new DownloadManager.Request(Uri.parse(apkurl));
request.setDescription(context.getString(R.string.new_version_detail));
request.setTitle(context.getString(com.yottacode.pictogram.R.string.app_name));
//set destination
request.setDestinationUri(uri);
// get download service and enqueue file
final DownloadManager manager = (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE);
final long downloadId = manager.enqueue(request);
//register receiver for when .apk download is complete
context.registerReceiver(new BroadcastReceiver() {
public void onReceive(Context ctxt, Intent intent) {
progressDialog.dismiss();
Intent install = new Intent(Intent.ACTION_VIEW);
install.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
install.setDataAndType(uri,
manager.getMimeTypeForDownloadedFile(downloadId));
context.startActivity(install);
context.unregisterReceiver(this);
DeviceHelper.setAppVersion(vnew);
}
}
, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
}
}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="es">
<head>
<!-- Generated by javadoc (1.8.0_112-release) on Sat May 20 07:52:09 CEST 2017 -->
<title>RestapiWrapper.iRestapiListener</title>
<meta name="date" content="2017-05-20">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="RestapiWrapper.iRestapiListener";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../com/yottacode/net/RestapiWrapper.HTTPException.html" title="class in com.yottacode.net"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../com/yottacode/net/RestapiWrapper.iSilentLogin.html" title="interface in com.yottacode.net"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/yottacode/net/RestapiWrapper.iRestapiListener.html" target="_top">Frames</a></li>
<li><a href="RestapiWrapper.iRestapiListener.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.yottacode.net</div>
<h2 title="Interface RestapiWrapper.iRestapiListener" class="title">Interface RestapiWrapper.iRestapiListener</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../com/yottacode/pictogram/action/ActionLog.html" title="class in com.yottacode.pictogram.action">ActionLog</a></dd>
</dl>
<dl>
<dt>Enclosing class:</dt>
<dd><a href="../../../com/yottacode/net/RestapiWrapper.html" title="class in com.yottacode.net">RestapiWrapper</a></dd>
</dl>
<hr>
<br>
<pre>public static interface <span class="typeNameLabel">RestapiWrapper.iRestapiListener</span></pre>
<div class="block">This interface specifies which are the methods to be implemented by classes receiving
responses to API requests.
Generally, it is extended by Activities from which API requests are performed</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yottacode/net/RestapiWrapper.iRestapiListener.html#error-com.yottacode.net.RestapiWrapper.HTTPException-">error</a></span>(<a href="../../../com/yottacode/net/RestapiWrapper.HTTPException.html" title="class in com.yottacode.net">RestapiWrapper.HTTPException</a>&nbsp;e)</code>&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yottacode/net/RestapiWrapper.iRestapiListener.html#preExecute--">preExecute</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yottacode/net/RestapiWrapper.iRestapiListener.html#result-org.json.JSONArray-">result</a></span>(org.json.JSONArray&nbsp;result)</code>&nbsp;</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yottacode/net/RestapiWrapper.iRestapiListener.html#result-org.json.JSONObject-">result</a></span>(org.json.JSONObject&nbsp;result)</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="preExecute--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>preExecute</h4>
<pre>void&nbsp;preExecute()</pre>
</li>
</ul>
<a name="result-org.json.JSONArray-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>result</h4>
<pre>void&nbsp;result(org.json.JSONArray&nbsp;result)</pre>
</li>
</ul>
<a name="result-org.json.JSONObject-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>result</h4>
<pre>void&nbsp;result(org.json.JSONObject&nbsp;result)</pre>
</li>
</ul>
<a name="error-com.yottacode.net.RestapiWrapper.HTTPException-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>error</h4>
<pre>void&nbsp;error(<a href="../../../com/yottacode/net/RestapiWrapper.HTTPException.html" title="class in com.yottacode.net">RestapiWrapper.HTTPException</a>&nbsp;e)</pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../com/yottacode/net/RestapiWrapper.HTTPException.html" title="class in com.yottacode.net"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../com/yottacode/net/RestapiWrapper.iSilentLogin.html" title="interface in com.yottacode.net"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/yottacode/net/RestapiWrapper.iRestapiListener.html" target="_top">Frames</a></li>
<li><a href="RestapiWrapper.iRestapiListener.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="es">
<head>
<!-- Generated by javadoc (1.8.0_112-release) on Sat May 20 07:52:09 CEST 2017 -->
<title>RestapiWrapper.iSilentLogin</title>
<meta name="date" content="2017-05-20">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="RestapiWrapper.iSilentLogin";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../com/yottacode/net/RestapiWrapper.iRestapiListener.html" title="interface in com.yottacode.net"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../com/yottacode/net/SailsSocketsIO.html" title="class in com.yottacode.net"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/yottacode/net/RestapiWrapper.iSilentLogin.html" target="_top">Frames</a></li>
<li><a href="RestapiWrapper.iSilentLogin.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.yottacode.net</div>
<h2 title="Interface RestapiWrapper.iSilentLogin" class="title">Interface RestapiWrapper.iSilentLogin</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../com/yottacode/pictogram/net/NetService.html" title="class in com.yottacode.pictogram.net">NetService</a></dd>
</dl>
<dl>
<dt>Enclosing class:</dt>
<dd><a href="../../../com/yottacode/net/RestapiWrapper.html" title="class in com.yottacode.net">RestapiWrapper</a></dd>
</dl>
<hr>
<br>
<pre>public static interface <span class="typeNameLabel">RestapiWrapper.iSilentLogin</span></pre>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yottacode/net/RestapiWrapper.iSilentLogin.html#isValidToken-com.yottacode.net.RestapiWrapper.HTTPException-java.lang.Object-">isValidToken</a></span>(<a href="../../../com/yottacode/net/RestapiWrapper.HTTPException.html" title="class in com.yottacode.net">RestapiWrapper.HTTPException</a>&nbsp;error,
java.lang.Object&nbsp;result)</code>&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yottacode/net/RestapiWrapper.iSilentLogin.html#login--">login</a></span>()</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="login--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>login</h4>
<pre>void&nbsp;login()</pre>
</li>
</ul>
<a name="isValidToken-com.yottacode.net.RestapiWrapper.HTTPException-java.lang.Object-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>isValidToken</h4>
<pre>boolean&nbsp;isValidToken(<a href="../../../com/yottacode/net/RestapiWrapper.HTTPException.html" title="class in com.yottacode.net">RestapiWrapper.HTTPException</a>&nbsp;error,
java.lang.Object&nbsp;result)</pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../com/yottacode/net/RestapiWrapper.iRestapiListener.html" title="interface in com.yottacode.net"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../com/yottacode/net/SailsSocketsIO.html" title="class in com.yottacode.net"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/yottacode/net/RestapiWrapper.iSilentLogin.html" target="_top">Frames</a></li>
<li><a href="RestapiWrapper.iSilentLogin.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="es">
<head>
<!-- Generated by javadoc (1.8.0_112-release) on Sat May 20 07:52:13 CEST 2017 -->
<title>com.yottacode.net</title>
<meta name="date" content="2017-05-20">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<h1 class="bar"><a href="../../../com/yottacode/net/package-summary.html" target="classFrame">com.yottacode.net</a></h1>
<div class="indexContainer">
<h2 title="Interfaces">Interfaces</h2>
<ul title="Interfaces">
<li><a href="RestapiWrapper.iRestapiListener.html" title="interface in com.yottacode.net" target="classFrame"><span class="interfaceName">RestapiWrapper.iRestapiListener</span></a></li>
<li><a href="RestapiWrapper.iSilentLogin.html" title="interface in com.yottacode.net" target="classFrame"><span class="interfaceName">RestapiWrapper.iSilentLogin</span></a></li>
</ul>
<h2 title="Classes">Classes</h2>
<ul title="Classes">
<li><a href="DefaultListener.html" title="class in com.yottacode.net" target="classFrame">DefaultListener</a></li>
<li><a href="FakeSSLTrustManager.html" title="class in com.yottacode.net" target="classFrame">FakeSSLTrustManager</a></li>
<li><a href="RelaxedHostNameVerifier.html" title="class in com.yottacode.net" target="classFrame">RelaxedHostNameVerifier</a></li>
<li><a href="RestapiWrapper.html" title="class in com.yottacode.net" target="classFrame">RestapiWrapper</a></li>
<li><a href="SailsSocketsIO.html" title="class in com.yottacode.net" target="classFrame">SailsSocketsIO</a></li>
<li><a href="SSLDummyContext.html" title="class in com.yottacode.net" target="classFrame">SSLDummyContext</a></li>
</ul>
<h2 title="Exceptions">Exceptions</h2>
<ul title="Exceptions">
<li><a href="RestapiWrapper.HTTPException.html" title="class in com.yottacode.net" target="classFrame">RestapiWrapper.HTTPException</a></li>
</ul>
</div>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="es">
<head>
<!-- Generated by javadoc (1.8.0_112-release) on Sat May 20 07:52:13 CEST 2017 -->
<title>com.yottacode.net</title>
<meta name="date" content="2017-05-20">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="com.yottacode.net";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li class="navBarCell1Rev">Package</li>
<li>Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev&nbsp;Package</li>
<li><a href="../../../com/yottacode/pictogram/action/package-summary.html">Next&nbsp;Package</a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/yottacode/net/package-summary.html" target="_top">Frames</a></li>
<li><a href="package-summary.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 title="Package" class="title">Package&nbsp;com.yottacode.net</h1>
</div>
<div class="contentContainer">
<ul class="blockList">
<li class="blockList">
<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Interface Summary table, listing interfaces, and an explanation">
<caption><span>Interface Summary</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Interface</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="../../../com/yottacode/net/RestapiWrapper.iRestapiListener.html" title="interface in com.yottacode.net">RestapiWrapper.iRestapiListener</a></td>
<td class="colLast">
<div class="block">This interface specifies which are the methods to be implemented by classes receiving
responses to API requests.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../com/yottacode/net/RestapiWrapper.iSilentLogin.html" title="interface in com.yottacode.net">RestapiWrapper.iSilentLogin</a></td>
<td class="colLast">&nbsp;</td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation">
<caption><span>Class Summary</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="../../../com/yottacode/net/DefaultListener.html" title="class in com.yottacode.net">DefaultListener</a></td>
<td class="colLast">
<div class="block">This listener logs all received answers from the message it is registered to
It is usually not used</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../com/yottacode/net/FakeSSLTrustManager.html" title="class in com.yottacode.net">FakeSSLTrustManager</a></td>
<td class="colLast">
<div class="block">Created by amontejo on 27/01/16.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../com/yottacode/net/RelaxedHostNameVerifier.html" title="class in com.yottacode.net">RelaxedHostNameVerifier</a></td>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../com/yottacode/net/RestapiWrapper.html" title="class in com.yottacode.net">RestapiWrapper</a></td>
<td class="colLast">
<div class="block">LastUpdate: 22 de enero de 2016</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../com/yottacode/net/SailsSocketsIO.html" title="class in com.yottacode.net">SailsSocketsIO</a></td>
<td class="colLast">
<div class="block">Websocket Room based on Socket IO</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../com/yottacode/net/SSLDummyContext.html" title="class in com.yottacode.net">SSLDummyContext</a></td>
<td class="colLast">&nbsp;</td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Exception Summary table, listing exceptions, and an explanation">
<caption><span>Exception Summary</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Exception</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="../../../com/yottacode/net/RestapiWrapper.HTTPException.html" title="class in com.yottacode.net">RestapiWrapper.HTTPException</a></td>
<td class="colLast">&nbsp;</td>
</tr>
</tbody>
</table>
</li>
</ul>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li class="navBarCell1Rev">Package</li>
<li>Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev&nbsp;Package</li>
<li><a href="../../../com/yottacode/pictogram/action/package-summary.html">Next&nbsp;Package</a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/yottacode/net/package-summary.html" target="_top">Frames</a></li>
<li><a href="package-summary.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="es">
<head>
<!-- Generated by javadoc (1.8.0_112-release) on Sat May 20 07:52:13 CEST 2017 -->
<title>com.yottacode.net Class Hierarchy</title>
<meta name="date" content="2017-05-20">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="com.yottacode.net Class Hierarchy";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li>Class</li>
<li class="navBarCell1Rev">Tree</li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li><a href="../../../com/yottacode/pictogram/action/package-tree.html">Next</a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/yottacode/net/package-tree.html" target="_top">Frames</a></li>
<li><a href="package-tree.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 class="title">Hierarchy For Package com.yottacode.net</h1>
<span class="packageHierarchyLabel">Package Hierarchies:</span>
<ul class="horizontal">
<li><a href="../../../overview-tree.html">All Packages</a></li>
</ul>
</div>
<div class="contentContainer">
<h2 title="Class Hierarchy">Class Hierarchy</h2>
<ul>
<li type="circle">java.lang.Object
<ul>
<li type="circle">android.os.AsyncTask&lt;Params,Progress,Result&gt;
<ul>
<li type="circle">com.yottacode.net.<a href="../../../com/yottacode/net/RestapiWrapper.HttpAsyncTask.html" title="class in com.yottacode.net"><span class="typeNameLink">RestapiWrapper.HttpAsyncTask</span></a></li>
</ul>
</li>
<li type="circle">com.yottacode.net.<a href="../../../com/yottacode/net/DefaultListener.html" title="class in com.yottacode.net"><span class="typeNameLink">DefaultListener</span></a> (implements com.github.nkzawa.emitter.Emitter.Listener)</li>
<li type="circle">com.yottacode.net.<a href="../../../com/yottacode/net/FakeSSLTrustManager.html" title="class in com.yottacode.net"><span class="typeNameLink">FakeSSLTrustManager</span></a> (implements javax.net.ssl.X509TrustManager)</li>
<li type="circle">com.yottacode.net.<a href="../../../com/yottacode/net/RelaxedHostNameVerifier.html" title="class in com.yottacode.net"><span class="typeNameLink">RelaxedHostNameVerifier</span></a> (implements javax.net.ssl.HostnameVerifier)</li>
<li type="circle">com.yottacode.net.<a href="../../../com/yottacode/net/RestapiWrapper.html" title="class in com.yottacode.net"><span class="typeNameLink">RestapiWrapper</span></a></li>
<li type="circle">com.yottacode.net.<a href="../../../com/yottacode/net/RestapiWrapper.HttpAsyncTaskParams.html" title="class in com.yottacode.net"><span class="typeNameLink">RestapiWrapper.HttpAsyncTaskParams</span></a></li>
<li type="circle">com.yottacode.net.<a href="../../../com/yottacode/net/SailsSocketsIO.html" title="class in com.yottacode.net"><span class="typeNameLink">SailsSocketsIO</span></a></li>
<li type="circle">com.yottacode.net.<a href="../../../com/yottacode/net/SSLDummyContext.html" title="class in com.yottacode.net"><span class="typeNameLink">SSLDummyContext</span></a></li>
<li type="circle">java.lang.Throwable (implements java.io.Serializable)
<ul>
<li type="circle">java.lang.Exception
<ul>
<li type="circle">com.yottacode.net.<a href="../../../com/yottacode/net/RestapiWrapper.HTTPException.html" title="class in com.yottacode.net"><span class="typeNameLink">RestapiWrapper.HTTPException</span></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<h2 title="Interface Hierarchy">Interface Hierarchy</h2>
<ul>
<li type="circle">com.yottacode.net.<a href="../../../com/yottacode/net/RestapiWrapper.iRestapiListener.html" title="interface in com.yottacode.net"><span class="typeNameLink">RestapiWrapper.iRestapiListener</span></a></li>
<li type="circle">com.yottacode.net.<a href="../../../com/yottacode/net/RestapiWrapper.iSilentLogin.html" title="interface in com.yottacode.net"><span class="typeNameLink">RestapiWrapper.iSilentLogin</span></a></li>
</ul>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li>Class</li>
<li class="navBarCell1Rev">Tree</li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li><a href="../../../com/yottacode/pictogram/action/package-tree.html">Next</a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/yottacode/net/package-tree.html" target="_top">Frames</a></li>
<li><a href="package-tree.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="es">
<head>
<!-- Generated by javadoc (1.8.0_112-release) on Sat May 20 07:52:13 CEST 2017 -->
<title>com.yottacode.pictogram.action</title>
<meta name="date" content="2017-05-20">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<h1 class="bar"><a href="../../../../com/yottacode/pictogram/action/package-summary.html" target="classFrame">com.yottacode.pictogram.action</a></h1>
<div class="indexContainer">
<h2 title="Classes">Classes</h2>
<ul title="Classes">
<li><a href="Action.html" title="class in com.yottacode.pictogram.action" target="classFrame">Action</a></li>
<li><a href="ActionLog.html" title="class in com.yottacode.pictogram.action" target="classFrame">ActionLog</a></li>
<li><a href="PictoAction.html" title="class in com.yottacode.pictogram.action" target="classFrame">PictoAction</a></li>
<li><a href="PictosAction.html" title="class in com.yottacode.pictogram.action" target="classFrame">PictosAction</a></li>
<li><a href="SubscribeAction.html" title="class in com.yottacode.pictogram.action" target="classFrame">SubscribeAction</a></li>
<li><a href="TalkAction.html" title="class in com.yottacode.pictogram.action" target="classFrame">TalkAction</a></li>
<li><a href="UnsubscribeAction.html" title="class in com.yottacode.pictogram.action" target="classFrame">UnsubscribeAction</a></li>
<li><a href="VocabularyAction.html" title="class in com.yottacode.pictogram.action" target="classFrame">VocabularyAction</a></li>
</ul>
</div>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="es">
<head>
<!-- Generated by javadoc (1.8.0_112-release) on Sat May 20 07:52:13 CEST 2017 -->
<title>com.yottacode.pictogram.action</title>
<meta name="date" content="2017-05-20">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="com.yottacode.pictogram.action";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li class="navBarCell1Rev">Package</li>
<li>Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../com/yottacode/net/package-summary.html">Prev&nbsp;Package</a></li>
<li><a href="../../../../com/yottacode/pictogram/dao/package-summary.html">Next&nbsp;Package</a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/yottacode/pictogram/action/package-summary.html" target="_top">Frames</a></li>
<li><a href="package-summary.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 title="Package" class="title">Package&nbsp;com.yottacode.pictogram.action</h1>
</div>
<div class="contentContainer">
<ul class="blockList">
<li class="blockList">
<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation">
<caption><span>Class Summary</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="../../../../com/yottacode/pictogram/action/Action.html" title="class in com.yottacode.pictogram.action">Action</a></td>
<td class="colLast">
<div class="block">User actions that happens when the user is online --> they are sent to the server by websockets (Room class)
It is required, inter alia, to support session state diagram such
as is depicted at http://scm.ujaen.es/files/note/1042/Estados_y_acciones.pdf
and http://scm.ujaen.es/softuno/pictogram/wikis/LUActions</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../com/yottacode/pictogram/action/ActionLog.html" title="class in com.yottacode.pictogram.action">ActionLog</a></td>
<td class="colLast">
<div class="block">Created by emblanco on 5/10/15.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../com/yottacode/pictogram/action/PictoAction.html" title="class in com.yottacode.pictogram.action">PictoAction</a></td>
<td class="colLast">
<div class="block">User actions regarding a pictogram that happens when the user is online --> they are sent to the server by websockets (Room class)
It is required, inter alia, to support session state diagram such
as is depicted at http://scm.ujaen.es/files/note/1042/Estados_y_acciones.pdf
and http://scm.ujaen.es/softuno/pictogram/wikis/LUActions</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../com/yottacode/pictogram/action/PictosAction.html" title="class in com.yottacode.pictogram.action">PictosAction</a></td>
<td class="colLast">
<div class="block">User actions regarding a pictogram that happens when the user is online --> they are sent to the server by websockets (Room class)
It is required, inter alia, to support session state diagram such
as is depicted at http://scm.ujaen.es/files/note/1042/Estados_y_acciones.pdf
and http://scm.ujaen.es/softuno/pictogram/wikis/LUActions</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../com/yottacode/pictogram/action/SubscribeAction.html" title="class in com.yottacode.pictogram.action">SubscribeAction</a></td>
<td class="colLast">
<div class="block">User actions regarding a pictogram that happens when the user is online --> they are sent to the server by websockets (Room class)
It is required, inter alia, to support session state diagram such
as is depicted at http://scm.ujaen.es/files/note/1042/Estados_y_acciones.pdf
and http://scm.ujaen.es/softuno/pictogram/wikis/LUActions</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../com/yottacode/pictogram/action/TalkAction.html" title="class in com.yottacode.pictogram.action">TalkAction</a></td>
<td class="colLast">
<div class="block">User actions regarding a pictogram that happens when the user is online --> they are sent to the server by websockets (Room class)
It is required, inter alia, to support session state diagram such
as is depicted at http://scm.ujaen.es/files/note/1042/Estados_y_acciones.pdf
and http://scm.ujaen.es/softuno/pictogram/wikis/LUActions</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../com/yottacode/pictogram/action/UnsubscribeAction.html" title="class in com.yottacode.pictogram.action">UnsubscribeAction</a></td>
<td class="colLast">
<div class="block">User actions regarding a pictogram that happens when the user is online --> they are sent to the server by websockets (Room class)
It is required, inter alia, to support session state diagram such
as is depicted at http://scm.ujaen.es/files/note/1042/Estados_y_acciones.pdf
and http://scm.ujaen.es/softuno/pictogram/wikis/LUActions</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../com/yottacode/pictogram/action/VocabularyAction.html" title="class in com.yottacode.pictogram.action">VocabularyAction</a></td>
<td class="colLast">
<div class="block">User actions regarding a pictogram that happens when the user is online --> they are sent to the server by websockets (Room class)
It is required, inter alia, to support session state diagram such
as is depicted at http://scm.ujaen.es/files/note/1042/Estados_y_acciones.pdf
and http://scm.ujaen.es/softuno/pictogram/wikis/LUActions</div>
</td>
</tr>
</tbody>
</table>
</li>
</ul>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li class="navBarCell1Rev">Package</li>
<li>Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../com/yottacode/net/package-summary.html">Prev&nbsp;Package</a></li>
<li><a href="../../../../com/yottacode/pictogram/dao/package-summary.html">Next&nbsp;Package</a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/yottacode/pictogram/action/package-summary.html" target="_top">Frames</a></li>
<li><a href="package-summary.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="es">
<head>
<!-- Generated by javadoc (1.8.0_112-release) on Sat May 20 07:52:13 CEST 2017 -->
<title>com.yottacode.pictogram.action Class Hierarchy</title>
<meta name="date" content="2017-05-20">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="com.yottacode.pictogram.action Class Hierarchy";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li>Class</li>
<li class="navBarCell1Rev">Tree</li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../com/yottacode/net/package-tree.html">Prev</a></li>
<li><a href="../../../../com/yottacode/pictogram/dao/package-tree.html">Next</a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/yottacode/pictogram/action/package-tree.html" target="_top">Frames</a></li>
<li><a href="package-tree.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 class="title">Hierarchy For Package com.yottacode.pictogram.action</h1>
<span class="packageHierarchyLabel">Package Hierarchies:</span>
<ul class="horizontal">
<li><a href="../../../../overview-tree.html">All Packages</a></li>
</ul>
</div>
<div class="contentContainer">
<h2 title="Class Hierarchy">Class Hierarchy</h2>
<ul>
<li type="circle">java.lang.Object
<ul>
<li type="circle">com.yottacode.pictogram.action.<a href="../../../../com/yottacode/pictogram/action/Action.html" title="class in com.yottacode.pictogram.action"><span class="typeNameLink">Action</span></a>
<ul>
<li type="circle">com.yottacode.pictogram.action.<a href="../../../../com/yottacode/pictogram/action/PictoAction.html" title="class in com.yottacode.pictogram.action"><span class="typeNameLink">PictoAction</span></a>
<ul>
<li type="circle">com.yottacode.pictogram.action.<a href="../../../../com/yottacode/pictogram/action/TalkAction.html" title="class in com.yottacode.pictogram.action"><span class="typeNameLink">TalkAction</span></a></li>
<li type="circle">com.yottacode.pictogram.action.<a href="../../../../com/yottacode/pictogram/action/VocabularyAction.html" title="class in com.yottacode.pictogram.action"><span class="typeNameLink">VocabularyAction</span></a></li>
</ul>
</li>
<li type="circle">com.yottacode.pictogram.action.<a href="../../../../com/yottacode/pictogram/action/PictosAction.html" title="class in com.yottacode.pictogram.action"><span class="typeNameLink">PictosAction</span></a></li>
<li type="circle">com.yottacode.pictogram.action.<a href="../../../../com/yottacode/pictogram/action/SubscribeAction.html" title="class in com.yottacode.pictogram.action"><span class="typeNameLink">SubscribeAction</span></a></li>
<li type="circle">com.yottacode.pictogram.action.<a href="../../../../com/yottacode/pictogram/action/UnsubscribeAction.html" title="class in com.yottacode.pictogram.action"><span class="typeNameLink">UnsubscribeAction</span></a></li>
</ul>
</li>
<li type="circle">com.yottacode.pictogram.action.<a href="../../../../com/yottacode/pictogram/action/ActionLog.html" title="class in com.yottacode.pictogram.action"><span class="typeNameLink">ActionLog</span></a> (implements com.yottacode.net.<a href="../../../../com/yottacode/net/RestapiWrapper.iRestapiListener.html" title="interface in com.yottacode.net">RestapiWrapper.iRestapiListener</a>)</li>
</ul>
</li>
</ul>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li>Class</li>
<li class="navBarCell1Rev">Tree</li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../com/yottacode/net/package-tree.html">Prev</a></li>
<li><a href="../../../../com/yottacode/pictogram/dao/package-tree.html">Next</a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/yottacode/pictogram/action/package-tree.html" target="_top">Frames</a></li>
<li><a href="package-tree.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
No preview for this file type
No preview for this file type
No preview for this file type
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
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 sign in to comment