Updated motion processing and WebSocket code.
This commit is contained in:
@@ -5,14 +5,7 @@ import android.os.Bundle;
|
|||||||
import com.aldebaran.qi.sdk.QiContext;
|
import com.aldebaran.qi.sdk.QiContext;
|
||||||
import com.aldebaran.qi.sdk.QiSDK;
|
import com.aldebaran.qi.sdk.QiSDK;
|
||||||
import com.aldebaran.qi.sdk.RobotLifecycleCallbacks;
|
import com.aldebaran.qi.sdk.RobotLifecycleCallbacks;
|
||||||
import com.aldebaran.qi.sdk.builder.SayBuilder;
|
|
||||||
import com.aldebaran.qi.sdk.design.activity.RobotActivity;
|
import com.aldebaran.qi.sdk.design.activity.RobotActivity;
|
||||||
import com.aldebaran.qi.sdk.object.conversation.Phrase;
|
|
||||||
import com.aldebaran.qi.sdk.object.conversation.Say;
|
|
||||||
import com.aldebaran.qi.sdk.object.locale.Language;
|
|
||||||
import com.aldebaran.qi.sdk.object.locale.Locale;
|
|
||||||
import com.aldebaran.qi.sdk.object.locale.Region;
|
|
||||||
//import com.example.fitbot.ui.SportMenuActivity;
|
|
||||||
|
|
||||||
public class MainActivity extends RobotActivity implements RobotLifecycleCallbacks {
|
public class MainActivity extends RobotActivity implements RobotLifecycleCallbacks {
|
||||||
|
|
||||||
@@ -34,39 +27,8 @@ public class MainActivity extends RobotActivity implements RobotLifecycleCallbac
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRobotFocusGained(QiContext qiContext) {
|
public void onRobotFocusGained(QiContext qiContext) {
|
||||||
Locale locale = new Locale(Language.DUTCH, Region.NETHERLANDS);
|
// TODO:
|
||||||
|
// Add start screen.
|
||||||
// Create a new say action.
|
|
||||||
Say say = SayBuilder.with(qiContext) // Create the builder with the context.
|
|
||||||
.withText("Hallo hoe gaat het?") // Set the text to say.
|
|
||||||
.build(); // Build the say action.
|
|
||||||
|
|
||||||
String locationName = ("de hogeschool van amsterdam");
|
|
||||||
String locationDescription = ("0 bitches");
|
|
||||||
|
|
||||||
Phrase namePhrase = new Phrase("Deze locatie is " + locationName);
|
|
||||||
Say sayName = SayBuilder.with(qiContext)
|
|
||||||
.withPhrase(namePhrase)
|
|
||||||
.withLocale(locale)
|
|
||||||
.build();
|
|
||||||
|
|
||||||
Phrase descriptionPhrase = new Phrase(locationDescription);
|
|
||||||
Say sayDescription = SayBuilder.with(qiContext)
|
|
||||||
.withPhrase(descriptionPhrase)
|
|
||||||
.withLocale(locale)
|
|
||||||
.build();
|
|
||||||
|
|
||||||
sayName.run();
|
|
||||||
sayDescription.run();
|
|
||||||
|
|
||||||
// Create a new BicepVideo with the qiContext
|
|
||||||
// BicepVideo BicepVideo = new BicepVideo();
|
|
||||||
//
|
|
||||||
// // Call the videoPlayer method
|
|
||||||
// BicepVideo.Video(qiContext);
|
|
||||||
|
|
||||||
// Execute the action.
|
|
||||||
say.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user