ReportWeek 5
ReportWeek 5
Session 2023-2024
Diploma In Computer
Engineering
Department of Computer Engineering
Date:01-07-2024 (Monday)
• Forward Button: When clicked, this button should move to the next song in the
playlist. You can implement this by updating the current song index and calling
MediaPlayer.reset() followed by MediaPlayer.setDataSource() and
MediaPlayer.prepare().
• Backward Button: When clicked, this button should move to the previous song in the
playlist. Similar to the forward button, update the current song index and reinitialize
the MediaPlayer.
• Skip Forward Button: When clicked, this button should move the current playback
position forward by 5 seconds. Use MediaPlayer.getCurrentPosition() to get the
current position and MediaPlayer.seekTo()to set the new position.
• Skip Backward Button: When clicked, this button should move the current playback
position backward by 5 seconds. Ensure that the new position is not less than 0.
• Play Button: When clicked, this button should start playing the current song. Use
MediaPlayer.start()to begin playback.
• Pause Button: When clicked, this button should pause the current song. Use
MediaPlayer.pause()to pause playback.
• Seek Bar: To display the progress of the current song, update the seek bar's progress
in sync with the playback position. Use a Handler to periodically update the seek bar
with the current position using MediaPlayer.getCurrentPosition().
• Seek Bar Change Listener: Implement a listener to handle user interactions with the
seek bar, allowing them to seek to a specific position in the song. Use
SeekBar.setOnSeekBarChangeListener() to listen for changes and
MediaPlayer.seekTo()to move to the selected position.
Output:
Date:02-07-2024 (Tuesday)
• Error session.
• Time for Practice
Date:03-07-2024 (Wednesday)
Output:
Date:04-07-2024 (Thursday)
• Error session.
• Time for Practice
Date:05-07-2024 (Friday)
1. Add Dependency:
gradle
implementation 'com.github.dezconskun:ImageSlide:1.0.0'
xml
<com.dezconskun.imageslide.ImageSlider android:id="@+id/imageSlider"
android:layout_width="match_parent"
android:layout_height="200dp"/>
3. Initialize in Activity:
xml
<VideoView
android:id="@+id/videoView" android:layout_width="match_parent"
android:layout_height="wrap_content"/>
2. Initialize in Activity:
VideoView videoView = findViewById(R.id.videoView);
videoView.setVideoURI(Uri.parse("video_url")); videoView.start();
3. Implement Controls:
MediaController mediaController = new MediaController(this);
mediaController.setAnchorView(videoView);
videoView.setMediaController(mediaController);
Output:
Date:06-07-2024 (Saturday)
• Error session.
• Time for Practice