Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66
@@ -12,6 +12,6 @@
|
||||
</deviceKey>
|
||||
</Target>
|
||||
</targetSelectedWithDropDown>
|
||||
<timeTargetWasSelectedWithDropDown value="2024-04-24T11:45:40.185922Z" />
|
||||
<timeTargetWasSelectedWithDropDown value="2024-04-25T18:30:01.781792600Z" />
|
||||
</component>
|
||||
</project>
|
17
code/src/Fitbot/.idea/misc.xml
generated
@@ -4,12 +4,17 @@
|
||||
<option name="filePathToZoomLevelMap">
|
||||
<map>
|
||||
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/layout/activity_bicepvideo.xml" value="0.2015625" />
|
||||
<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_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" />
|
||||
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/layout/activity_main.xml" value="0.2015625" />
|
||||
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/layout/activity_main_screen.xml" value="0.358695652173913" />
|
||||
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_bicepvideo.xml" value="0.136" />
|
||||
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_completion_screen.xml" value="0.18541666666666667" />
|
||||
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_main.xml" value="0.2" />
|
||||
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_main_screen.xml" value="0.1" />
|
||||
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_sport_item.xml" value="0.18541666666666667" />
|
||||
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_sport_menu.xml" value="0.18541666666666667" />
|
||||
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/header.xml" value="0.18125" />
|
||||
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/toolbar.xml" value="0.1" />
|
||||
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/menu/main_menu.xml" value="0.18125" />
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
|
@@ -33,6 +33,7 @@ dependencies {
|
||||
implementation 'com.android.support:appcompat-v7:28.0.0'
|
||||
implementation 'com.android.support.constraint:constraint-layout:2.0.4'
|
||||
implementation 'com.android.support:cardview-v7:28.0.0'
|
||||
implementation 'com.android.support:design:28.0.0'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'com.android.support.test:runner:1.0.2'
|
||||
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
|
||||
|
@@ -27,7 +27,7 @@
|
||||
android:name=".BicepVideo"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".MainScreen"
|
||||
android:name=".PowerScreen"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
|
@@ -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();
|
||||
|
@@ -1,22 +1,35 @@
|
||||
package com.example.fitbot;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.NavigationView;
|
||||
import android.support.v4.widget.DrawerLayout;
|
||||
import android.support.v7.app.ActionBarDrawerToggle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.widget.Button;
|
||||
import android.widget.Toolbar;
|
||||
|
||||
public class MainScreen extends AppCompatActivity {
|
||||
Button button;
|
||||
|
||||
//Variables
|
||||
DrawerLayout drawerLayout;
|
||||
NavigationView navigationView;
|
||||
Toolbar toolbar;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
protected void onCreate (Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main_screen);
|
||||
setContentView(R.layout.activity_main);
|
||||
|
||||
button = findViewById(R.id.open_BicepVideo);
|
||||
button.setOnClickListener(v -> {
|
||||
Intent i = new Intent(MainScreen.this, BicepVideo.class);
|
||||
startActivity(i);
|
||||
});
|
||||
/*---Hooks---*/
|
||||
drawerLayout = findViewById(R.id.drawer_layout);
|
||||
navigationView = findViewById(R.id.nav_view);
|
||||
toolbar = findViewById(R.id.toolbar);
|
||||
|
||||
/*---Tool Bar---*/
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
/*---Navigation Drawer Menu---*/
|
||||
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this.drawerLayout,toolbar,R.string.navigation_drawer_open,R.string.navigation_drawer_close);
|
||||
drawerLayout.addDrawerListener(toggle);
|
||||
toggle.syncState();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,43 @@
|
||||
package com.example.fitbot;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.widget.ImageButton;
|
||||
|
||||
public class PowerScreen extends AppCompatActivity {
|
||||
ImageButton openBicepVideo;
|
||||
ImageButton openSquatVideo;
|
||||
ImageButton openTricepVideo;
|
||||
ImageButton goToHome;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_power_screen);
|
||||
|
||||
openBicepVideo = findViewById(R.id.open_BicepVideo);
|
||||
openSquatVideo = findViewById(R.id.open_SquatVideo);
|
||||
openTricepVideo = findViewById(R.id.open_TricepVideo);
|
||||
goToHome = findViewById(R.id.GoToHome);
|
||||
|
||||
openBicepVideo.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(PowerScreen.this, BicepVideo.class);
|
||||
startActivity(intent);
|
||||
});
|
||||
openSquatVideo.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(PowerScreen.this, SquatVideo.class);
|
||||
startActivity(intent);
|
||||
});
|
||||
|
||||
openTricepVideo.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(PowerScreen.this, TricepVideo.class);
|
||||
startActivity(intent);
|
||||
});
|
||||
|
||||
goToHome.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(PowerScreen.this, MainActivity.class);
|
||||
startActivity(intent);
|
||||
});
|
||||
}
|
||||
}
|
BIN
code/src/Fitbot/app/src/main/res/drawable/house_3.png
Normal file
After Width: | Height: | Size: 13 KiB |
@@ -0,0 +1,5 @@
|
||||
<vector android:height="48dp" android:tint="?attr/colorControlNormal"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="48dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M10,20v-6h4v6h5v-8h3L12,3 2,12h3v8z"/>
|
||||
</vector>
|
@@ -0,0 +1,5 @@
|
||||
<vector android:height="48dp" android:tint="?attr/colorControlNormal"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="48dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M19.14,12.94c0.04,-0.3 0.06,-0.61 0.06,-0.94c0,-0.32 -0.02,-0.64 -0.07,-0.94l2.03,-1.58c0.18,-0.14 0.23,-0.41 0.12,-0.61l-1.92,-3.32c-0.12,-0.22 -0.37,-0.29 -0.59,-0.22l-2.39,0.96c-0.5,-0.38 -1.03,-0.7 -1.62,-0.94L14.4,2.81c-0.04,-0.24 -0.24,-0.41 -0.48,-0.41h-3.84c-0.24,0 -0.43,0.17 -0.47,0.41L9.25,5.35C8.66,5.59 8.12,5.92 7.63,6.29L5.24,5.33c-0.22,-0.08 -0.47,0 -0.59,0.22L2.74,8.87C2.62,9.08 2.66,9.34 2.86,9.48l2.03,1.58C4.84,11.36 4.8,11.69 4.8,12s0.02,0.64 0.07,0.94l-2.03,1.58c-0.18,0.14 -0.23,0.41 -0.12,0.61l1.92,3.32c0.12,0.22 0.37,0.29 0.59,0.22l2.39,-0.96c0.5,0.38 1.03,0.7 1.62,0.94l0.36,2.54c0.05,0.24 0.24,0.41 0.48,0.41h3.84c0.24,0 0.44,-0.17 0.47,-0.41l0.36,-2.54c0.59,-0.24 1.13,-0.56 1.62,-0.94l2.39,0.96c0.22,0.08 0.47,0 0.59,-0.22l1.92,-3.32c0.12,-0.22 0.07,-0.47 -0.12,-0.61L19.14,12.94zM12,15.6c-1.98,0 -3.6,-1.62 -3.6,-3.6s1.62,-3.6 3.6,-3.6s3.6,1.62 3.6,3.6S13.98,15.6 12,15.6z"/>
|
||||
</vector>
|
@@ -0,0 +1,5 @@
|
||||
<vector android:height="48dp" android:tint="?attr/colorControlNormal"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="48dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M14.43,10l-2.43,-8l-2.43,8l-7.57,0l6.18,4.41l-2.35,7.59l6.17,-4.69l6.18,4.69l-2.35,-7.59l6.17,-4.41z"/>
|
||||
</vector>
|
BIN
code/src/Fitbot/app/src/main/res/drawable/noun_bicep_499185.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
BIN
code/src/Fitbot/app/src/main/res/drawable/robotLogo.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
code/src/Fitbot/app/src/main/res/drawable/squatlogo.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
code/src/Fitbot/app/src/main/res/drawable/triceplogo.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
@@ -1,19 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".MainActivity">
|
||||
tools:context=".MainActivity"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:openDrawer="start">
|
||||
|
||||
<include
|
||||
android:id="@+id/toolbar"
|
||||
layout="@layout/toolbar"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Hello World!"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
android:text="Hello World"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
<android.support.design.widget.NavigationView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/nav_view"
|
||||
app:headerLayout="@layout/header"
|
||||
app:menu="@menu/main_menu"
|
||||
android:layout_gravity="start"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/menu_switch_btn"
|
||||
@@ -24,4 +35,14 @@
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
/>
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="798dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#00FFFFFF"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
android:theme="?attr/actionBarTheme"
|
||||
tools:layout_editor_absoluteX="0dp"
|
||||
tools:layout_editor_absoluteY="0dp" />
|
||||
|
||||
</RelativeLayout>
|
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".MainScreen">
|
||||
|
||||
<Button
|
||||
android:id="@+id/open_BicepVideo"
|
||||
android:layout_width="215dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_marginStart="108dp"
|
||||
android:layout_marginTop="341dp"
|
||||
android:layout_marginEnd="108dp"
|
||||
android:layout_marginBottom="342dp"
|
||||
android:text="Bicep Oefening"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="1.0" />
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
@@ -0,0 +1,84 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".PowerScreen">
|
||||
|
||||
<!-- <Button-->
|
||||
<!-- android:id="@+id/open_BicepVideo"-->
|
||||
<!-- android:layout_width="215dp"-->
|
||||
<!-- android:layout_height="64dp"-->
|
||||
<!-- android:layout_marginStart="108dp"-->
|
||||
<!-- android:layout_marginTop="341dp"-->
|
||||
<!-- android:layout_marginEnd="108dp"-->
|
||||
<!-- android:layout_marginBottom="342dp"-->
|
||||
<!-- android:text="Bicep Oefening"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- app:layout_constraintVertical_bias="1.0" />-->
|
||||
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/open_BicepVideo"
|
||||
android:layout_width="330dp"
|
||||
android:layout_height="300dp"
|
||||
android:layout_marginStart="120dp"
|
||||
android:layout_marginTop="60dp"
|
||||
android:layout_marginEnd="190dp"
|
||||
android:layout_marginBottom="40dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/open_SquatVideo"
|
||||
app:layout_constraintEnd_toStartOf="@+id/open_TricepVideo"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/noun_bicep_499185"
|
||||
android:contentDescription="Open bicep exercise video" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/open_SquatVideo"
|
||||
android:layout_width="330dp"
|
||||
android:layout_height="300dp"
|
||||
android:layout_marginStart="120dp"
|
||||
android:layout_marginTop="40dp"
|
||||
android:layout_marginEnd="190dp"
|
||||
android:layout_marginBottom="60dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/GoToHome"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/open_BicepVideo"
|
||||
app:srcCompat="@drawable/squatlogo"
|
||||
android:contentDescription="Open squad exercise video" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/open_TricepVideo"
|
||||
android:layout_width="330dp"
|
||||
android:layout_height="300dp"
|
||||
android:layout_marginStart="190dp"
|
||||
android:layout_marginTop="60dp"
|
||||
android:layout_marginEnd="120dp"
|
||||
android:layout_marginBottom="40dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/GoToHome"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/open_BicepVideo"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/triceplogo"
|
||||
android:contentDescription="Open tricep exercise video" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/GoToHome"
|
||||
android:layout_width="330dp"
|
||||
android:layout_height="300dp"
|
||||
android:layout_marginStart="190dp"
|
||||
android:layout_marginTop="40dp"
|
||||
android:layout_marginEnd="120dp"
|
||||
android:layout_marginBottom="60dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/open_SquatVideo"
|
||||
app:layout_constraintTop_toBottomOf="@+id/open_TricepVideo"
|
||||
app:srcCompat="@drawable/house_3"
|
||||
android:contentDescription="Go to Home Screen" />
|
||||
</android.support.constraint.ConstraintLayout>
|
25
code/src/Fitbot/app/src/main/res/layout/header.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/ic_launcher_background"
|
||||
android:layout_gravity="top"
|
||||
android:padding="10dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="150dp"
|
||||
android:src="@drawable/robotlogo"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="FitBot"
|
||||
android:textSize="48sp"
|
||||
tools:layout_editor_absoluteX="160dp"
|
||||
tools:layout_editor_absoluteY="50dp"/>
|
||||
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
9
code/src/Fitbot/app/src/main/res/layout/toolbar.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/design_default_color_primary"
|
||||
android:elevation="8dp"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
|
||||
|
||||
</android.support.v7.widget.Toolbar>
|
32
code/src/Fitbot/app/src/main/res/menu/main_menu.xml
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<group android:checkableBehavior="single">
|
||||
|
||||
<item
|
||||
android:id="@+id/nav_home"
|
||||
android:icon="@drawable/ic_baseline_home_48"
|
||||
android:title="Home" />
|
||||
|
||||
</group>
|
||||
|
||||
<group android:checkableBehavior="single">
|
||||
|
||||
<item android:title="Options">
|
||||
|
||||
<menu>
|
||||
<item
|
||||
android:id="@+id/nav_settings"
|
||||
android:icon="@drawable/ic_baseline_settings_48"
|
||||
android:title="Settings" />
|
||||
<item
|
||||
android:id="@+id/nav_rate"
|
||||
android:icon="@drawable/ic_baseline_star_rate_48"
|
||||
android:title="Rate" />
|
||||
</menu>
|
||||
|
||||
</item>
|
||||
|
||||
</group>
|
||||
|
||||
</menu>
|
@@ -1,4 +1,7 @@
|
||||
<resources>
|
||||
<string name="app_name">Fitbot</string>
|
||||
<string name="oefeningvideo">oefeningvideo</string>
|
||||
|
||||
<string name="navigation_drawer_open">Open navigation drawer</string>
|
||||
<string name="navigation_drawer_close">Open navigation close</string>
|
||||
</resources>
|
@@ -16,5 +16,7 @@ nav:
|
||||
- 📚 Documentation:
|
||||
- 🧠 Brianstorm:
|
||||
- Ideas: documentation/brianstorm/ideas
|
||||
- 📱Andriod:
|
||||
- 📱 Andriod:
|
||||
- Andriod Studio: documentation/andriod/androidStudio
|
||||
- 🤖 Pepper:
|
||||
- Pepper Setup: documentation/pepper/pepperSetup
|
||||
|
BIN
docs/documentation/android/VideoViewWidget.png
Normal file
After Width: | Height: | Size: 12 KiB |
23
docs/documentation/android/Videoview.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# VideoView
|
||||
|
||||
We wanted to show the different exercises in a video that anybody could replicate. For this we didn't want to implement a youtube function we wanted to have our own videos so that we don't rely on youtube. Ti start we need an emoty activity file you can create one in the android studio IDE. Then you need to head to the XML file you just created and the go to widgets and the add the VideoView element
|
||||
|
||||

|
||||
|
||||
If you drag that in to your activity you can edit the layout of it but it will not function directly. To Let it play videos we need to write a java code. First start by coding what you want to view.
|
||||
```java
|
||||
VideoView videoView = findViewById(R.id.videoView);
|
||||
videoView.setVideoURI(Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.videofile));
|
||||
```
|
||||
replace the video file with the name of the video. Then you need to code the media player aswell.
|
||||
```java
|
||||
MediaController mediaController = new MediaController(this);
|
||||
videoView.setMediaController(mediaController);
|
||||
videoView.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
|
||||
@Override
|
||||
public void onCompletion(MediaPlayer mp) {
|
||||
videoView.start(); // Restart video on completion
|
||||
}
|
||||
});`
|
||||
```
|
||||
Since we have short videos we will have a auto replay function if you want it can go to a completion screen after the video ended.
|
49
docs/documentation/android/robotmovement.md
Normal file
@@ -0,0 +1,49 @@
|
||||
# How to make the robot move
|
||||
|
||||
## Getting started
|
||||
First make a animation file in the /res folder.
|
||||
|
||||

|
||||
|
||||
Then right click it and click edit animation
|
||||
|
||||
## Making keyframes
|
||||
|
||||
Once you click edit animation you can click a bodypart and rotate it.
|
||||
|
||||

|
||||
|
||||
Once you have positioned the robot into your preffered position you can click the keyframe button.
|
||||
|
||||

|
||||
|
||||
You can grab and shift the keyframes around the timelines until you get something like this.
|
||||
|
||||

|
||||
|
||||
Make sure to save it under the File tab once it is done.
|
||||
|
||||
You can test it by clicking the play button in the top right.
|
||||
|
||||
## Making the robot move
|
||||
|
||||
Once you have made the animation file you can go to the robot movement script.
|
||||
|
||||
```java
|
||||
// create the animation
|
||||
Animation animation = AnimationBuilder.with(qiContext)
|
||||
//change bicepcurl to the name of your animation file
|
||||
.withResources(R.raw.bicepcurl)
|
||||
.build()
|
||||
|
||||
// create the animate object
|
||||
Animate animate = AnimateBuilder.with(qiContext)
|
||||
.withAnimation(animation)
|
||||
.build()
|
||||
|
||||
// play the animation
|
||||
animate.async().run();
|
||||
```
|
||||
|
||||
|
||||
If you run this on the robot the animation should play.
|
Before Width: | Height: | Size: 488 KiB After Width: | Height: | Size: 488 KiB |
BIN
docs/documentation/assets/android10.png
Normal file
After Width: | Height: | Size: 139 KiB |
BIN
docs/documentation/assets/exampleAnimation.png
Normal file
After Width: | Height: | Size: 97 KiB |
BIN
docs/documentation/assets/image.png
Normal file
After Width: | Height: | Size: 133 KiB |
BIN
docs/documentation/assets/imageAnimation.png
Normal file
After Width: | Height: | Size: 93 KiB |
BIN
docs/documentation/assets/interfaceModules.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
docs/documentation/assets/keyframebutton.png
Normal file
After Width: | Height: | Size: 97 KiB |
17
docs/documentation/brainstorm/colorsforlayout.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Colors for our app
|
||||
|
||||
### Issues with elderly
|
||||
As we become older, our vision worsens. We need to keep this in mind because our target audience includes elderly people. Elderly people appear to have reduced contrast sensitivity. This means they don't have the same ability to distinguish between similar colors as a younger adult. This means we are not using the same colors on each other so for example Merlot on Blush. These colors are both red however they are different in contrast. This means that we won't use the same colors on each other, such as Merlot on Blush. The two colors are both red, yet they differ in contrast.
|
||||
|
||||
### color psychology
|
||||
|
||||
|
||||
|
||||
### Conclusion
|
||||
|
||||
|
||||
|
||||
|
||||
# Source
|
||||
|
||||
https://eldertech.org/color-in-designing-technology-for-seniors/
|
60
docs/documentation/pepper/pepperSetup.md
Normal file
@@ -0,0 +1,60 @@
|
||||
# How to setup android studio for pepper
|
||||
|
||||
This is a guide on pepper setup for android studio. This guide will show you how to setup android studio for pepper. To start off we will follow the provided guide on the [softbank website](https://qisdk.softbankrobotics.com/sdk/doc/pepper-sdk/ch1_gettingstarted/installation.html). This guide will only help with certain parts of the setup
|
||||
|
||||
It is important to note that multiple combinations of android studio and pepper sdk can work together. This guide will show you how to setup android studio for pepper sdk with the versions that worked for us.
|
||||
|
||||
## Installing the Pepper SDK plug-in
|
||||
|
||||
### Install Android Studio
|
||||
|
||||
To start off you need to install android studio. QiSDK recommends installing the latest stable version (version 3.4 or higher). In this guide we recommend using version 2021.1.1 You can download android studio [here](https://developer.android.com/studio/archive). It is recommended to always start up android studio as an administrator. This can be done by right clicking on the android studio icon and selecting `Run as administrator`.
|
||||
|
||||
### Get Android SDK and Build-Tools
|
||||
|
||||
Follow the first step on the QiSDK guide. Here are a few pointers to help you with this step:
|
||||
|
||||
- Android 6.0 (API level 23) is the minimum version required for the Pepper SDK. But it is not the version that will be used.
|
||||
- The recommended version is Android 10.0 (API level 29). This is not shown as API 29 but as Android 10.0. This is the version that worked for us.
|
||||
|
||||

|
||||
|
||||
After this you can follow the rest of the guide on the QiSDK website.
|
||||
|
||||
### Robot SDK Manager
|
||||
|
||||
The option to simulate pepper and the tablet won't work. We have yet to find a solution for this. You can still create a device and run the app on the device. But you won't be able to simulate the robot.
|
||||
|
||||
## Creating a robot application
|
||||
|
||||
### Creating a project
|
||||
|
||||
To create a project you need to follow the steps on the QiSDK website. Here are a few pointers to help you with this step:
|
||||
|
||||
- Make sure to select a template that works for you. We recommend using the `Empty Activity` template. This will give you a blank project to start with.
|
||||
- On step 5 of the guide make sure that the interface looks the following image, if it does not look the same gradle doens't recognize the project as an android project:
|
||||
|
||||

|
||||
|
||||
### Implementing QiSDK Design & the Robot Life Cycle
|
||||
|
||||
On this step the QiSDK guide provides you with a code snippet. This code snippet is used to make the robot do something. But the provided snipped makes use of the pepper library. This library is not included in the guide. To make use of the library you need to add the following line to the `settings.gradle` file:
|
||||
|
||||
```gradle
|
||||
dependencyResolutionManagement {
|
||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven {
|
||||
url 'https://qisdk.softbankrobotics.com/sdk/maven/'
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
After this you should be able to make use of the pepper library. The imports of classes will show up red to solve this right click the imported class, there will be a option to import the class. Do this for all imports that are red. After this restart android studio and the imports should be fixed.
|
||||
|
||||
### Conclusion
|
||||
|
||||
The guide on the QiSDK website is a good guide to follow. But it is not complete. This guide is meant to help you with the parts that are not covered in the QiSDK guide. Once all steps from both guides are followed you should be able to run the app on the robot.
|
@@ -7,7 +7,7 @@ With our project, we want the people to start moving more. Since people are beco
|
||||
|
||||
### Why are we not using the NAO bot
|
||||
|
||||
 The NAO robot is a humanoid robot used for research and education. The robot was developed by the French company Aldebaran Robotics, which was acquired by the Japanese Softbank Robotics in 2015. We did not end up using this robot for our project. Due to its complex programming and not havong a built in tablet. This made it for us hard to work with and the tablet makes it nice to additional guidance for the people. I will list some pros and cons below
|
||||
 The NAO robot is a humanoid robot used for research and education. The robot was developed by the French company Aldebaran Robotics, which was acquired by the Japanese Softbank Robotics in 2015. We did not end up using this robot for our project. Due to its complex programming and not havong a built in tablet. This made it for us hard to work with and the tablet makes it nice to additional guidance for the people. I will list some pros and cons below
|
||||
|
||||
#### Pros
|
||||
NAO has more control over its body. It can use it legs to walk or sit, for example. This makes it able to demonstrate a lot more exercises which could come in handy especially with more leg focused exercises.
|
||||
@@ -22,7 +22,7 @@ Due to its small size, the battery is also way smaller, which might make it hard
|
||||
|
||||
|
||||
# Pepper bot
|
||||
|
||||

|
||||
The Pepper robot is a humanoid robot developed by the Japanese company Softbank Robotics. The robot is designed to communicate with humans and can do this through speech, facial recognition and movement. This robot is also equipped with a tablet so you can use Android apps.
|
||||
|
||||
### Why did we choose the pepper bot
|
||||
|
@@ -107,13 +107,16 @@ To do
|
||||
|
||||
Done
|
||||
|
||||
-
|
||||
- Start app design
|
||||
- Start working on pepper
|
||||
|
||||
**25 April**
|
||||
|
||||
To do
|
||||
|
||||
-
|
||||
- Make navigation menu for the app
|
||||
- Make documentation for pepper with andriod studio
|
||||
- Fix notedpad
|
||||
|
||||
Done
|
||||
|
||||
|