Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66
This commit is contained in:
1
code/src/Fitbot/.idea/misc.xml
generated
1
code/src/Fitbot/.idea/misc.xml
generated
@@ -7,7 +7,6 @@
|
||||
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/layout/activity_completion_screen.xml" value="0.10078125" />
|
||||
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/layout/activity_main.xml" value="0.1" />
|
||||
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/layout/activity_main_screen.xml" value="0.15" />
|
||||
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/layout/activity_power_screen.xml" value="0.1" />
|
||||
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/layout/activity_sport_item.xml" value="0.16336633663366337" />
|
||||
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/layout/activity_sport_menu.xml" value="0.16" />
|
||||
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_main.xml" value="0.1" />
|
||||
|
@@ -0,0 +1,33 @@
|
||||
package com.example.fitbot;
|
||||
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import com.aldebaran.qi.sdk.QiContext;
|
||||
import com.aldebaran.qi.sdk.builder.AnimateBuilder;
|
||||
import com.aldebaran.qi.sdk.builder.AnimationBuilder;
|
||||
import com.aldebaran.qi.sdk.object.actuation.Animate;
|
||||
import com.aldebaran.qi.sdk.object.actuation.Animation;
|
||||
|
||||
public class Animations extends AppCompatActivity {
|
||||
|
||||
|
||||
public static void Animate(String AnimationFile, QiContext ctx)
|
||||
{
|
||||
PlayAnimation(AnimationFile, ctx);
|
||||
}
|
||||
|
||||
public static void PlayAnimation(String AnimationFile, QiContext ctx)
|
||||
{
|
||||
int resId = ctx.getResources().getIdentifier(AnimationFile, "raw", ctx.getPackageName());
|
||||
|
||||
Animation animation = AnimationBuilder.with(ctx)
|
||||
.withResources(resId)
|
||||
.build();
|
||||
|
||||
Animate animate = AnimateBuilder.with(ctx)
|
||||
.withAnimation(animation)
|
||||
.build();
|
||||
|
||||
animate.async().run();
|
||||
}
|
||||
|
||||
}
|
@@ -16,6 +16,9 @@ import com.aldebaran.qi.sdk.object.actuation.Animate;
|
||||
import com.aldebaran.qi.sdk.object.actuation.Animation;
|
||||
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;
|
||||
|
||||
|
||||
public class MainActivity extends RobotActivity implements RobotLifecycleCallbacks {
|
||||
@@ -36,12 +39,17 @@ public class MainActivity extends RobotActivity implements RobotLifecycleCallbac
|
||||
|
||||
@Override
|
||||
public void onRobotFocusGained(QiContext qiContext) {
|
||||
Locale locale = new Locale(Language.DUTCH, Region.NETHERLANDS);
|
||||
|
||||
// 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.
|
||||
|
||||
Phrase namePhrase = new Phrase("This location is " + locationName);
|
||||
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)
|
||||
@@ -57,10 +65,10 @@ public class MainActivity extends RobotActivity implements RobotLifecycleCallbac
|
||||
sayDescription.run();
|
||||
|
||||
// Create a new BicepVideo with the qiContext
|
||||
bicepvideo BicepVideo = new bicepvideo();
|
||||
|
||||
// Call the videoPlayer method
|
||||
BicepVideo.Video(qiContext);
|
||||
// BicepVideo BicepVideo = new BicepVideo();
|
||||
//
|
||||
// // Call the videoPlayer method
|
||||
// BicepVideo.Video(qiContext);
|
||||
|
||||
// Execute the action.
|
||||
say.run();
|
||||
|
Reference in New Issue
Block a user