refactorizando paquete gui (hay que revisar pictogramActivity)

implementada funcionalidad "entrega de tira"
parent 7814333b
Showing with 88 additions and 88 deletions
......@@ -26,7 +26,7 @@
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity
android:name="com.yottacode.pictogram.tabletlibrary.gui.SplashScreenActivity"
android:name="com.yottacode.pictogram.tabletlibrary.gui.login.SplashScreenActivity"
android:label="@string/app_name"
android:screenOrientation="landscape">
<intent-filter>
......@@ -36,7 +36,7 @@
</intent-filter>
</activity>
<activity
android:name="com.yottacode.pictogram.tabletlibrary.gui.MainActivity"
android:name="com.yottacode.pictogram.tabletlibrary.gui.login.MainActivity"
android:label="@string/app_name"
android:screenOrientation="landscape" />
<activity
......@@ -44,12 +44,12 @@
android:label="@string/title_activity_serial"
android:screenOrientation="landscape" />
<activity
android:name="com.yottacode.pictogram.tabletlibrary.gui.LoginActivity"
android:name="com.yottacode.pictogram.tabletlibrary.gui.login.LoginActivity"
android:exported="true"
android:label="@string/title_activity_login_activity_fragments"
android:screenOrientation="landscape" />
<activity
android:name="com.yottacode.pictogram.tabletlibrary.gui.PictogramActivity"
android:name="com.yottacode.pictogram.tabletlibrary.gui.communicator.PictogramActivity"
android:exported="true"
android:label="@string/app_name"
android:launchMode="singleTop"
......
......@@ -3,7 +3,7 @@ package com.yottacode.pictogram.supervisor_tablet.gui;
import android.app.Activity;
import com.yottacode.pictogram.supervisor_tablet.R;
import com.yottacode.pictogram.tabletlibrary.gui.SerialActivity;
import com.yottacode.pictogram.tabletlibrary.gui.login.SerialActivity;
import com.yottacode.tools.GUITools;
/**
......
......@@ -8,7 +8,7 @@ android {
targetSdkVersion 22
versionCode 1
versionName "1.0"
resValue "string", "SerialClass", "com.yottacode.pictogram.tabletlibrary.gui.SerialActivity"
resValue "string", "SerialClass", "com.yottacode.pictogram.tabletlibrary.gui.login.SerialActivity"
resValue "integer", "rows", "5"
resValue "integer", "columns", "10"
resValue "integer", "rows_big", "4"
......
package com.yottacode.pictogram.tabletlibrary.gui;
package com.yottacode.pictogram.tabletlibrary.gui.communicator;
import android.view.View;
import android.view.ViewGroup;
......
package com.yottacode.pictogram.tabletlibrary.gui;
package com.yottacode.pictogram.tabletlibrary.gui.communicator;
import android.content.Context;
import android.graphics.Bitmap;
......@@ -180,26 +180,24 @@ public class PictoItemViewGenerator {
pictoImage = (ImageView) convertView.findViewById(R.id.picto_grid_item_image);
redCrossImage = (ImageView) convertView.findViewById(R.id.picto_grid_item_redcross);
}
layoutWrapper.setVisibility(View.GONE);
layoutWrapper.setBackground(null);
layoutWrapper.setAlpha(0.25f);
layoutWrapper.setAlpha(PCBcontext.getPcbdb().getCurrentUser().is_supervisor() ? 0.25f : 0);
layout.setBackgroundColor(convertView.getResources()
.getColor(R.color.picto_default_background));
redCrossImage.setVisibility(View.GONE);
pictoImage.setScaleX(1.0f);
pictoImage.setScaleY(1.0f);
pictoImage.setVisibility(View.GONE);
// pictoImage.setVisibility(View.GONE);
// layoutWrapper.setVisibility(View.GONE);
if (picto == null) {
if (PCBcontext.getPcbdb().getCurrentUser().is_supervisor()) {
layoutWrapper.setVisibility(View.VISIBLE);
pictoImage.setImageBitmap(null);
if (PCBcontext.getPcbdb().getCurrentUser().is_supervisor()) {
layoutWrapper.setBackground(convertView.getResources()
.getDrawable(R.drawable.picto_grid_item_border));
}
.getDrawable(R.drawable.picto_grid_item_border));
}
} else {
if (!picto.is_invisible()) {
layoutWrapper.setAlpha(1.00f);
}
if (!picto.is_invisible()) {
layoutWrapper.setAlpha(1.00f);
}
try {
......
package com.yottacode.pictogram.tabletlibrary.gui;
package com.yottacode.pictogram.tabletlibrary.gui.communicator;
import android.animation.Animator;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.annotation.TargetApi;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.ClipData;
......@@ -17,6 +18,7 @@ import android.graphics.PorterDuff;
import android.media.Ringtone;
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.provider.MediaStore;
import android.speech.tts.UtteranceProgressListener;
......@@ -59,6 +61,7 @@ import com.yottacode.pictogram.net.PictoUploader;
import com.yottacode.pictogram.net.websockets.ActionTalk;
import com.yottacode.pictogram.net.websockets.VocabularyTalk;
import com.yottacode.pictogram.tabletlibrary.R;
import com.yottacode.pictogram.tabletlibrary.gui.login.SerialActivity;
import com.yottacode.pictogram.tabletlibrary.gui.session.SessionActivity;
import com.yottacode.pictogram.tabletlibrary.net.NetServiceTablet;
import com.yottacode.pictogram.tools.Img;
......@@ -132,8 +135,10 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
private RadialMenuWidget PieMenu;
private ImageView detail;
private RelativeLayout ll;
private boolean tape_delivered=false;
@TargetApi(Build.VERSION_CODES.M)
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
......@@ -283,7 +288,6 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
startTTS();
setFeedback(new View[]{deleteButton, ttsButton, this.showPictoCategoriesViewButton, this.pictoCategoryGridView, this.pictoMainGridView});
}
private void setFeedback(View views[]) {
boolean vibration = PCBcontext.getPcbdb().getCurrentUser().input_feedback_on(User.JSON_STUDENT_INPUT_FEEDBACK.VIBRATION);
boolean click = PCBcontext.getPcbdb().getCurrentUser().input_feedback_on(User.JSON_STUDENT_INPUT_FEEDBACK.BEEP);
......@@ -298,7 +302,6 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
@Override
public boolean onTouch(View v, MotionEvent event) {
boolean enable_haptic;
enable_haptic = !(v instanceof GridView);
if (!enable_haptic) {
int x = Math.round(event.getX());
......@@ -452,7 +455,6 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
* if necesary.
*/
private void showPictoMainGridView() {
Log.d(LOG_TAG, "Showing pictoMainGridView");
this.pictoMainGridAdapter.clear();
this.pictoMainGridAdapter.addAll(this.sort(this.vocabulary.startSentence()));
......@@ -472,16 +474,16 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
* Hides the main category grid view and show a concrete category (this.currentCategory)
*/
private void hidePictoMainGridView() {
Log.d(LOG_TAG, "Hiding pictoMainGridView");
this.pictoCategoryGridAdapter.clear();
this.pictoCategoryGridAdapter.addAll(this.sort(this.vocabulary.next(this.currentCategory)));
this.pictoCategoryGridAdapter.notifyDataSetChanged();
if (!tape_delivered) {
this.pictoCategoryGridAdapter.clear();
this.pictoCategoryGridAdapter.addAll(this.sort(this.vocabulary.next(this.currentCategory)));
this.pictoCategoryGridAdapter.notifyDataSetChanged();
if (this.currentCategory.get_color() != -1) {
this.pictoCategoryGridView.setBackgroundColor(this.currentCategory.get_color());
if (this.currentCategory.get_color() != -1) {
this.pictoCategoryGridView.setBackgroundColor(this.currentCategory.get_color());
}
}
this.pictoMainGridView.setEnabled(false);
this.pictoCategoryGridView.setEnabled(true);
......@@ -537,10 +539,8 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
*/
for (int i = 0; i < maxRows; i++) {
for (int j = 0; j < maxColumns; j++) {
if (mp[i][j] != null) ll.add(mp[i][j]);
else ll.add(null); // Add the "blank picto" simulating an empty position
}
for (int j = 0; j < maxColumns; j++)
ll.add(mp[i][j]);
}
} catch (Exception e) {
e.printStackTrace();
......@@ -708,8 +708,6 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
* Class used for dragging pictos to the tape
*/
private class OnPictoDragListener implements View.OnDragListener {
//Drawable normalShape = getResources().getDrawable(R.drawable.normal_shape);
//Drawable targetShape = getResources().getDrawable(R.drawable.target_shape);
@Override
public boolean onDrag(View v, DragEvent event) {
......@@ -719,24 +717,20 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
//signal for the start of a drag and drop operation.
case DragEvent.ACTION_DRAG_STARTED:
// do nothing
Log.d("Drag:", "1 Drag started");
break;
//the drag point has entered the bounding box of the View
case DragEvent.ACTION_DRAG_ENTERED:
//v.setBackground(targetShape); //change the shape of the view
Log.d("Drag:", "2 Drag entered");
break;
//the user has moved the drag shadow outside the bounding box of the View
case DragEvent.ACTION_DRAG_EXITED:
//v.setBackground(normalShape); //change the shape of the view back to normal
Log.d("Drag:", "3 Drag exited");
break;
//drag shadow has been released,the drag point is within the bounding box of the View
case DragEvent.ACTION_DROP:
Log.d("Drag:", "4 Drop");
View view = (View) event.getLocalState();
ViewGroup viewgroup = (ViewGroup) view.getParent();
......@@ -746,7 +740,6 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
// if the view is the tape_grid_view, we accept the drag item
// Destino tape_grid_view y origen panel_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)
: pictoMainGridAdapter.getItem(position);
Log.d("Drag:", "Posición: " + position + " es categoria:" + p.is_category());
......@@ -755,7 +748,6 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
// Si el destino es el panel y el origen la cinta de frase
else if (v == findViewById(R.id.picto_category_grid_view) && viewgroup == findViewById(R.id.tape_grid_view)) {
Log.d("Drag:", "Posición: " + position);
Picto p = tapeAdapter.getItem(position);
tapeAdapter.deleteItem(position);
tapeAdapter.notifyDataSetChanged();
......@@ -765,27 +757,24 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
//the drag and drop operation has concluded.
case DragEvent.ACTION_DRAG_ENDED:
Log.d("Drag:", "5 Drag ended");
// v.setBackground(normalShape); //go back to normal shape
default:
break;
}
return true;
return false;
}
}
/**
/**f
* Class used for picto clicking feedback
*/
private class OnPictoClickListener implements AdapterView.OnItemClickListener {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Picto p = getCurrentPictoGridAdapter().getItem(position);
Log.e("clicklistener",p+(p==null ? "NULL" : p.toString()+" "+p.get_row()));
if (p != null && p.get_id() != 0 && !p.is_invisible() && p.is_enabled()) {
Log.d(LOG_TAG, "Clic en picto: " + p.toString());
p.set_mirror(false, false);
// If the picto is a category
......@@ -797,9 +786,10 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
} else if (tapeAdapter.getCount() < PictogramActivity.this.maxInTape) {
addPictoWord(p);
}
} else if (p==null && tapeAdapter.getCount()>0) {
tapeAdapter.endPlay();
showPictoMainGridView();
}
if (tape_delivered) {
tapeAdapter.clear();
showOnlyTape(false);
}
}
}
......@@ -924,15 +914,15 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
}
}
private void showOnlyTape(boolean onlyTape) {
private void showOnlyTape(boolean onlyTape) { Log.e("EEEE","e"+onlyTape);
this.tape_delivered=onlyTape;
if (onlyTape) {
if (this.pictoMainGridView.getAnimation() != this.hidePictoMainViewAnimation)
this.pictoMainGridView.startAnimation(this.hidePictoMainViewAnimation);
hidePictoMainGridView();
this.pictoCategoryGridAdapter.clear();
this.pictoCategoryGridView.setBackgroundColor(Color.LTGRAY);
this.showPictoCategoriesViewButton.setVisibility(View.GONE);
this.pictoCategoryGridAdapter.addAll(this.sort(null));
this.pictoCategoryGridAdapter.notifyDataSetChanged();
this.pictoCategoryGridView.setBackgroundColor(Color.GRAY);
this.showPictoCategoriesViewButton.setVisibility(View.GONE);
}
else {
this.showPictoCategoriesViewButton.setVisibility(View.VISIBLE);
......@@ -957,6 +947,7 @@ private void showOnlyTape(boolean onlyTape) {
tapeAdapter.deleteLastView();
tapeAdapter.notifyDataSetChanged();
}
if (!tapeAdapter.hasElements() && tape_delivered) showOnlyTape(false);
}
}
......@@ -1169,7 +1160,6 @@ private void showOnlyTape(boolean onlyTape) {
Intent nextActivity=null;
Intent intent =getIntent();
boolean student_view=intent.getBooleanExtra("student_view",false);
if (PCBcontext.getPcbdb()!=null && (PCBcontext.getPcbdb().getCurrentUser().is_supervisor() || student_view)) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
......@@ -1207,6 +1197,7 @@ private void showOnlyTape(boolean onlyTape) {
break;
}
}
return super.dispatchTouchEvent(event);
}
......
package com.yottacode.pictogram.tabletlibrary.gui;
package com.yottacode.pictogram.tabletlibrary.gui.communicator;
import android.annotation.TargetApi;
......@@ -67,10 +67,13 @@ public class TapeAdapter extends BaseAdapter {
// ELIMINAR TODOS LOS ITEMS DEL ADAPTADOR
public void endPlay() {
if (PCBcontext.getPcbdb().getCurrentUser().delete_tape_after_delivery())
pictoLinkedList.clear();
clear();
play = false;
}
public void clear() {
pictoLinkedList.clear();
}
// DEVUELVE TODOS LOS ELEMENTOS
public LinkedList<Picto> getAll() {
return pictoLinkedList;
......
package com.yottacode.pictogram.tabletlibrary.gui;
package com.yottacode.pictogram.tabletlibrary.gui.communicator;
import android.content.Context;
import android.util.Log;
......
package com.yottacode.pictogram.tabletlibrary.gui;
package com.yottacode.pictogram.tabletlibrary.gui.login;
import android.app.Activity;
import android.graphics.Bitmap;
......
package com.yottacode.pictogram.tabletlibrary.gui;
package com.yottacode.pictogram.tabletlibrary.gui.login;
import android.app.Activity;
import android.graphics.Bitmap;
......
package com.yottacode.pictogram.tabletlibrary.gui;
package com.yottacode.pictogram.tabletlibrary.gui.login;
import android.annotation.TargetApi;
import android.content.Intent;
......@@ -15,6 +15,7 @@ import android.widget.TextView;
import com.yottacode.pictogram.net.ImgDownloader;
import com.yottacode.pictogram.tabletlibrary.R;
import com.yottacode.pictogram.tabletlibrary.gui.login.SerialActivity;
import com.yottacode.pictogram.tools.Img;
import com.yottacode.pictogram.tools.PCBcontext;
import com.yottacode.tools.GUITools;
......
package com.yottacode.pictogram.tabletlibrary.gui;
package com.yottacode.pictogram.tabletlibrary.gui.login;
import android.app.Activity;
import android.content.Intent;
......@@ -10,6 +10,7 @@ import android.view.Window;
import android.view.WindowManager;
import com.yottacode.pictogram.tabletlibrary.R;
import com.yottacode.pictogram.tabletlibrary.gui.login.SerialActivity;
import com.yottacode.pictogram.tools.PCBcontext;
public class MainActivity extends Activity {
......
package com.yottacode.pictogram.tabletlibrary.gui;
package com.yottacode.pictogram.tabletlibrary.gui.login;
import android.app.Activity;
import android.content.Context;
......@@ -20,6 +20,9 @@ import android.widget.ListView;
import com.yottacode.pictogram.dao.User;
import com.yottacode.pictogram.dao.UserLogin;
import com.yottacode.pictogram.tabletlibrary.R;
import com.yottacode.pictogram.tabletlibrary.gui.communicator.PictogramActivity;
import com.yottacode.pictogram.tabletlibrary.gui.login.CustomListLogin;
import com.yottacode.pictogram.tabletlibrary.gui.login.LoginActivity;
import com.yottacode.pictogram.tabletlibrary.net.NetServiceTablet;
import com.yottacode.pictogram.tools.PCBcontext;
......
package com.yottacode.pictogram.tabletlibrary.gui;
package com.yottacode.pictogram.tabletlibrary.gui.login;
import android.app.Fragment;
import android.app.ProgressDialog;
......@@ -17,6 +17,7 @@ import com.yottacode.net.RestapiWrapper;
import com.yottacode.pictogram.dao.User;
import com.yottacode.pictogram.net.ImgDownloader;
import com.yottacode.pictogram.tabletlibrary.R;
import com.yottacode.pictogram.tabletlibrary.gui.communicator.PictogramActivity;
import com.yottacode.pictogram.tools.Img;
import com.yottacode.pictogram.tools.PCBcontext;
import com.yottacode.tools.GUITools;
......
......@@ -15,7 +15,7 @@ import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import com.yottacode.pictogram.tabletlibrary.gui.PictogramActivity;
import com.yottacode.pictogram.tabletlibrary.gui.communicator.PictogramActivity;
import com.yottacode.pictogram.tabletlibrary.net.SessionWrapper;
import com.yottacode.pictogram.tabletlibrary.R;
import com.yottacode.pictogram.tools.PCBcontext;
......
......@@ -21,7 +21,7 @@ import android.widget.ToggleButton;
import com.yottacode.pictogram.dao.User;
import com.yottacode.pictogram.net.NetService;
import com.yottacode.pictogram.tabletlibrary.R;
import com.yottacode.pictogram.tabletlibrary.gui.PictogramActivity;
import com.yottacode.pictogram.tabletlibrary.gui.communicator.PictogramActivity;
import com.yottacode.pictogram.tabletlibrary.net.SessionWrapper;
import com.yottacode.pictogram.tools.PCBcontext;
import com.yottacode.tools.GUITools;
......
......@@ -8,8 +8,8 @@ import android.util.Log;
import com.yottacode.pictogram.dao.User;
import com.yottacode.pictogram.net.NetService;
import com.yottacode.pictogram.tabletlibrary.R;
import com.yottacode.pictogram.tabletlibrary.gui.PictogramActivity;
import com.yottacode.pictogram.tabletlibrary.gui.SerialActivity;
import com.yottacode.pictogram.tabletlibrary.gui.communicator.PictogramActivity;
import com.yottacode.pictogram.tabletlibrary.gui.login.SerialActivity;
import com.yottacode.pictogram.tools.PCBcontext;
/**
......
......@@ -3,7 +3,7 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
tools:context="com.yottacode.pictogram.tabletlibrary.gui.LoginActivity">
tools:context="com.yottacode.pictogram.tabletlibrary.gui.login.LoginActivity">
<RelativeLayout
android:layout_width="match_parent"
......@@ -82,7 +82,7 @@
<fragment
android:layout_width="wrap_content"
android:layout_height="wrap_content"
class="com.yottacode.pictogram.tabletlibrary.gui.StudentFragmentGrid"
class="com.yottacode.pictogram.tabletlibrary.gui.login.StudentFragmentGrid"
android:id="@+id/loginStudentGrid"
android:layout_gravity="center"
tools:layout="@layout/fragment_new_student" />
......
......@@ -6,7 +6,7 @@
android:background="#BDBDBD"
android:keepScreenOn="true"
android:id="@+id/pictogramLayout"
tools:context="com.yottacode.pictogram.tabletlibrary.gui.PictogramActivity"
tools:context="com.yottacode.pictogram.tabletlibrary.gui.communicator.PictogramActivity"
android:padding="@dimen/small_padding">
<!-- android:keepScreenOn - To keep the screen bright as long as the app is visible (also forever) -->
......
......@@ -6,7 +6,7 @@
android:background="#BDBDBD"
android:keepScreenOn="true"
android:id="@+id/pictogramLayout"
tools:context="com.yottacode.pictogram.tabletlibrary.gui.PictogramActivity"
tools:context="com.yottacode.pictogram.tabletlibrary.gui.communicator.PictogramActivity"
android:padding="@dimen/small_padding">
<!-- android:keepScreenOn - To keep the screen bright as long as the app is visible (also forever) -->
......
......@@ -5,7 +5,7 @@
android:paddingLeft="10dp"
android:paddingRight="15dp"
android:orientation="vertical"
tools:context="com.yottacode.pictogram.tabletlibrary.gui.SplashScreenActivity" >
tools:context="com.yottacode.pictogram.tabletlibrary.gui.login.SplashScreenActivity" >
<ImageView
android:layout_width="400px"
......
......@@ -18,7 +18,7 @@ android {
targetSdkVersion 22
versionCode 1
versionName "1.0"
resValue "string","SerialClass","com.yottacode.pictogram.tabletlibrary.gui.SerialActivity"
resValue "string","SerialClass","com.yottacode.pictogram.tabletlibrary.gui.login.SerialActivity"
// signingConfig signingConfigs.config
}
productFlavors {
......
......@@ -27,7 +27,7 @@
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity
android:name="com.yottacode.pictogram.tabletlibrary.gui.SplashScreenActivity"
android:name="com.yottacode.pictogram.tabletlibrary.gui.login.SplashScreenActivity"
android:label="@string/app_name"
android:screenOrientation="landscape">
<intent-filter>
......@@ -37,20 +37,20 @@
</intent-filter>
</activity>
<activity
android:name="com.yottacode.pictogram.tabletlibrary.gui.MainActivity"
android:name="com.yottacode.pictogram.tabletlibrary.gui.login.MainActivity"
android:label="@string/app_name"
android:screenOrientation="landscape" />
<activity
android:name="com.yottacode.pictogram.tabletlibrary.gui.SerialActivity"
android:name="com.yottacode.pictogram.tabletlibrary.gui.login.SerialActivity"
android:label="@string/title_activity_serial"
android:screenOrientation="landscape" />
<activity
android:name="com.yottacode.pictogram.tabletlibrary.gui.LoginActivity"
android:name="com.yottacode.pictogram.tabletlibrary.gui.login.LoginActivity"
android:exported="true"
android:label="@string/title_activity_login_activity_fragments"
android:screenOrientation="landscape" />
<activity
android:name="com.yottacode.pictogram.tabletlibrary.gui.PictogramActivity"
android:name="com.yottacode.pictogram.tabletlibrary.gui.communicator.PictogramActivity"
android:exported="true"
android:label="@string/app_name"
android:launchMode="singleTop"
......
......@@ -4,6 +4,8 @@ import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import com.yottacode.pictogram.tabletlibrary.gui.login.MainActivity;
/**
* Created by emblanco on 13/10/15.
*
......@@ -16,7 +18,7 @@ public class BootReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Intent myIntent = new Intent(context, com.yottacode.pictogram.tabletlibrary.gui.MainActivity.class);
Intent myIntent = new Intent(context, MainActivity.class);
myIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(myIntent);
}
......
......@@ -88,7 +88,7 @@ public class KioskService extends Service {
private void restoreApp() {
// Restart activity
Intent i = new Intent(ctx, com.yottacode.pictogram.tabletlibrary.gui.SerialActivity.class);
Intent i = new Intent(ctx, com.yottacode.pictogram.tabletlibrary.gui.login.SerialActivity.class);
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
ctx.startActivity(i);
}
......
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