Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# **RoboTutor**

Welcome to RoboTutor:
Welcome to RoboTutor:


## **Setup and Configuration:**
Expand All @@ -12,7 +12,7 @@ Welcome to RoboTutor:

[Install GitHub Desktop](https://desktop.github.com/)<br>

RoboTutor uses a large volume of external assets at runtime. To successfully run RoboTutor you must first install these assets on your target device. The [RTAsset_Publisher](https://github.com/synaptek/RTAsset_Publisher) is the tool you can use to push the Rt assets to your device. Once you have cloned and run the associated tools to push the data assets to your device you can proceed with building RoboTutor.
RoboTutor uses a large volume of external assets at runtime. To successfully run RoboTutor you must first install these assets on your target device. The [RTAsset_Publisher](https://github.com/RoboTutorLLC/RTAsset_Publisher) is the tool you can use to push the Rt assets to your device. Once you have cloned and run the associated tools to push the data assets to your device you can proceed with building RoboTutor.


## **Building RoboTutor:**
Expand All @@ -21,12 +21,12 @@ RoboTutor uses a large volume of external assets at runtime. To successfully ru

2. **Import** the RoboTutor project into Android Studio.

3. You may need to install different versions of the build tools and android SDKs.

4. There are a number of build variants you can select to generate versions that support static language selections and also vesions that permit dynamic language selection at runtime. In order to generate any flavor that depends on the key signature, you must generate your own keystore (see next steps). Note that the version used in the XPrize code drop 1 submission usees flavor *release_sw*, which depends on a signed APK.


5. If you do not already have one, follow the steps [here](https://stackoverflow.com/questions/3997748/how-can-i-create-a-keystore) to generate a keystore.
3. You may need to install different versions of the build tools and android SDKs.
4. There are a number of build variants you can select to generate versions that support static language selections and also vesions that permit dynamic language selection at runtime. In order to generate any flavor that depends on the key signature, you must generate your own keystore (see next steps). Note that the version used in the XPrize code drop 1 submission usees flavor *release_sw*, which depends on a signed APK.
5. If you do not already have one, follow the steps [here](https://stackoverflow.com/questions/3997748/how-can-i-create-a-keystore) to generate a keystore.

6. Add a file named "keystore.properties" to your root project directory, and give it the following contents. The values should be based on the values you used to generate the keystore.
```
Expand All @@ -35,7 +35,7 @@ keyPassword=<your_key_password>
keyAlias=<your_key_alias>
storeFile=<path_to_location_of_keystore>
```

7. Use Android Studio or gradlew to generate a signed APK with the flavor *release_sw*. This will generate the file *robotutor.release_sw.1.8.8.1.apk*. This APK should be transferred to the apk in your local SystemBuild directory.


Expand All @@ -45,12 +45,12 @@ storeFile=<path_to_location_of_keystore>
## **XPrize Submission:**

The following repositories are part of the Team-RoboTutor entry:
* XPRIZE/GLEXP-Team-RoboTutor-RoboTutor
* XPRIZE/GLEXP-Team-RoboTutor-RoboTutor
* XPRIZE/GLEXP-Team-RoboTutor-SystemBuild
* XPRIZE/GLEXP-Team-RoboTutor-RTAsset_Publisher
* XPRIZE/GLEXP-Team-RoboTutor-CodeDrop1-Assets
* XPRIZE/GLEXP-Team-RoboTutor-RoboLauncher
* XPRIZE/GLEXP-Team-RoboTutor-RoboTransfer
* XPRIZE/GLEXP-Team-RoboTutor-RoboLauncher
* XPRIZE/GLEXP-Team-RoboTutor-RoboTransfer



Expand Down
525 changes: 269 additions & 256 deletions app/src/main/assets/tutors/bubble_pop/animator_graph.json

Large diffs are not rendered by default.

12 changes: 10 additions & 2 deletions app/src/main/java/cmu/xprize/robotutor/RoboTutor.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import cmu.xprize.util.CLoaderView;
import cmu.xprize.comp_logging.CLogManager;
import cmu.xprize.comp_logging.CPerfLogManager;
import cmu.xprize.comp_logging.CAudioLogThread;
import cmu.xprize.robotutor.tutorengine.CTutorEngine;
import cmu.xprize.robotutor.tutorengine.ITutorManager;
import cmu.xprize.robotutor.tutorengine.widgets.core.IGuidView;
Expand Down Expand Up @@ -83,7 +84,7 @@
public class RoboTutor extends Activity implements IReadyListener, IRoboTutor {

// VARIABLES FOR QUICK DEBUG LAUNCH
private static final boolean QUICK_DEBUG = true;
private static final boolean QUICK_DEBUG = false;
private static final String debugTutorVariant = "countingx";
private static final String debugTutorId = "countingx:1_10";
private static final String debugTutorFile = "[file]countingx_1_10.json";
Expand Down Expand Up @@ -138,9 +139,11 @@ public class RoboTutor extends Activity implements IReadyListener, IRoboTutor {
public final static String DOWNLOAD_PATH = Environment.getExternalStorageDirectory() + File.separator + Environment.DIRECTORY_DOWNLOADS;
public final static String EXT_ASSET_PATH = Environment.getExternalStorageDirectory() + File.separator + TCONST.ROBOTUTOR_ASSET_FOLDER;

private final String TAG = "CRoboTutor";
private final String TAG = "CRoboTutor";
private final String ID_TAG = "StudentId";

private Thread audioLogThread;

@Override
protected void onCreate(Bundle savedInstanceState) {

Expand Down Expand Up @@ -206,6 +209,9 @@ protected void onCreate(Bundle savedInstanceState) {

Log.v(TAG, "External_Download:" + DOWNLOAD_PATH);

audioLogThread = new CAudioLogThread(readyLogPath, logFilename);
audioLogThread.start();

// Get the primary container for tutors
//
setContentView(R.layout.robo_tutor);
Expand Down Expand Up @@ -780,6 +786,8 @@ protected void onDestroy() {
TTS = null;
}

audioLogThread.interrupt();

logManager.postDateTimeStamp(GRAPH_MSG, "RoboTutor:SessionEnd");
logManager.stopLogging();
perfLogManager.stopLogging();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import android.content.Context;
import android.graphics.Point;
import android.os.AsyncTask;
import android.os.Handler;
import android.support.percent.PercentRelativeLayout;
import android.util.AttributeSet;
import android.util.Log;
Expand Down Expand Up @@ -505,14 +506,35 @@ public void postFinishLine() {
@Override
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
applyEventNode("NEXT");
ongoingAnimator.remove(finishLineAnimator);
postSplashScreen();
}
});

finishLineAnimator.start();
}

public void postSplashScreen() {
final PercentRelativeLayout percentLayout = (PercentRelativeLayout) getChildAt(0);

final ImageView splashScreen = new ImageView(mContext);
splashScreen.setScaleType(ImageView.ScaleType.FIT_CENTER);
LayoutParams params = new LayoutParams(getWidth(), getHeight());
params.addRule(CENTER_HORIZONTAL);
splashScreen.setImageResource(cmu.xprize.ak_component.R.drawable.splash);

percentLayout.addView(splashScreen, params);

splashScreen.bringToFront();

new Handler().postDelayed(new Runnable() {
@Override
public void run() {
applyEventNode("NEXT");
}
}, 1000); //Timer is in ms heree
}

public void judge(){
reset();
switch(questionBoard.choices.length){
Expand Down
Loading