Commit c5a164ec by Jose Antonio

Merged branch develop into develop

parents 6773b6b1 34075327
Showing with 562 additions and 274 deletions
...@@ -5,7 +5,7 @@ buildscript { ...@@ -5,7 +5,7 @@ buildscript {
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.2.3' classpath 'com.android.tools.build:gradle:2.3.0'
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
......
...@@ -11,15 +11,16 @@ android { ...@@ -11,15 +11,16 @@ android {
versionName "1.0" versionName "1.0"
resValue "string", "db_name", "PCB.db" resValue "string", "db_name", "PCB.db"
resValue "integer", "db_version", "4" resValue "integer", "db_version", "4"
resValue "string", "app_version", "1.0" resValue "string", "app_version", "1.1"
resValue "string", "core_vocabulary", "core_vocabulary" resValue "string", "core_vocabulary", "core_vocabulary"
resValue "string", "apk", "to_be_set_in_subproject" resValue "string", "apk", "to_be_set_in_subproject"
resValue "string", "VersionManagerClass", "to_be_set_in_subproject"
} }
buildTypes { buildTypes {
release { release {
minifyEnabled false minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
resValue "string", "server", "https://pictogram.yottacode.com" resValue "string", "server", "https:/pre.yottacode.com"
resValue "bool", "force_db_create", "false" resValue "bool", "force_db_create", "false"
resValue "bool", "ssl_connect", "true" resValue "bool", "ssl_connect", "true"
resValue "bool", "force_img_download", "false" resValue "bool", "force_img_download", "false"
......
...@@ -246,6 +246,15 @@ public class Picto extends Img { ...@@ -246,6 +246,15 @@ public class Picto extends Img {
return false; return false;
} }
} }
public void set_visible(boolean visible) {
try {
this.attributes.put(JSON_ATTTRS.STATUS, visible ? JSON_ATTTR_STATUS_VALUES.ENABLED : JSON_ATTTR_STATUS_VALUES.INVISIBLE);
} catch (JSONException e) {
Log.e(LOG_TAG,e.getMessage());
}
}
/** /**
* *
* @return the highlight property of a picto * @return the highlight property of a picto
......
...@@ -269,6 +269,7 @@ public class UserLogin { ...@@ -269,6 +269,7 @@ public class UserLogin {
} }
public void login(String username, String password, Activity activity, Class PictogramActivity, Class LoginActivity) { public void login(String username, String password, Activity activity, Class PictogramActivity, Class LoginActivity) {
if (PCBcontext.is_user_logged()) PCBcontext.unset_user();
boolean online= RestapiWrapper.ping(activity.getResources().getString(R.string.server), "server/ping"); boolean online= RestapiWrapper.ping(activity.getResources().getString(R.string.server), "server/ping");
if (isSupervisorLoginPattern(username)) if (isSupervisorLoginPattern(username))
manageSupervisorLogin(username,password,online, activity, PictogramActivity, LoginActivity); manageSupervisorLogin(username,password,online, activity, PictogramActivity, LoginActivity);
......
package com.yottacode.pictogram.net; package com.yottacode.pictogram.net;
import android.app.AlertDialog;
import android.content.Context; import android.content.Context;
import android.content.DialogInterface;
import android.text.SpannableString;
import android.text.method.LinkMovementMethod;
import android.text.util.Linkify;
import android.util.Log; import android.util.Log;
import android.view.KeyEvent;
import android.widget.TextView;
import com.yottacode.net.RestapiWrapper; import com.yottacode.net.RestapiWrapper;
import com.yottacode.pictogram.R; import com.yottacode.pictogram.R;
...@@ -26,8 +19,6 @@ import java.util.Vector; ...@@ -26,8 +19,6 @@ import java.util.Vector;
import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import static android.app.Activity.RESULT_OK;
/** /**
* Background services to be executed every "delay" seconds. Tasks to be executed: * Background services to be executed every "delay" seconds. Tasks to be executed:
...@@ -42,10 +33,10 @@ import static android.app.Activity.RESULT_OK; ...@@ -42,10 +33,10 @@ import static android.app.Activity.RESULT_OK;
public class NetService implements Runnable, RestapiWrapper.iSilentLogin { public class NetService implements Runnable, RestapiWrapper.iSilentLogin {
static final String LOG_TAG=NetService.class.getCanonicalName();
static final String ping_session="server/ping"; static final String ping_session="server/ping";
private boolean updated; private boolean updated;
private final String LOG_TAG=this.getClass().getCanonicalName();
private Vector<iNetServiceStatus> listeners; private Vector<iNetServiceStatus> listeners;
private static final long restfullSynchroTimming=PCBcontext.getContext().getResources().getInteger(R.integer.netservice_force_restfull_synchro)*1000; private static final long restfullSynchroTimming=PCBcontext.getContext().getResources().getInteger(R.integer.netservice_force_restfull_synchro)*1000;
private long lastRestfullSynchro; private long lastRestfullSynchro;
...@@ -138,16 +129,16 @@ public class NetService implements Runnable, RestapiWrapper.iSilentLogin { ...@@ -138,16 +129,16 @@ public class NetService implements Runnable, RestapiWrapper.iSilentLogin {
public boolean online() {return updated;} public boolean online() {return updated;}
public void restart_app(boolean direct_login) { public void restart_app(boolean resetPrevLogin) {
for (iNetServiceStatus listener: listeners) for (iNetServiceStatus listener: listeners)
if (listener instanceof iNetServiceDevice) ((iNetServiceDevice)listener).restart_app(direct_login); if (listener instanceof iNetServiceDevice) ((iNetServiceDevice)listener).restart_app(resetPrevLogin);
PCBcontext.unset_user();
} }
/** /**
* ping to the server by using a restapi call. If ok, the call will return the empty set * ping to the server by using a restapi call. If ok, the call will return the empty set
*/ */
Context newVersionContext=null;
@Override @Override
public void run() { public void run() {
try { try {
...@@ -160,14 +151,14 @@ public class NetService implements Runnable, RestapiWrapper.iSilentLogin { ...@@ -160,14 +151,14 @@ public class NetService implements Runnable, RestapiWrapper.iSilentLogin {
@Override @Override
public void result(JSONArray result) { public void result(JSONArray result) {
} }
@Override @Override
public void result(JSONObject result) { public void result(JSONObject result) {
try { try {
float version = Float.valueOf(result.getString("version")).floatValue(); final float version = Float.valueOf(result.getString("version")).floatValue();
if (PCBcontext.getActivityContext() != null && version > DeviceHelper.getAppVersion()) {
Log.e(LOG_TAG, "New version is required! from v" + DeviceHelper.getAppVersion() + " to v" + version); if (PCBcontext.getActivityContext() != null && version > DeviceHelper.getAppVersion() && newVersionContext!=PCBcontext.getActivityContext()) {
newVersionAlert(PCBcontext.getActivityContext(), version); newVersionContext=PCBcontext.getActivityContext(); // prevent from showing several times the alert
newVersionAlert(version,PCBcontext.getActivityContext(), version);
} }
} catch (Exception e) { } catch (Exception e) {
Log.e(LOG_TAG, "PING JSON ERROR: " + result + " " + e.getMessage()); Log.e(LOG_TAG, "PING JSON ERROR: " + result + " " + e.getMessage());
...@@ -271,38 +262,18 @@ public class NetService implements Runnable, RestapiWrapper.iSilentLogin { ...@@ -271,38 +262,18 @@ public class NetService implements Runnable, RestapiWrapper.iSilentLogin {
device=(iNetServiceDevice)listener; device=(iNetServiceDevice)listener;
return device; return device;
} }
static void newVersionAlert(Context contex, final float vnew) { static void newVersionAlert(final float version, final Context context, final float vnew) {
final SpannableString s = new SpannableString(contex.getResources().getString(R.string.server) try {
+ "/" + contex.getResources().getString(R.string.apk)); iVersionManager versionManager = (iVersionManager)Class.forName(context.getResources().getString(R.string.VersionManagerClass)).newInstance();
versionManager.newVersionAlert(version,context,vnew);
final TextView tx1 = new TextView(contex); } catch (InstantiationException e) {
tx1.setText("\t"+contex.getResources().getString(R.string.new_version_detail) + e.printStackTrace();
"\n\t\t"+ s); } catch (IllegalAccessException e) {
tx1.setTextSize(16); e.printStackTrace();
tx1.setAutoLinkMask(RESULT_OK); } catch (ClassNotFoundException e) {
tx1.setMovementMethod(LinkMovementMethod.getInstance()); e.printStackTrace();
}
Linkify.addLinks(s, Linkify.WEB_URLS);
AlertDialog.Builder builder = new AlertDialog.Builder(contex);
builder.setTitle(contex.getResources().getString(R.string.app_name)+": "+contex.getResources().getString(R.string.new_version_title)+" v"+vnew)
.setCancelable(false)
.setPositiveButton("OK",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int id) {
DeviceHelper.setAppVersion(vnew);
}
})
.setView(tx1).setOnKeyListener(new DialogInterface.OnKeyListener() {
@Override
public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) {
return false;
}
}).show();
PCBcontext.setActivityContext(null);
} }
/** /**
* Created by Fernando on 12/08/2016. * Created by Fernando on 12/08/2016.
......
...@@ -28,8 +28,8 @@ public class ServerLogin { ...@@ -28,8 +28,8 @@ public class ServerLogin {
private static void login(String operation, String email, String username, String password, final RestapiWrapper.iRestapiListener listener){ private static void login(String operation, String email, String username, String password, final RestapiWrapper.iRestapiListener listener){
Hashtable<String, String> postDataParams = new Hashtable<String, String>(); Hashtable<String, String> postDataParams = new Hashtable<String, String>();
if (email!=null) postDataParams.put("email", email); if (email!=null) postDataParams.put("email", email);
if (username!=null) postDataParams.put("username", username); if (username!=null) postDataParams.put("username", username);
postDataParams.put("password", password); if (password!=null) postDataParams.put("password", password);
PCBcontext.getRestapiWrapper().ask(operation, postDataParams, "post", new RestapiWrapper.iRestapiListener() { PCBcontext.getRestapiWrapper().ask(operation, postDataParams, "post", new RestapiWrapper.iRestapiListener() {
@Override @Override
public void preExecute() { public void preExecute() {
......
package com.yottacode.pictogram.net;
import android.content.Context;
/**
* Created by Fernando on 10/03/2017.
*/
public interface iVersionManager {
void newVersionAlert(final float version, final Context context, final float vnew);
}
...@@ -22,22 +22,24 @@ import java.util.Set; ...@@ -22,22 +22,24 @@ import java.util.Set;
*/ */
public class TTSHelper { public class TTSHelper {
TextToSpeech ttobj; TextToSpeech ttobj=null;
Voice voice; Voice voice;
boolean voice_ok; 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) {
this.ttobj = new TextToSpeech(context,new TextToSpeech.OnInitListener() { if (this.ttobj==null) {
public void onInit(int status) { this.ttobj = new TextToSpeech(context, new TextToSpeech.OnInitListener() {
Log.e(this.getClass().getCanonicalName(),"TTS engine "+status); public void onInit(int status) {
if (status == TextToSpeech.SUCCESS) { Log.e(this.getClass().getCanonicalName(), "TTS engine " + status);
ttobj.setLanguage(locale); if (status == TextToSpeech.SUCCESS) {
setVoice(context,voice); ttobj.setLanguage(locale);
} setVoice(context, voice);
}
}}, engine);
}
}, engine);
}
} }
public TTSHelper(Context context, String engine, Locale locale,String voice) { public TTSHelper(Context context, String engine, Locale locale,String voice) {
......
...@@ -16,7 +16,7 @@ public class GUITools { ...@@ -16,7 +16,7 @@ public class GUITools {
public void ok(); public void ok();
} }
public static void show_alert(Context context, int resource_msg, String additional_msg, final iOKListener oklistener) { public static AlertDialog show_alert(Context context, int resource_msg, String additional_msg, final iOKListener oklistener) {
AlertDialog.Builder builder = new AlertDialog.Builder(context); AlertDialog.Builder builder = new AlertDialog.Builder(context);
String msg = context.getString(resource_msg); String msg = context.getString(resource_msg);
if (additional_msg != null) msg += ": " + additional_msg; if (additional_msg != null) msg += ": " + additional_msg;
...@@ -29,7 +29,9 @@ public class GUITools { ...@@ -29,7 +29,9 @@ public class GUITools {
} }
}); });
AlertDialog alert = builder.create(); AlertDialog alert = builder.create();
alert.show(); alert.show();
return alert;
} }
public static void show_alert(Context context, int resource_msg) { public static void show_alert(Context context, int resource_msg) {
......
...@@ -49,9 +49,6 @@ ...@@ -49,9 +49,6 @@
<!--Semantic grammar --> <!--Semantic grammar -->
<string name="loadingGrammar">Please wait, loading vocabulary</string> <string name="loadingGrammar">Please wait, loading vocabulary</string>
<string name="naturalgrammar">SUpO_EN</string>
<string name="pictogrammar">SUpO_PICTOEN</string>
<string name="nogrammar">Warning: unknown language</string>
<!--Upload local img --> <!--Upload local img -->
<string name="enterImgLabel">Enter img label</string> <string name="enterImgLabel">Enter img label</string>
...@@ -68,7 +65,6 @@ ...@@ -68,7 +65,6 @@
<string name="mirror_mode_on">Mirror mode on</string> <string name="mirror_mode_on">Mirror mode on</string>
<string name="new_version_title">New version available</string> <string name="new_version_title">New version available</string>
<string name="new_version_detail">Please, download and install the new version available at</string>
<!--default tts engine and voice--> <!--default tts engine and voice-->
<string name="default_tts_engine">com.google.android.tts</string> <string name="default_tts_engine">com.google.android.tts</string>
......
...@@ -18,6 +18,9 @@ ...@@ -18,6 +18,9 @@
<string name="action_entrar">Entrar</string> <string name="action_entrar">Entrar</string>
<string name="logout">Cerrar sesión</string> <string name="logout">Cerrar sesión</string>
<string name="loginTitle">¿Quién eres?</string> <string name="loginTitle">¿Quién eres?</string>
<string name="userInetErrorMsg">Este usuario requiere conexión a internet para ser validado</string>
<string name="userLoadingTxt">Cargando</string>
<string name="userLoadingMsg">Cargando alumnos. Por favor espere.</string>
<string name="loginErrorTxt">Login</string> <string name="loginErrorTxt">Login</string>
<string name="loginErrorMsg">El usuario no existe o la contraseña indicada no es correcta. Inténtelo de nuevo.</string> <string name="loginErrorMsg">El usuario no existe o la contraseña indicada no es correcta. Inténtelo de nuevo.</string>
<string name="loginNoLicenseMsg">La licencia del usuario expiró con fecha. Contacte con Yotta para adquirir una.</string> <string name="loginNoLicenseMsg">La licencia del usuario expiró con fecha. Contacte con Yotta para adquirir una.</string>
...@@ -48,10 +51,6 @@ ...@@ -48,10 +51,6 @@
<!--Semantic grammar --> <!--Semantic grammar -->
<string name="loadingGrammar">Por favor espere, cargando vocabulario</string> <string name="loadingGrammar">Por favor espere, cargando vocabulario</string>
<string name="naturalgrammar">SUpO_ES</string>
<string name="grammar">SUpO_ES</string>
<string name="nogrammar">Advertencia: Lenguaje no soportado</string>
<string name="pictogrammar">SUpO_PICTOES</string>
<!--Upload local img --> <!--Upload local img -->
<string name="enterImgLabel">Introduzca etiqueta de la imagen</string> <string name="enterImgLabel">Introduzca etiqueta de la imagen</string>
...@@ -68,7 +67,7 @@ ...@@ -68,7 +67,7 @@
<string name="mirror_mode_on">Modo espejo activado</string> <string name="mirror_mode_on">Modo espejo activado</string>
<string name="new_version_title">Nueva versión disponible</string> <string name="new_version_title">Nueva versión disponible</string>
<string name="new_version_detail">Por favor descargue e instale la nueva versión disponible en</string>
<!--default tts engine and voice--> <!--default tts engine and voice-->
<string name="default_tts_engine">com.google.android.tts</string> <string name="default_tts_engine">com.google.android.tts</string>
<string name="default_tts_voice_male">es-es-x-ana#male_1-local</string> <string name="default_tts_voice_male">es-es-x-ana#male_1-local</string>
......
...@@ -51,10 +51,6 @@ ...@@ -51,10 +51,6 @@
<!--Semantic grammar --> <!--Semantic grammar -->
<string name="loadingGrammar">Please wait, loading vocabulary</string> <string name="loadingGrammar">Please wait, loading vocabulary</string>
<string name="naturalgrammar">SUpO_EN</string>
<string name="grammar">SUpO_EN</string>
<string name="nogrammar">Warning: unknown language</string>
<string name="pictogrammar">SUpO_PICTOEN</string>
<!--Upload local img --> <!--Upload local img -->
<string name="enterImgLabel">Introduzca etiqueta de la imagen</string> <string name="enterImgLabel">Introduzca etiqueta de la imagen</string>
...@@ -63,18 +59,7 @@ ...@@ -63,18 +59,7 @@
<string name="upload_ok">Se subió correctamente al servidor</string> <string name="upload_ok">Se subió correctamente al servidor</string>
<string name="upload_duplicated">Pictograma ya presente en la colección. Utilice otra imagen</string> <string name="upload_duplicated">Pictograma ya presente en la colección. Utilice otra imagen</string>
<string name="title_activity_img_label">img_label</string>
<!-- Strings related to login -->
<string name="prompt_email">Email</string>
<string name="prompt_password">Password (optional)</string>
<string name="action_sign_in">Sign in or register</string>
<string name="action_sign_in_short">Sign in</string>
<string name="error_invalid_email">This email address is invalid</string>
<string name="error_invalid_password">This password is too short</string>
<string name="error_incorrect_password">This password is incorrect</string>
<string name="error_field_required">This field is required</string>
<string name="permission_rationale">"Contacts permissions are needed for providing email completions."</string>
<!--online/offline status--> <!--online/offline status-->
<string name="pictogram_offline">Compruebe si tiene conexión a Internet. </string> <string name="pictogram_offline">Compruebe si tiene conexión a Internet. </string>
<string name="pictogram_online">Conexión con el servidor establecida. </string> <string name="pictogram_online">Conexión con el servidor establecida. </string>
...@@ -85,7 +70,6 @@ ...@@ -85,7 +70,6 @@
<!--new app version alertbox--> <!--new app version alertbox-->
<string name="new_version_title">Nueva versión disponible</string> <string name="new_version_title">Nueva versión disponible</string>
<string name="new_version_detail">Por favor descargue e instale la nueva versión disponible en</string>
<!--default tts engine and voice--> <!--default tts engine and voice-->
<string name="default_tts_engine">com.google.android.tts</string> <string name="default_tts_engine">com.google.android.tts</string>
......
#Sun Jan 15 10:11:11 CET 2017 #Mon Mar 06 13:23:58 CET 2017
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.2-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
...@@ -18,8 +18,9 @@ android { ...@@ -18,8 +18,9 @@ android {
targetSdkVersion 22 targetSdkVersion 22
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
resValue "string","SerialClass","com.yottacode.pictogram.supervisor_tablet.gui.Supervisor_SerialActivity" resValue "bool","NotifyAllwaysVisible","false"
resValue "string","apk","pictograms.apk" resValue "string", "VersionManagerClass", "com.yottacode.pictogram.supervisor_tablet.net.VersionManager"
resValue "string","apk","pictograms.apk"
// signingConfig signingConfigs.config // signingConfig signingConfigs.config
} }
productFlavors { productFlavors {
...@@ -28,11 +29,11 @@ android { ...@@ -28,11 +29,11 @@ android {
resValue "bool", "ssl_connect", "false" resValue "bool", "ssl_connect", "false"
} }
DevFlavor { DevFlavor {
resValue "string", "server", "https://dev.yottacode.com" resValue "string", "server", "https://dev.pictogramweb.com"
resValue "bool", "ssl_connect", "false" resValue "bool", "ssl_connect", "false"
} }
PreFlavor { PreFlavor {
resValue "string", "server", "https://pre.yottacode.com" resValue "string", "server", "https://apk.pictogramweb.com"
resValue "bool", "ssl_connect", "true" resValue "bool", "ssl_connect", "true"
} }
LocalFlavor { LocalFlavor {
......
package com.yottacode.pictogram.supervisor_tablet.gui;
import android.app.Activity;
import com.yottacode.pictogram.supervisor_tablet.R;
import com.yottacode.pictogram.tabletlibrary.gui.login.SerialActivity;
import com.yottacode.tools.GUITools;
/**
* Created by Fernando on 21/11/2016.
*/
public final class Supervisor_SerialActivity extends SerialActivity {
@Override
protected boolean is_legal_user(String user_name, Activity activity) {
boolean legal_user=com.yottacode.pictogram.dao.UserLogin.isSupervisorLoginPattern(user_name);
if (!legal_user)
GUITools.show_alert(activity, R.string.ilegal_user, user_name);
return legal_user;
}
}
package com.yottacode.pictogram.supervisor_tablet.net;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.text.SpannableString;
import android.text.method.LinkMovementMethod;
import android.text.util.Linkify;
import android.view.KeyEvent;
import android.widget.TextView;
import com.yottacode.pictogram.dao.DeviceHelper;
import com.yottacode.pictogram.net.iVersionManager;
import com.yottacode.pictogram.supervisor_tablet.R;
import com.yottacode.pictogram.tools.PCBcontext;
import static android.app.Activity.RESULT_OK;
/**
* 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) {
final SpannableString s = new SpannableString(context.getResources().getString(R.string.server)
+ "/" + context.getResources().getString(com.yottacode.pictogram.R.string.apk));
final TextView tx1 = new TextView(context);
tx1.setText("\t"+context.getResources().getString(R.string.new_version_detail) +
"\n\t\t"+ s);
tx1.setTextSize(16);
tx1.setAutoLinkMask(RESULT_OK);
tx1.setMovementMethod(LinkMovementMethod.getInstance());
Linkify.addLinks(s, Linkify.WEB_URLS);
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setTitle(context.getResources().getString(R.string.app_name)+": "+context.getResources().getString(R.string.new_version_title)+" v"+vnew)
.setCancelable(false)
.setPositiveButton("OK",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int id) {
DeviceHelper.setAppVersion(vnew);
}
})
.setView(tx1).setOnKeyListener(new DialogInterface.OnKeyListener() {
@Override
public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) {
return false;
}
}).show();
PCBcontext.setActivityContext(null);
}
}
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<string name="app_name">Pictogram Tablet Supervisor</string> <string name="app_name">Pictogram Tablet Supervisor</string>
<string name="ilegal_user">There is not any supervisor named</string> <string name="new_version_detail">Please, go to Google Play to download the new version </string>
</resources> </resources>
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<string name="app_name">Pictogram Tablet Supervisor</string> <string name="app_name">Pictogram Tablet Supervisor</string>
<string name="ilegal_user"> No existe ningún supervisor </string> <string name="new_version_detail">Por favor, descargue la nueva versión en Google Play </string>
</resources> </resources>
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<string name="app_name">Pictogram Tablet Supervisor</string> <string name="app_name">Pictogram Tablet Supervisor</string>
<string name="ilegal_user">There is not any supervisor named</string> <string name="new_version_detail">Please, go to Google Play to download the new version </string>
</resources> </resources>
...@@ -8,7 +8,7 @@ android { ...@@ -8,7 +8,7 @@ android {
targetSdkVersion 22 targetSdkVersion 22
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
resValue "bool","NotifyAllwaysVisible", "false" resValue "bool","NotifyAllwaysVisible","false"
resValue "integer", "rows", "5" resValue "integer", "rows", "5"
resValue "integer", "columns", "10" resValue "integer", "columns", "10"
resValue "integer", "rows_big", "4" resValue "integer", "rows_big", "4"
......
...@@ -16,10 +16,13 @@ import android.widget.ImageView; ...@@ -16,10 +16,13 @@ import android.widget.ImageView;
import android.widget.RelativeLayout; import android.widget.RelativeLayout;
import android.widget.TextView; import android.widget.TextView;
import com.yottacode.pictogram.dao.Picto;
import com.yottacode.pictogram.dao.User; import com.yottacode.pictogram.dao.User;
import com.yottacode.pictogram.tabletlibrary.R; import com.yottacode.pictogram.tabletlibrary.R;
import com.yottacode.pictogram.tools.PCBcontext; import com.yottacode.pictogram.tools.PCBcontext;
import java.util.Vector;
import static android.graphics.Color.argb; import static android.graphics.Color.argb;
/** /**
...@@ -27,9 +30,10 @@ import static android.graphics.Color.argb; ...@@ -27,9 +30,10 @@ import static android.graphics.Color.argb;
*/ */
public class PictoAnimation { public class PictoAnimation {
private final String LOG_TAG = this.getClass().getCanonicalName();
public void animateTapeView(final int position, final ViewGroup view) { private final static String LOG_TAG = PictoAnimation.class.getCanonicalName();
public void animateTapeView(final PictogramActivity activity,final int position, final ViewGroup view) {
final GridView gridview = (GridView) view.getChildAt(1); final GridView gridview = (GridView) view.getChildAt(1);
final TapeAdapter tapeAdapter=(TapeAdapter)gridview.getAdapter(); final TapeAdapter tapeAdapter=(TapeAdapter)gridview.getAdapter();
...@@ -62,19 +66,21 @@ public class PictoAnimation { ...@@ -62,19 +66,21 @@ public class PictoAnimation {
} }
@Override @Override
public void onAnimationEnd(Animator animation) { Log.e(LOG_TAG,"animating"+position); public void onAnimationEnd(Animator animation) {
v.setColorFilter(0); v.setColorFilter(0);
v.setBackgroundColor(ContextCompat.getColor(PCBcontext.getContext(), R.color.picto_default_background)); v.setBackgroundColor(ContextCompat.getColor(PCBcontext.getContext(), R.color.picto_default_background));
if (position < (tapeAdapter.getCount() - 1)) if (position < (tapeAdapter.getCount() - 1))
animateTapeView(position + 1, view); animateTapeView(activity,position + 1, view);
else { else {
((Activity)view.getContext()).runOnUiThread(new Runnable() { activity.runOnUiThread(new Runnable() {
@Override @Override
public void run() { public void run() {
if (tapeAdapter.play()) if (tapeAdapter.play())
tapeAdapter.endPlay(); tapeAdapter.endPlay();
} }
}); });
activity.pictoMainGridAdapter.allPictosInGrid();
activity.pictoCategoryGridAdapter.allPictosInGrid();
} }
} }
...@@ -166,6 +172,7 @@ public class PictoAnimation { ...@@ -166,6 +172,7 @@ public class PictoAnimation {
@Override @Override
public void onAnimationEnd(Animator animation) { public void onAnimationEnd(Animator animation) {
activity.tapeAdapter.deleteItem(position); activity.tapeAdapter.deleteItem(position);
activity.tapeAdapter.notifyDataSetChanged(); activity.tapeAdapter.notifyDataSetChanged();
if (t1.getVisibility()==View.VISIBLE) t1.setAlpha(1); if (t1.getVisibility()==View.VISIBLE) t1.setAlpha(1);
...@@ -194,4 +201,129 @@ public class PictoAnimation { ...@@ -194,4 +201,129 @@ public class PictoAnimation {
colorAnim.start(); colorAnim.start();
} }
public static void animateOnGridView(final RelativeLayout layout) {
final PictogramActivity activity=(PictogramActivity)PCBcontext.getActivityContext();
if (activity.inserting) return;
FrameLayout borderlayout=(FrameLayout)layout.getChildAt(0);
final ImageView v=(ImageView)borderlayout.getChildAt(0);
final TextView t1=(TextView)borderlayout.getChildAt(1);
final TextView t2=(TextView)borderlayout.getChildAt(2);
final ValueAnimator colorAnim = ObjectAnimator.ofFloat(0f, 1f) ;
colorAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
float mul = (Float) animation.getAnimatedValue();
if (t2.getVisibility()==View.VISIBLE) {
t2.setAlpha(mul);
v.setImageAlpha(0);
}
else {
v.setImageAlpha((int)(mul*255f));
if (t1.getVisibility() == View.VISIBLE) t1.setAlpha(mul);
}
}
});
colorAnim.addListener(new ValueAnimator.AnimatorListener() {
@Override
public void onAnimationStart(Animator animation) {
}
@Override
public void onAnimationEnd(Animator animation) {
}
@Override
public void onAnimationCancel(Animator animation) {
}
@Override
public void onAnimationRepeat(Animator animation) {
}
});
colorAnim.setDuration(250);
colorAnim.start();
}
public static void animateOutGridView(final PictoGridAdapter pictoGridAdapter, final Picto picto, RelativeLayout layout, final Vector<Picto> pictoLinkedList_inTape) {
final PictogramActivity activity=(PictogramActivity)PCBcontext.getActivityContext();
if (activity.inserting) return;
FrameLayout borderlayout=(FrameLayout)layout.getChildAt(0);
final ImageView v=(ImageView)borderlayout.getChildAt(0);
final TextView t1=(TextView)borderlayout.getChildAt(1);
final TextView t2=(TextView)borderlayout.getChildAt(2);
final int orange = ContextCompat.getColor(PCBcontext.getContext(),R.color.picto_default_background);
final ValueAnimator colorAnim = ObjectAnimator.ofFloat(0f, 1f) ;
colorAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
float mul = (Float) animation.getAnimatedValue();
if (t2.getVisibility()==View.VISIBLE) {
t2.setAlpha(1-mul);
mul=1;
}
int alphaOrange = PictoAnimation.adjustAlpha(orange, mul);
v.setColorFilter(alphaOrange, PorterDuff.Mode.SRC_ATOP);
v.setBackgroundColor(alphaOrange);
v.setPadding(0,0,0,0);
if (mul == 0.0) {
v.setColorFilter(0);
}
if (t1.getVisibility()==View.VISIBLE) t1.setAlpha(1-mul);
}
});
colorAnim.addListener(new ValueAnimator.AnimatorListener() {
@Override
public void onAnimationStart(Animator animation) {
if (t2.getVisibility()==View.VISIBLE) v.setBackgroundColor(0);
activity.inserting=true;
}
@Override
public void onAnimationEnd(Animator animation) {
pictoLinkedList_inTape.add(picto);
pictoGridAdapter.notifyDataSetChanged();
if (t1.getVisibility()==View.VISIBLE) t1.setAlpha(1);
if (t2.getVisibility()==View.VISIBLE) t2.setAlpha(1);
v.setColorFilter(0);
v.setBackgroundColor(ContextCompat.getColor(PCBcontext.getContext(), R.color.picto_default_background));
activity.inserting=false;
}
@Override
public void onAnimationCancel(Animator animation) {
}
@Override
public void onAnimationRepeat(Animator animation) {
}
});
colorAnim.setDuration(200);
colorAnim.start();
}
} }
...@@ -3,19 +3,25 @@ package com.yottacode.pictogram.tabletlibrary.gui.communicator; ...@@ -3,19 +3,25 @@ package com.yottacode.pictogram.tabletlibrary.gui.communicator;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.ArrayAdapter; import android.widget.ArrayAdapter;
import android.widget.RelativeLayout;
import com.yottacode.pictogram.dao.Picto; import com.yottacode.pictogram.dao.Picto;
import com.yottacode.pictogram.tools.PCBcontext; import com.yottacode.pictogram.tools.PCBcontext;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.Vector;
public class PictoGridAdapter extends ArrayAdapter { public class PictoGridAdapter extends ArrayAdapter {
private LinkedList<Picto> pictoLinkedList; private LinkedList<Picto> pictoLinkedList;
private final String LOG_TAG = this.getClass().getSimpleName(); private final String LOG_TAG = this.getClass().getSimpleName();
private Vector<Picto> pictoLinkedList_inTape;
private Vector<Picto> pictoLinkedList_inGrid;
public PictoGridAdapter(LinkedList<Picto> pictoLinkedList){ public PictoGridAdapter(LinkedList<Picto> pictoLinkedList){
super(PCBcontext.getContext(), PictoItemViewGenerator.LAYOUT, pictoLinkedList); super(PCBcontext.getContext(), PictoItemViewGenerator.LAYOUT, pictoLinkedList);
this.pictoLinkedList = pictoLinkedList; this.pictoLinkedList = pictoLinkedList;
pictoLinkedList_inTape=new Vector<>(5);
pictoLinkedList_inGrid=new Vector<>(5);
} }
@Override @Override
...@@ -33,17 +39,54 @@ public class PictoGridAdapter extends ArrayAdapter { ...@@ -33,17 +39,54 @@ public class PictoGridAdapter extends ArrayAdapter {
return 0; return 0;
} }
public void deleteAll() {
this.pictoLinkedList.clear();
}
@Override @Override
public View getView(int position, View convertView, ViewGroup parent) { public View getView(int position, View convertView, ViewGroup parent) {
return PictoItemViewGenerator.getPictoView( Picto picto=this.pictoLinkedList.get(position);
this.pictoLinkedList.get(position), int igrid=this.pictoLinkedList_inGrid.indexOf(picto);
convertView, int itape = this.pictoLinkedList_inTape.indexOf(picto);
parent
); if (itape >= 0)
picto.set_visible(false);
if (igrid>=0)
picto.set_visible(true);
View view = PictoItemViewGenerator.getPictoView(
picto,
convertView,
parent
);
if (igrid>=0) {
this.pictoLinkedList_inGrid.remove(igrid);
if (itape>=0) pictoLinkedList_inTape.remove(itape);
PictoAnimation.animateOnGridView((RelativeLayout)view);
}
return view;
}
public void pictoInTape(View view, Picto p) {
PictoAnimation.animateOutGridView(this,p, (RelativeLayout)view, pictoLinkedList_inTape);
}
public void pictoInGrid(Picto p) {
pictoLinkedList_inGrid.add(p);
notifyDataSetChanged();
}
public boolean pictoInThisCategory (Picto picto) {
return pictoLinkedList_inTape.contains(picto);
}
public void allPictosInGrid() {
for (Picto picto: pictoLinkedList_inTape) {
pictoLinkedList_inGrid.add(picto);
}
notifyDataSetChanged();
} }
} }
...@@ -124,6 +124,7 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab ...@@ -124,6 +124,7 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
protected boolean tape_delivered=false; protected boolean tape_delivered=false;
float firstTouchX = -1; float firstTouchX = -1;
public boolean inserting=false;
@TargetApi(Build.VERSION_CODES.M) @TargetApi(Build.VERSION_CODES.M)
@Override @Override
...@@ -132,7 +133,7 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab ...@@ -132,7 +133,7 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
// blockNotificationBar(); // blockNotificationBar();
requestWindowFeature(Window.FEATURE_NO_TITLE); requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
// after a long inactivity, the pcbdb is discarded // after a long inactivity, the pcbdb is discarded
...@@ -233,9 +234,15 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab ...@@ -233,9 +234,15 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
public void onItemClick(AdapterView<?> parent, View view, int position, long id) { public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
if (!deleting) { if (!deleting) {
Log.i(PictogramActivity.class.getCanonicalName(), " Deleting item " + position + "-" + id + "(" + PictogramActivity.this.tapeAdapter.getItem(position).get_translation() + ")"); Log.i(PictogramActivity.class.getCanonicalName(), " Deleting item " + position + "-" + id + "(" + PictogramActivity.this.tapeAdapter.getItem(position).get_translation() + ")");
Picto deletedPicto=PictogramActivity.this.tapeAdapter.getItem(position);
new PictoAnimation().animateOnDeleteView(PictogramActivity.this,view, position); new PictoAnimation().animateOnDeleteView(PictogramActivity.this,view, position);
PictogramActivity.this.tapeAdapter.notifyDataSetChanged(); PictogramActivity.this.tapeAdapter.notifyDataSetChanged();
PCBcontext.getActionLog().log(new TalkAction(TalkAction.DELETE, PictogramActivity.this.tapeAdapter.getItem(position))); if (pictoMainGridAdapter.pictoInThisCategory(deletedPicto))
pictoMainGridAdapter.pictoInGrid(deletedPicto);
if (pictoCategoryGridAdapter.pictoInThisCategory(deletedPicto))
pictoCategoryGridAdapter.pictoInGrid(deletedPicto);
PCBcontext.getActionLog().log(new TalkAction(TalkAction.DELETE, deletedPicto));
} }
}}); }});
((NetServiceTablet) PCBcontext.getNetService().getNetServiceDevice()).setPictogramActivity(this); ((NetServiceTablet) PCBcontext.getNetService().getNetServiceDevice()).setPictogramActivity(this);
...@@ -251,7 +258,7 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab ...@@ -251,7 +258,7 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
} }
PictogramActivity.this.pictoMainGridView.setNumColumns(PictogramActivity.this.maxColumns); PictogramActivity.this.pictoMainGridView.setNumColumns(PictogramActivity.this.maxColumns);
PictogramActivity.this.pictoCategoryGridView.setNumColumns(PictogramActivity.this.maxColumns); PictogramActivity.this.pictoCategoryGridView.setNumColumns(PictogramActivity.this.maxColumns);
setConfig();
this.generateAnimations(); this.generateAnimations();
...@@ -266,7 +273,10 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab ...@@ -266,7 +273,10 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
@Override @Override
protected void onResume() { protected void onResume() {
super.onResume(); super.onResume();
Log.i(LOG_TAG, "Resuming Pictogram Activity");
PCBcontext.setActivityContext(this); PCBcontext.setActivityContext(this);
setConfig();
startTTS();
Toast.makeText(this.getBaseContext(), PCBcontext.getPcbdb().getCurrentUser().get_name_stu()+" "+PCBcontext.getPcbdb().getCurrentUser().get_surname_stu()+ Toast.makeText(this.getBaseContext(), PCBcontext.getPcbdb().getCurrentUser().get_name_stu()+" "+PCBcontext.getPcbdb().getCurrentUser().get_surname_stu()+
(PCBcontext.getPcbdb().getCurrentUser().is_supervisor() (PCBcontext.getPcbdb().getCurrentUser().is_supervisor()
? " ("+ PCBcontext.getPcbdb().getCurrentUser().get_name_sup()+" "+PCBcontext.getPcbdb().getCurrentUser().get_surname_sup()+")" ? " ("+ PCBcontext.getPcbdb().getCurrentUser().get_name_sup()+" "+PCBcontext.getPcbdb().getCurrentUser().get_surname_sup()+")"
...@@ -291,7 +301,6 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab ...@@ -291,7 +301,6 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
} }
public void setConfig() { public void setConfig() {
startTTS();
setFeedback(new View[]{deleteButton, ttsButton, this.showPictoCategoriesViewButton, this.pictoCategoryGridView, this.pictoMainGridView}); setFeedback(new View[]{deleteButton, ttsButton, this.showPictoCategoriesViewButton, this.pictoCategoryGridView, this.pictoMainGridView});
} }
private void setFeedback(View views[]) { private void setFeedback(View views[]) {
...@@ -386,10 +395,15 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab ...@@ -386,10 +395,15 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
} }
@Override @Override
protected void onPause() {
super.onPause();
this.pictoCategoryGridAdapter.allPictosInGrid();
this.pictoMainGridAdapter.allPictosInGrid();
}
@Override
protected void onStop() { protected void onStop() {
super.onStop(); super.onStop();
Log.i(LOG_TAG, "Closing Pictogram Activity"); Log.e(LOG_TAG, "Closing Pictogram Activity");
PCBcontext.setActivityContext(null);
PCBcontext.getNetService().closeNotifyStatus(); PCBcontext.getNetService().closeNotifyStatus();
} }
...@@ -746,7 +760,7 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab ...@@ -746,7 +760,7 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
if (v == findViewById(R.id.tape_grid_view) && (viewgroup == findViewById(R.id.picto_category_grid_view) || viewgroup == findViewById(R.id.picto_main_grid_view))) { if (v == findViewById(R.id.tape_grid_view) && (viewgroup == findViewById(R.id.picto_category_grid_view) || viewgroup == findViewById(R.id.picto_main_grid_view))) {
Picto p = viewgroup == findViewById(R.id.picto_category_grid_view) ? pictoCategoryGridAdapter.getItem(position) Picto p = viewgroup == findViewById(R.id.picto_category_grid_view) ? pictoCategoryGridAdapter.getItem(position)
: pictoMainGridAdapter.getItem(position); : pictoMainGridAdapter.getItem(position);
if (!p.is_category()) addPictoWord(p); if (!p.is_category()) addPictoWord(view, p);
} }
// Si el destino es el panel y el origen la cinta de frase // Si el destino es el panel y el origen la cinta de frase
...@@ -754,6 +768,8 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab ...@@ -754,6 +768,8 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
Picto p = tapeAdapter.getItem(position); Picto p = tapeAdapter.getItem(position);
tapeAdapter.deleteItem(position); tapeAdapter.deleteItem(position);
tapeAdapter.notifyDataSetChanged(); tapeAdapter.notifyDataSetChanged();
getCurrentPictoGridAdapter().pictoInGrid(p);
getCurrentPictoGridAdapter().notifyDataSetChanged();
} }
break; break;
...@@ -775,6 +791,7 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab ...@@ -775,6 +791,7 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
private class OnPictoClickListener implements AdapterView.OnItemClickListener { private class OnPictoClickListener implements AdapterView.OnItemClickListener {
@Override @Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) { public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
if (inserting) return;
Picto p = getCurrentPictoGridAdapter().getItem(position); Picto p = getCurrentPictoGridAdapter().getItem(position);
if (p != null && p.get_id() != 0 && !p.is_invisible() && p.is_enabled()) { if (p != null && p.get_id() != 0 && !p.is_invisible() && p.is_enabled()) {
...@@ -787,16 +804,17 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab ...@@ -787,16 +804,17 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
hidePictoMainGridView(); hidePictoMainGridView();
} else if (tapeAdapter.getCount() < PictogramActivity.this.maxInTape && !PictogramActivity.this.tapeAdapter.play()) { } else if (tapeAdapter.getCount() < PictogramActivity.this.maxInTape && !PictogramActivity.this.tapeAdapter.play()) {
addPictoWord(p); addPictoWord(parent.getChildAt(position),p);
} }
} }
} }
} }
private void addPictoWord(Picto p) { private void addPictoWord(View view, Picto p) {
tapeAdapter.addItem(p);
getCurrentPictoGridAdapter().pictoInTape(view,p);
currentCategory = null; currentCategory = null;
tapeAdapter.addItem(new Picto(p));
tapeAdapter.notifyDataSetChanged(); tapeAdapter.notifyDataSetChanged();
showPictoMainGridView(); showPictoMainGridView();
PCBcontext.getActionLog().log(new TalkAction(TalkAction.ADD, p)); PCBcontext.getActionLog().log(new TalkAction(TalkAction.ADD, p));
...@@ -898,7 +916,7 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab ...@@ -898,7 +916,7 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
if (lp.size()>0 && !PictogramActivity.this.tapeAdapter.play()) { if (lp.size()>0 && !PictogramActivity.this.tapeAdapter.play()) {
PCBcontext.getActionLog().log(new PictosAction(lp)); PCBcontext.getActionLog().log(new PictosAction(lp));
tapeAdapter.ttsAllNew(tts); tapeAdapter.ttsAllNew(tts);
new PictoAnimation().animateTapeView(0,(ViewGroup)arg0.getParent()); new PictoAnimation().animateTapeView(PictogramActivity.this,0,(ViewGroup)arg0.getParent());
if (PCBcontext.getPcbdb().getCurrentUser().delivery()!= User.JSON_STUDENT_ATTTRS.delivery.clean) { if (PCBcontext.getPcbdb().getCurrentUser().delivery()!= User.JSON_STUDENT_ATTTRS.delivery.clean) {
showOnlyTape(true); showOnlyTape(true);
} }
...@@ -961,8 +979,12 @@ protected void showOnlyTape(boolean onlyTape) { ...@@ -961,8 +979,12 @@ protected void showOnlyTape(boolean onlyTape) {
PCBcontext.getActionLog().log(new TalkAction(TalkAction.DELETE, p)); PCBcontext.getActionLog().log(new TalkAction(TalkAction.DELETE, p));
// Send websocket action // Send websocket action
tapeAdapter.deleteLastView(); Picto last=tapeAdapter.deleteLastView();
tapeAdapter.notifyDataSetChanged(); tapeAdapter.notifyDataSetChanged();
if (pictoMainGridAdapter.pictoInThisCategory(last))
pictoMainGridAdapter.pictoInGrid(last);
if (pictoCategoryGridAdapter.pictoInThisCategory(last))
pictoCategoryGridAdapter.pictoInGrid(last);
} }
if (!tapeAdapter.hasElements() && tape_delivered) showOnlyTape(false); if (!tapeAdapter.hasElements() && tape_delivered) showOnlyTape(false);
} }
...@@ -1010,18 +1032,23 @@ protected void showOnlyTape(boolean onlyTape) { ...@@ -1010,18 +1032,23 @@ protected void showOnlyTape(boolean onlyTape) {
e.printStackTrace(); e.printStackTrace();
} }
} }
Intent serialActivity = new Intent(getBaseContext(), com.yottacode.pictogram.tabletlibrary.gui.login.SerialActivity.class); Intent serialActivity = new Intent(getBaseContext(), com.yottacode.pictogram.tabletlibrary.gui.login.SerialActivity.class);
if (lastUserName != null) { if (lastUserName != null) {
Log.i(this.getClass().getCanonicalName(), "Switch user to " + lastUserName); Log.i(this.getClass().getCanonicalName(), "Switch user to " + lastUserName);
serialActivity.putExtra("switch_usr", lastUserName); serialActivity.putExtra("switch_usr", lastUserName);
serialActivity.putExtra("switch_pwd", lastPassword); serialActivity.putExtra("switch_pwd", lastPassword);
} }
pictoCategoryGridAdapter.notifyDataSetInvalidated();
pictoMainGridAdapter.notifyDataSetInvalidated();
PictogramActivity.this.finish(); PictogramActivity.this.finish();
if (SessionActivity.session!=null) SessionActivity.session.finish(); if (SessionActivity.session!=null) SessionActivity.session.finish();
PCBcontext.getNetService().restart_app(true); PCBcontext.getNetService().restart_app(true);
} }
return false; return true;
} }
} }
......
...@@ -18,6 +18,7 @@ import java.util.LinkedList; ...@@ -18,6 +18,7 @@ import java.util.LinkedList;
public class TapeAdapter extends BaseAdapter { public class TapeAdapter extends BaseAdapter {
private static final String LOG_TAG = TapeAdapter.class.getName();
//private Context mContext; //private Context mContext;
private LinkedList<Picto> pictoLinkedList; private LinkedList<Picto> pictoLinkedList;
private boolean play = false; private boolean play = false;
...@@ -45,24 +46,31 @@ public class TapeAdapter extends BaseAdapter { ...@@ -45,24 +46,31 @@ public class TapeAdapter extends BaseAdapter {
} }
// AÑADIR ITEM AL ADAPTADOR // AÑADIR ITEM AL ADAPTADOR
public void addItem(Picto p) { public int addItem(Picto p) {
pictoLinkedList.add(p); pictoLinkedList.add(new Picto(p));
return pictoLinkedList.size()-1;
} }
// ELIMINAR ITEM DEL ADAPTADOR // ELIMINAR ITEM DEL ADAPTADOR
public void deleteItem(int position) { public void deleteItem(int position) {
pictoLinkedList.remove(position); try {
pictoLinkedList.remove(position);
}catch(IndexOutOfBoundsException e) {
Log.e(LOG_TAG,"Error deleting item from tape adapter:"+e.getMessage());
}
} }
// ELIMINAR el último ITEM DEL ADAPTADOR // ELIMINAR el último ITEM DEL ADAPTADOR
public void deleteLastView() { public Picto deleteLastView() {
Picto picto=null;
// Controlar excepcion al intentar eliminar el último cuando no hay elementos // Controlar excepcion al intentar eliminar el último cuando no hay elementos
try { try {
pictoLinkedList.removeLast(); picto=pictoLinkedList.removeLast();
} catch (ArrayIndexOutOfBoundsException exception) { } catch (ArrayIndexOutOfBoundsException exception) {
Log.e("Excepción", "ArrayIndexOutOfBounds: " + exception.getMessage()); Log.e("Excepción", "ArrayIndexOutOfBounds: " + exception.getMessage());
} }
return picto;
} }
// ELIMINAR TODOS LOS ITEMS DEL ADAPTADOR // ELIMINAR TODOS LOS ITEMS DEL ADAPTADOR
...@@ -74,7 +82,6 @@ public class TapeAdapter extends BaseAdapter { ...@@ -74,7 +82,6 @@ public class TapeAdapter extends BaseAdapter {
public void clear() { public void clear() {
pictoLinkedList.clear(); pictoLinkedList.clear();
notifyDataSetChanged(); notifyDataSetChanged();
} }
// DEVUELVE TODOS LOS ELEMENTOS // DEVUELVE TODOS LOS ELEMENTOS
public LinkedList<Picto> getAll() { public LinkedList<Picto> getAll() {
......
...@@ -40,7 +40,6 @@ public class LoginActivity extends FragmentActivity { ...@@ -40,7 +40,6 @@ public class LoginActivity extends FragmentActivity {
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE); requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(com.yottacode.pictogram.tabletlibrary.R.layout.activity_login); setContentView(com.yottacode.pictogram.tabletlibrary.R.layout.activity_login);
...@@ -51,14 +50,7 @@ public class LoginActivity extends FragmentActivity { ...@@ -51,14 +50,7 @@ public class LoginActivity extends FragmentActivity {
logoutButton.setOnClickListener(new View.OnClickListener() { logoutButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
Class serialClass; Intent serialActivity = new Intent(getBaseContext(), com.yottacode.pictogram.tabletlibrary.gui.login.SerialActivity.class);
try {
serialClass=Class.forName(getString(R.string.SerialClass));
} catch (ClassNotFoundException e) {
Log.e(this.getClass().getCanonicalName(),"S:"+getString(R.string.SerialClass));
serialClass=SerialActivity.class;
}
Intent serialActivity = new Intent(getBaseContext(), serialClass);
serialActivity.putExtra("resetPrevUser", true); serialActivity.putExtra("resetPrevUser", true);
startActivity(serialActivity); startActivity(serialActivity);
} }
......
...@@ -43,8 +43,6 @@ public class SerialActivity extends Activity { ...@@ -43,8 +43,6 @@ public class SerialActivity extends Activity {
LinearLayout stuList; LinearLayout stuList;
LinearLayout supList; LinearLayout supList;
protected boolean is_legal_user(String user_name, Activity activity) {return true;}
/** /**
* Return the default user+pwd when login.The policy is * Return the default user+pwd when login.The policy is
* 1. switch user * 1. switch user
...@@ -155,24 +153,25 @@ public class SerialActivity extends Activity { ...@@ -155,24 +153,25 @@ public class SerialActivity extends Activity {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
String username = mSerialViewMail.getText().toString(); String username = mSerialViewMail.getText().toString();
if (is_legal_user(username,SerialActivity.this)) {
String password = mSerialViewPass.getText().toString(); String password = mSerialViewPass.getText().toString();
SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0); SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);
SharedPreferences.Editor editor = settings.edit(); SharedPreferences.Editor editor = settings.edit();
editor.putString("username", username); editor.putString("username", username);
editor.putString("password", password); editor.putString("password", password);
editor.commit(); editor.commit();
if (!username.equals("") && !password.equals("")) if (!username.equals("") && !password.equals(""))
new UserLogin().login(username, password, SerialActivity.this, PictogramActivity.class, LoginActivity.class); new UserLogin().login(username, password, SerialActivity.this, PictogramActivity.class, LoginActivity.class);
}
} }
}); });
} }
@Override @Override
public void onStart() { public void onStart() {
Vector<User> users; Vector<User> users;
Log.i(this.getClass().getCanonicalName(),"Starting serial activity (direct login:"+!getIntent().getBooleanExtra("resetPrevUser", true)+")"); Log.i(this.getClass().getCanonicalName(),"Starting serial activity (Reset Prev user:"+getIntent().getBooleanExtra("resetPrevUser", true)+")");
if (!PCBcontext.init()) PCBcontext.init(this, new NetServiceTablet()); if (!PCBcontext.init()) PCBcontext.init(this, new NetServiceTablet());
String default_user[] = loginUserPolicy(); String default_user[] = loginUserPolicy();
String username = default_user[0]; String username = default_user[0];
...@@ -182,7 +181,6 @@ public class SerialActivity extends Activity { ...@@ -182,7 +181,6 @@ public class SerialActivity extends Activity {
mSerialViewMail.setText(username); mSerialViewMail.setText(username);
mSerialViewPass.setText(password); mSerialViewPass.setText(password);
if (!username.equals("") && !password.equals("") && !getIntent().getBooleanExtra("resetPrevUser", true)) if (!username.equals("") && !password.equals("") && !getIntent().getBooleanExtra("resetPrevUser", true))
new UserLogin().login(username, password, SerialActivity.this, PictogramActivity.class, LoginActivity.class); new UserLogin().login(username, password, SerialActivity.this, PictogramActivity.class, LoginActivity.class);
...@@ -197,5 +195,10 @@ public class SerialActivity extends Activity { ...@@ -197,5 +195,10 @@ public class SerialActivity extends Activity {
} }
} }
@Override
public void onResume() {
super.onResume();
PCBcontext.setActivityContext(this);
}
} }
...@@ -30,7 +30,7 @@ public class NetServiceTablet implements NetService.iNetServiceDevice { ...@@ -30,7 +30,7 @@ public class NetServiceTablet implements NetService.iNetServiceDevice {
public void build() { public void build() {
this.builder = new NotificationCompat.Builder(PCBcontext.getContext()).setAutoCancel(true).setOngoing(true); this.builder = new NotificationCompat.Builder(PCBcontext.getContext()).setAutoCancel(true).setOngoing(PCBcontext.getContext().getResources().getBoolean(R.bool.NotifyAllwaysVisible));
Intent resultIntent = new Intent(PCBcontext.getContext(), PictogramActivity.class); Intent resultIntent = new Intent(PCBcontext.getContext(), PictogramActivity.class);
TaskStackBuilder stackBuilder = TaskStackBuilder.create(PCBcontext.getContext()); TaskStackBuilder stackBuilder = TaskStackBuilder.create(PCBcontext.getContext());
stackBuilder.addParentStack(PictogramActivity.class); stackBuilder.addParentStack(PictogramActivity.class);
...@@ -66,7 +66,6 @@ public class NetServiceTablet implements NetService.iNetServiceDevice { ...@@ -66,7 +66,6 @@ public class NetServiceTablet implements NetService.iNetServiceDevice {
} }
} }
public void closeNotifyStatus(){ public void closeNotifyStatus(){
Log.i(LOG_TAG,"Closing notify");
NotificationManager mNotificationManager = NotificationManager mNotificationManager =
(NotificationManager) PCBcontext.getContext().getSystemService(PCBcontext.getContext().NOTIFICATION_SERVICE); (NotificationManager) PCBcontext.getContext().getSystemService(PCBcontext.getContext().NOTIFICATION_SERVICE);
mNotificationManager.cancel(notifyID); mNotificationManager.cancel(notifyID);
...@@ -86,14 +85,14 @@ public class NetServiceTablet implements NetService.iNetServiceDevice { ...@@ -86,14 +85,14 @@ public class NetServiceTablet implements NetService.iNetServiceDevice {
activity.finish(); activity.finish();
} }
public void restart_app(boolean direct_login) { public void restart_app(boolean resetPrevUser) {
Log.i(LOG_TAG,"App restarting"); Log.e(LOG_TAG,"App restarting, reset last login:"+resetPrevUser);
Context context=PCBcontext.getContext(); Context context=PCBcontext.getActivityContext();
Intent serialActivity = new Intent(context, com.yottacode.pictogram.tabletlibrary.gui.login.SerialActivity.class); Intent serialActivity = new Intent(context, com.yottacode.pictogram.tabletlibrary.gui.login.SerialActivity.class);
serialActivity.putExtra("resetPrevUser", direct_login); serialActivity.putExtra("resetPrevUser", resetPrevUser);
context.startActivity(serialActivity); context.startActivity(serialActivity);
} }
......
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="horizontal" android:orientation="horizontal"
......
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="horizontal" android:orientation="horizontal"
......
...@@ -14,33 +14,24 @@ ...@@ -14,33 +14,24 @@
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal" android:layout_gravity="bottom|right"
android:gravity="center" android:gravity="center"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_weight="0.18"
android:text="Powered by"
android:textAlignment="center"
android:textColor="@color/common_plus_signin_btn_text_light_default" />
<ImageView <ImageView
android:id="@+id/logo" android:id="@+id/logo"
android:layout_width="40dp" android:layout_width="80dp"
android:layout_height="40dp" android:layout_height="80dp"
android:src="@drawable/pictogram_logo" /> android:src="@drawable/pictogram_logo" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="570dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:orientation="vertical" android:orientation="vertical"
android:weightSum="1"> >
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -53,7 +44,6 @@ ...@@ -53,7 +44,6 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_weight="10.48"
android:orientation="vertical"> android:orientation="vertical">
<EditText <EditText
...@@ -102,6 +92,8 @@ ...@@ -102,6 +92,8 @@
android:layout_below="@+id/serialpass" android:layout_below="@+id/serialpass"
android:layout_gravity="right" android:layout_gravity="right"
android:layout_marginTop="25dp" android:layout_marginTop="25dp"
android:background="@color/VerdeApp"
android:textColor="@color/white"
android:text="@string/action_entrar" android:text="@string/action_entrar"
android:textStyle="bold" /> android:textStyle="bold" />
...@@ -109,20 +101,19 @@ ...@@ -109,20 +101,19 @@
<ImageView <ImageView
android:id="@+id/imageView" android:id="@+id/imageView"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:layout_alignParentTop="true" android:layout_gravity="end"
android:layout_marginLeft="30px" android:layout_marginStart="30px"
android:layout_toEndOf="@+id/serialmail" android:elevation="1dp"
android:layout_weight="1"
android:orientation="horizontal" android:orientation="horizontal"
android:src="@drawable/login_image" /> android:src="@drawable/login_image" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="570dp" android:layout_width="match_parent"
android:layout_height="160dp" android:layout_height="match_parent"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:orientation="horizontal"> android:orientation="horizontal">
...@@ -155,6 +146,8 @@ ...@@ -155,6 +146,8 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:divider="@color/common_plus_signin_btn_text_light_disabled" android:divider="@color/common_plus_signin_btn_text_light_disabled"
android:dividerHeight="1dp" android:dividerHeight="1dp"
android:fastScrollEnabled="true"
android:isScrollContainer="true"
tools:paddingBottom="@dimen/small_padding" /> tools:paddingBottom="@dimen/small_padding" />
</LinearLayout> </LinearLayout>
...@@ -166,7 +159,7 @@ ...@@ -166,7 +159,7 @@
android:layout_alignTop="@id/stuLay" android:layout_alignTop="@id/stuLay"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:layout_toEndOf="@id/stuLay" android:layout_toEndOf="@id/stuLay"
android:background="@color/common_google_signin_btn_text_dark_default" android:background="@color/common_plus_signin_btn_text_dark_pressed"
android:gravity="right" android:gravity="right"
android:orientation="vertical" android:orientation="vertical"
android:visibility="visible"> android:visibility="visible">
...@@ -180,6 +173,8 @@ ...@@ -180,6 +173,8 @@
android:textAlignment="center" android:textAlignment="center"
android:textColor="@color/BlancoApp" android:textColor="@color/BlancoApp"
android:textSize="18sp" android:textSize="18sp"
android:fastScrollEnabled="true"
android:isScrollContainer="true"
tools:text="Supervisores" /> tools:text="Supervisores" />
<ListView <ListView
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:layout_marginRight="16dp" android:layout_marginRight="16dp"
android:layout_marginBottom="0dp" android:layout_marginBottom="0dp"
android:background="@color/VerdeApp"
android:id="@+id/sessionTopbarLayout"> android:id="@+id/sessionTopbarLayout">
<ImageView <ImageView
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textStyle="normal|bold" android:textStyle="normal|bold"
android:textAlignment="center" android:textAlignment="center"
android:background="@color/common_google_signin_btn_text_light_disabled" /> android:background="@color/VerdeApp" />
<ListView <ListView
android:id="@+id/methodsListView" android:id="@+id/methodsListView"
...@@ -55,10 +55,10 @@ ...@@ -55,10 +55,10 @@
<TextView <TextView
android:text="@string/session_instruction" android:text="@string/session_instruction"
android:background="@color/VerdeApp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textStyle="normal|bold" android:textStyle="normal|bold"
android:background="@color/common_google_signin_btn_text_light_disabled"
android:textAlignment="center" /> android:textAlignment="center" />
<ListView <ListView
......
<resources> <resources>
<string name="app_name">com.yottacode.pictogram.Tablet</string> <string name="app_name">com.yottacode.pictogram.Tablet</string>
<string name="alumnos">Students</string>
<string name="supervisores">Supervisors</string>
<item name="maxInTape" type="integer">8</item> <item name="maxInTape" type="integer">8</item>
<item name="maxInTape_big" type="integer">6</item> <item name="maxInTape_big" type="integer">6</item>
...@@ -36,13 +38,13 @@ ...@@ -36,13 +38,13 @@
<string name="session_eval_discarded">discarded</string> <string name="session_eval_discarded">discarded</string>
<string name="crop">Crop</string> <string name="crop">Crop</string>
<string name="titleCropper">Edit Picto</string> <string name="titleCropper">Edit Picto</string>
<string name="croppedImageDesc">Preview</string>
<string name="cancel">Cancel</string> <string name="cancel">Cancel</string>
<string name="accept">Accept</string>
<string name="legendText">Legend</string> <string name="legendText">Legend</string>
<string name="dialogCamera">Take a Picture</string>
<string name="dialogGallery">Pick from Gallery</string> <!-- Cropper -->
<string name="dialogTitle">Choose Method</string> <string name="crop_TextRequired">Por favor, introduzca una leyenda para el pictograma</string>
<string name="dialogCancel">Cancel</string> <string name="uploadingImage">Subiendo imagen al servidor</string>
</resources> </resources>
<resources> <resources>
<string name="app_name">com.yottacode.pictogram.Tablet</string> <string name="app_name">com.yottacode.pictogram.Tablet</string>
<string name="alumnos">Estrudiantes</string>
<string name="supervisores">Supervisores</string>
<item name="maxInTape" type="integer">8</item> <item name="maxInTape" type="integer">8</item>
<item name="maxInTape_big" type="integer">6</item> <item name="maxInTape_big" type="integer">6</item>
...@@ -37,10 +39,12 @@ ...@@ -37,10 +39,12 @@
<string name="crop">Recortar</string> <string name="crop">Recortar</string>
<string name="titleCropper">Nuevo Pictograma</string> <string name="titleCropper">Nuevo Pictograma</string>
<string name="crop_TextRequired">Por favor, introduzca una leyenda para el pictograma</string> <string name="crop_TextRequired">Por favor, introduzca una leyenda para el pictograma</string>
<!-- Cropper -->
<string name="legendText">Leyenda:</string> <string name="legendText">Leyenda:</string>
<string name="dialogCamera">Hacer Foto</string>
<string name="dialogGallery">Seleccionar de Galería</string>
<string name="dialogTitle">Seleccionar Método</string>
<string name="dialogCancel">Cancelar</string>
<string name="uploadingImage">Subiendo imagen al servidor</string> <string name="uploadingImage">Subiendo imagen al servidor</string>
</resources> </resources>
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<color name="black">#FF000000</color> <color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color> <color name="white">#FFFFFFFF</color>
<color name="gray_blue">#FF78909C</color> <color name="gray_blue">#FF78909C</color>
<color name="blue_light">#FF40C4FF</color> <color name="blue_light">#40c4ff</color>
<color name="gray">#FF727272</color> <color name="gray">#FF727272</color>
......
...@@ -38,27 +38,12 @@ ...@@ -38,27 +38,12 @@
<string name="session_eval_discarded">inválido</string> <string name="session_eval_discarded">inválido</string>
<!-- Dialog for add new picto -->
<string name="dialogTitle">Seleccionar método</string>
<string name="dialogCamera">Hacer Foto</string>
<string name="dialogGallery">Seleccionar de Galería</string>
<string name="dialogCancel">Cancelar</string>
<!-- Cropper --> <!-- Cropper -->
<string name="legendText">Leyenda:</string> <string name="legendText">Leyenda:</string>
<string name="fixedAspectRatio">fixedAspectRatio =\u0020</string>
<string name="aspectRatioXHeader">aspectRatioX =\u0020</string>
<string name="aspectRatioYHeader">aspectRatioY =\u0020</string>
<string name="showGuidelines">showGuidelines =\u0020</string>
<string name="crop">Recortar</string> <string name="crop">Recortar</string>
<string name="titleCropper">Nuevo Pictograma</string> <string name="titleCropper">Nuevo Pictograma</string>
<string name="crop_TextRequired">Por favor, introduzca una leyenda para el pictograma</string> <string name="crop_TextRequired">Por favor, introduzca una leyenda para el pictograma</string>
<string name="uploadingImage">Subiendo imagen al servidor</string> <string name="uploadingImage">Subiendo imagen al servidor</string>
<string-array name="showGuidelinesArray">
<item>Off</item>
<item>On Touch</item>
<item>On</item>
</string-array>
</resources> </resources>
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
<facet type="android" name="Android"> <facet type="android" name="Android">
<configuration> <configuration>
<option name="SELECTED_BUILD_VARIANT" value="debug" /> <option name="SELECTED_BUILD_VARIANT" value="debug" />
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" /> <option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" /> <option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
<afterSyncTasks> <afterSyncTasks>
...@@ -20,7 +19,7 @@ ...@@ -20,7 +19,7 @@
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" /> <option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" /> <option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" /> <option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
<option name="LIBRARY_PROJECT" value="true" /> <option name="PROJECT_TYPE" value="1" />
</configuration> </configuration>
</facet> </facet>
</component> </component>
...@@ -47,7 +46,6 @@ ...@@ -47,7 +46,6 @@
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
...@@ -55,7 +53,6 @@ ...@@ -55,7 +53,6 @@
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
...@@ -63,7 +60,6 @@ ...@@ -63,7 +60,6 @@
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
...@@ -71,7 +67,6 @@ ...@@ -71,7 +67,6 @@
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
...@@ -79,23 +74,12 @@ ...@@ -79,23 +74,12 @@
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotations" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotations" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/24.2.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/24.2.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-compat/24.2.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-core-ui/24.2.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-core-utils/24.2.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-fragment/24.2.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-media-compat/24.2.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/24.2.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/24.2.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
...@@ -106,48 +90,47 @@ ...@@ -106,48 +90,47 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/typedefs.txt" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" /> <excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" /> <excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content> </content>
<orderEntry type="jdk" jdkName="Android API 24 Platform" jdkType="Android SDK" /> <orderEntry type="jdk" jdkName="Android API 24 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="support-annotations-24.2.1" level="project" />
<orderEntry type="library" exported="" name="support-v4-24.2.1" level="project" /> <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-compat-24.2.1" level="project" />
<orderEntry type="library" exported="" name="support-media-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="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="support-fragment-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="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="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-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="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="module" module-name="commonlibrary" exported="" />
<orderEntry type="library" exported="" name="android-android-24" level="project" /> <orderEntry type="library" exported="" name="android-android-24" level="project" />
<orderEntry type="library" exported="" name="okhttp-ws-2.3.0" level="project" /> <orderEntry type="library" exported="" name="okhttp-ws-2.3.0" level="project" />
<orderEntry type="library" exported="" name="play-services-base-9.2.1" level="project" />
<orderEntry type="library" exported="" name="socket.io-client-0.5.0" level="project" /> <orderEntry type="library" exported="" name="socket.io-client-0.5.0" level="project" />
<orderEntry type="library" exported="" name="okhttp-2.3.0" level="project" /> <orderEntry type="library" exported="" name="okhttp-2.3.0" 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="support-v4-23.0.0" level="project" />
<orderEntry type="library" exported="" name="support-annotations-23.0.0" level="project" /> <orderEntry type="library" exported="" name="support-annotations-23.0.0" level="project" />
<orderEntry type="library" exported="" name="okio-1.3.0" level="project" /> <orderEntry type="library" exported="" name="okio-1.3.0" 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="play-services-gass-9.2.1" level="project" />
<orderEntry type="library" exported="" name="gson-2.3" level="project" /> <orderEntry type="library" exported="" name="gson-2.3" level="project" />
<orderEntry type="library" exported="" name="play-services-iid-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="engine.io-client-0.5.0" level="project" /> <orderEntry type="library" exported="" name="engine.io-client-0.5.0" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-21.0.3" level="project" /> <orderEntry type="library" exported="" name="appcompat-v7-21.0.3" level="project" />
<orderEntry type="library" exported="" name="play-services-auth-9.2.1" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="hamcrest-core-1.3" level="project" /> <orderEntry type="library" exported="" scope="TEST" name="hamcrest-core-1.3" level="project" />
<orderEntry type="library" exported="" name="play-services-ads-9.2.1" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="junit-4.12" level="project" /> <orderEntry type="library" exported="" scope="TEST" name="junit-4.12" level="project" />
<orderEntry type="library" exported="" name="ion-2.1.9" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="json-20090211" level="project" /> <orderEntry type="library" exported="" scope="TEST" name="json-20090211" level="project" />
<orderEntry type="library" exported="" name="play-services-ads-lite-9.2.1" level="project" />
</component> </component>
</module> </module>
\ No newline at end of file
...@@ -18,8 +18,9 @@ android { ...@@ -18,8 +18,9 @@ android {
targetSdkVersion 22 targetSdkVersion 22
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
resValue "string","SerialClass","com.yottacode.pictogram.tabletlibrary.gui.login.SerialActivity" resValue "bool","NotifyAllwaysVisible","true"
resValue "string","apk","pictogram.apk" resValue "string","apk","pictogram.apk"
resValue "string", "VersionManagerClass", "com.yottacode.pictogram.yotta_tablet.net.com.yottacode.pictogram.yotta_tablet.net.VersionManager"
// signingConfig signingConfigs.config // signingConfig signingConfigs.config
} }
productFlavors { productFlavors {
...@@ -28,12 +29,14 @@ android { ...@@ -28,12 +29,14 @@ android {
resValue "bool", "ssl_connect", "false" resValue "bool", "ssl_connect", "false"
} }
DevFlavor { DevFlavor {
resValue "string", "server", "https://dev.yottacode.com" resValue "string", "server", "https://dev.pictogramweb.com"
resValue "bool", "ssl_connect", "false" resValue "bool", "ssl_connect", "false"
resValue "string","apk","pictogram_dev.apk"
} }
PreFlavor { PreFlavor {
resValue "string", "server", "https://pre.yottacode.com" resValue "string", "server", "https://apk.pictogramweb.com"
resValue "bool", "ssl_connect", "true" resValue "bool", "ssl_connect", "true"
resValue "string","apk","pictogram.apk"
} }
LocalFlavor { LocalFlavor {
resValue "string", "server", "http://192.168.1.35:1337" resValue "string", "server", "http://192.168.1.35:1337"
......
package com.yottacode.pictogram.yotta_tablet.kiosk; package com.yottacode.pictogram.yotta_tablet.kiosk;
import android.app.ActivityManager; import android.app.ActivityManager;
import android.app.NotificationManager;
import android.app.Service; import android.app.Service;
import android.content.ComponentName; import android.content.ComponentName;
import android.content.Context; import android.content.Context;
...@@ -39,6 +40,9 @@ public class KioskService extends Service { ...@@ -39,6 +40,9 @@ public class KioskService extends Service {
public void onDestroy() { public void onDestroy() {
Log.i(TAG, "Stopping service 'KioskService'"); Log.i(TAG, "Stopping service 'KioskService'");
running =false; running =false;
NotificationManager mNotificationManager =
(NotificationManager)this.getBaseContext().getSystemService(this.getBaseContext().NOTIFICATION_SERVICE);
mNotificationManager.cancel(666);
super.onDestroy(); super.onDestroy();
} }
......
package com.yottacode.pictogram.yotta_tablet.net.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 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)
+ "/" + fileName;
destination += fileName;
final Uri uri = Uri.parse("file://" + 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 compete
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(version);
}
}
, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
}
}
...@@ -2,5 +2,8 @@ ...@@ -2,5 +2,8 @@
<resources> <resources>
<string name="app_name">Pictogram Tablet</string> <string name="app_name">Pictogram Tablet</string>
<string name="ilegal_user">There is not any supervisor named</string> <string name="ilegal_user">There is not any supervisor named</string>
<string name="new_version_detail">Pulse OK para proceder con la instalación</string>
<string name="new_version_downloading">Please wait, downloading new version </string>
</resources> </resources>
...@@ -2,5 +2,8 @@ ...@@ -2,5 +2,8 @@
<resources> <resources>
<string name="app_name">Pictogram Tablet</string> <string name="app_name">Pictogram Tablet</string>
<string name="ilegal_user"> No existe ningún supervisor </string> <string name="ilegal_user"> No existe ningún supervisor </string>
<string name="new_version_detail">Pulse OK para proceder con la instalación</string>
<string name="new_version_downloading">Por favor espere, descargando nueva versión </string>
</resources> </resources>
...@@ -2,4 +2,7 @@ ...@@ -2,4 +2,7 @@
<resources> <resources>
<string name="app_name">Pictogram Tablet</string> <string name="app_name">Pictogram Tablet</string>
<string name="ilegal_user">There is not any supervisor named</string> <string name="ilegal_user">There is not any supervisor named</string>
<string name="new_version_detail">Pulse OK para proceder con la instalación</string>
<string name="new_version_downloading">Por favor espere, descargando nueva versión </string>
</resources> </resources>
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