soporte a entrega por picto pulsado

bug con android 7 solucionado
logos e imagen de login reescalados
parent 8e4a32f1
...@@ -36,7 +36,7 @@ public class User { ...@@ -36,7 +36,7 @@ public class User {
static String TTS_ENGINE = "tts engine"; static String TTS_ENGINE = "tts engine";
static String TTS_VOICE = "tts voice"; static String TTS_VOICE = "tts voice";
static String DELIVERY = "delivery"; static String DELIVERY = "delivery";
static String DELIVERY_EACH_PICTO = "delivery_each_picto"; static String DELIVERY_EACH_PICTO = "one_picto_delivery";
} }
public final static class JSON_STUDENT_INPUT_FEEDBACK { public final static class JSON_STUDENT_INPUT_FEEDBACK {
public static String VIBRATION="vibration"; public static String VIBRATION="vibration";
...@@ -256,9 +256,7 @@ public class User { ...@@ -256,9 +256,7 @@ public class User {
return this.id_scene_stu; return this.id_scene_stu;
} }
public void set_active_scene(int id) {
this.id_scene_stu = id;
}
/** /**
* *
* @return input feedback of the student configuration (default: "vibration") * @return input feedback of the student configuration (default: "vibration")
......
...@@ -31,7 +31,7 @@ public class StudentTalk implements Emitter.Listener { ...@@ -31,7 +31,7 @@ public class StudentTalk implements Emitter.Listener {
if (PCBcontext.getPcbdb()!=null) if (PCBcontext.getPcbdb()!=null)
try { try {
JSONObject msg=((JSONObject) args[0]).getJSONObject("student"); JSONObject msg=((JSONObject) args[0]).getJSONObject("student");
Log.d(this.getClass().getName(), "raw Received message " +msg.toString()); Log.d(this.getClass().getName(), "Raw message: " +msg.toString());
int id=msg.getInt("id"); int id=msg.getInt("id");
String username=msg.getString("username"); String username=msg.getString("username");
String name=msg.getString("name"); String name=msg.getString("name");
...@@ -43,7 +43,7 @@ public class StudentTalk implements Emitter.Listener { ...@@ -43,7 +43,7 @@ public class StudentTalk implements Emitter.Listener {
String attributes=msg.getString("attributes"); String attributes=msg.getString("attributes");
JSONObject license= msg.getJSONObject("license"); JSONObject license= msg.getJSONObject("license");
Log.e("STUDENT","change...remove license in hard when lincense is not null:"+license.toString());
User user=PCBcontext.getPcbdb().getCurrentUser(); User user=PCBcontext.getPcbdb().getCurrentUser();
......
...@@ -36,7 +36,10 @@ public class PictoAnimation { ...@@ -36,7 +36,10 @@ public class PictoAnimation {
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();
RelativeLayout relativeLayout = (RelativeLayout) (gridview.getChildAt(position)); RelativeLayout relativeLayout = (RelativeLayout) (gridview.getChildAt(position));
FrameLayout layout = (FrameLayout) (relativeLayout.getChildAt(0)); FrameLayout layout = (FrameLayout) (relativeLayout.getChildAt(0));
final ImageView v = (ImageView) (layout.getChildAt(0)); final ImageView v = (ImageView) (layout.getChildAt(0));
final int orange = ContextCompat.getColor(PCBcontext.getContext(), R.color.red); final int orange = ContextCompat.getColor(PCBcontext.getContext(), R.color.red);
......
...@@ -12,6 +12,7 @@ import android.media.RingtoneManager; ...@@ -12,6 +12,7 @@ import android.media.RingtoneManager;
import android.net.Uri; import android.net.Uri;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler;
import android.speech.tts.UtteranceProgressListener; import android.speech.tts.UtteranceProgressListener;
import android.util.DisplayMetrics; import android.util.DisplayMetrics;
import android.util.Log; import android.util.Log;
...@@ -325,7 +326,6 @@ public class VOCA extends Activity implements VocabularyTalk.iVocabularyListener ...@@ -325,7 +326,6 @@ public class VOCA extends Activity implements VocabularyTalk.iVocabularyListener
this.feedback_read = PCBcontext.getPcbdb().getCurrentUser().input_feedback_on(User.JSON_STUDENT_INPUT_FEEDBACK.READ); this.feedback_read = PCBcontext.getPcbdb().getCurrentUser().input_feedback_on(User.JSON_STUDENT_INPUT_FEEDBACK.READ);
this.feedback_highlight = PCBcontext.getPcbdb().getCurrentUser().input_feedback_on(User.JSON_STUDENT_INPUT_FEEDBACK.HIGHLIGHT); this.feedback_highlight = PCBcontext.getPcbdb().getCurrentUser().input_feedback_on(User.JSON_STUDENT_INPUT_FEEDBACK.HIGHLIGHT);
Log.i(this.getClass().getCanonicalName(), "Feedback:" + " vibration:" + vibration + " Beep:" + click + " Read:" + feedback_read + " Highlight:" + feedback_highlight);
View.OnTouchListener touchListener; View.OnTouchListener touchListener;
touchListener = touchListener =
...@@ -828,9 +828,16 @@ public class VOCA extends Activity implements VocabularyTalk.iVocabularyListener ...@@ -828,9 +828,16 @@ public class VOCA extends Activity implements VocabularyTalk.iVocabularyListener
} else if (tapeAdapter.getCount() < VOCA.this.maxInTape && !VOCA.this.tapeAdapter.play()) { } else if (tapeAdapter.getCount() < VOCA.this.maxInTape && !VOCA.this.tapeAdapter.play()) {
addPictoWord(parent.getChildAt(position), p); addPictoWord(parent.getChildAt(position), p);
if (PCBcontext.getPcbdb().getCurrentUser().one_picto_delivery()) {
(new Handler()).postDelayed(new Runnable() {
@Override
public void run() {
ttsButton.performClick();
}
}, 500);
}
} }
if (PCBcontext.getPcbdb().getCurrentUser().one_picto_delivery())
ttsButton.performClick();
} }
} }
...@@ -953,13 +960,11 @@ public class VOCA extends Activity implements VocabularyTalk.iVocabularyListener ...@@ -953,13 +960,11 @@ public class VOCA extends Activity implements VocabularyTalk.iVocabularyListener
*/ */
protected void showOnlyTape(boolean onlyTape) { protected void showOnlyTape(boolean onlyTape) {
boolean tape_delivered_prev = this.tape_delivered; boolean tape_delivered_prev = this.tape_delivered;
Log.e(LOG_TAG, "ONLY TAPE->" + onlyTape + " " + ttsButton.isEnabled());
this.tape_delivered = onlyTape; this.tape_delivered = onlyTape;
if (onlyTape) { if (onlyTape) {
if (!tape_delivered_prev) { if (!tape_delivered_prev) {
if (PCBcontext.getPcbdb().getCurrentUser().delivery() == User.JSON_STUDENT_ATTTRS.delivery.one) if (PCBcontext.getPcbdb().getCurrentUser().delivery() == User.JSON_STUDENT_ATTTRS.delivery.one)
ttsButton.setEnabled(false); ttsButton.setEnabled(false);
Log.e(LOG_TAG, "ONLY TAPE0->" + onlyTape + " " + ttsButton.isEnabled());
if (this.pictoMainGridView.getAnimation() != this.hidePictoMainViewAnimation) { if (this.pictoMainGridView.getAnimation() != this.hidePictoMainViewAnimation) {
this.showPictoCategoriesViewButton.setVisibility(View.INVISIBLE); this.showPictoCategoriesViewButton.setVisibility(View.INVISIBLE);
this.pictoCategoryGridView.setVisibility(View.INVISIBLE); this.pictoCategoryGridView.setVisibility(View.INVISIBLE);
...@@ -976,7 +981,6 @@ public class VOCA extends Activity implements VocabularyTalk.iVocabularyListener ...@@ -976,7 +981,6 @@ public class VOCA extends Activity implements VocabularyTalk.iVocabularyListener
} else { } else {
ttsButton.setEnabled(true); ttsButton.setEnabled(true);
ttsButton.refreshDrawableState(); ttsButton.refreshDrawableState();
Log.e(LOG_TAG, "ONLY TAPE1->" + onlyTape + " " + ttsButton.isEnabled());
new PictoAnimation().animateTapeViewVertical(this, true); new PictoAnimation().animateTapeViewVertical(this, true);
if (this.pictoMainGridView.getAnimation() != this.hidePictoMainViewAnimation) { if (this.pictoMainGridView.getAnimation() != this.hidePictoMainViewAnimation) {
this.showPictoCategoriesViewButton.setVisibility(View.VISIBLE); this.showPictoCategoriesViewButton.setVisibility(View.VISIBLE);
......
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