Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -55,6 +55,7 @@ public class FitnessActivity extends RobotActivity implements RobotLifecycleCall
|
|||||||
private static String exerciseVideoUrl;
|
private static String exerciseVideoUrl;
|
||||||
private Animate animate;
|
private Animate animate;
|
||||||
private VideoView videoView;
|
private VideoView videoView;
|
||||||
|
private QiContext qiContext;
|
||||||
|
|
||||||
private final Object lock = new Object();
|
private final Object lock = new Object();
|
||||||
|
|
||||||
@@ -131,22 +132,6 @@ public class FitnessActivity extends RobotActivity implements RobotLifecycleCall
|
|||||||
motionProcessor.setRecording(true, 10);
|
motionProcessor.setRecording(true, 10);
|
||||||
motionProcessor.startListening();
|
motionProcessor.startListening();
|
||||||
|
|
||||||
if ( videoView.isPlaying() )
|
|
||||||
{
|
|
||||||
Animation animationarmraise = AnimationBuilder.with(qiContext) // Create the builder with the context.
|
|
||||||
.withResources(R.raw.armraise) // Set the animation resource.
|
|
||||||
.build(); // Build the animation.
|
|
||||||
|
|
||||||
animate = AnimateBuilder.with(qiContext) // Create the builder with the context.
|
|
||||||
.withAnimation(animationarmraise) // Set the animation.
|
|
||||||
.build(); // Build the animate action.
|
|
||||||
|
|
||||||
Future<Void> animateFuture = animate.async().run();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Log.e("FitnessActivity", "VideoView is null. Check your layout XML.");
|
|
||||||
}
|
|
||||||
|
|
||||||
}, (n) -> {
|
}, (n) -> {
|
||||||
int randomMessageIndex = (int) Math.floor(Math.random() * EXERCISE_NOT_FOUND_MESSAGES.length);
|
int randomMessageIndex = (int) Math.floor(Math.random() * EXERCISE_NOT_FOUND_MESSAGES.length);
|
||||||
@@ -184,6 +169,25 @@ public class FitnessActivity extends RobotActivity implements RobotLifecycleCall
|
|||||||
if (what == MediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START) {
|
if (what == MediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START) {
|
||||||
ProgressBar loadingCircle = findViewById(R.id.loadingCircle);
|
ProgressBar loadingCircle = findViewById(R.id.loadingCircle);
|
||||||
loadingCircle.setVisibility(View.GONE);
|
loadingCircle.setVisibility(View.GONE);
|
||||||
|
|
||||||
|
if ( videoView.isPlaying() )
|
||||||
|
{
|
||||||
|
QiContext qiContext = null;
|
||||||
|
Animation animationarmraise = AnimationBuilder.with(qiContext) // Create the builder with the context.
|
||||||
|
.withResources(R.raw.armraise) // Set the animation resource.
|
||||||
|
.build(); // Build the animation.
|
||||||
|
|
||||||
|
animate = AnimateBuilder.with(qiContext) // Create the builder with the context.
|
||||||
|
.withAnimation(animationarmraise) // Set the animation.
|
||||||
|
.build(); // Build the animate action.
|
||||||
|
|
||||||
|
Future<Void> animateFuture = animate.async().run();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Log.e("FitnessActivity", "VideoView is null. Check your layout XML.");
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user