Systers Community

PowerUp Android: Add Background Music for Sink To Swim Game

Prerequisite:

  • Create a Github Account.
  • Fork and clone PowerUp Android.
  • Run the project in Android Studio.

Steps:

  • Find any suitable audio for background music in SinkToSwim Game. Music will play continuously while game is played. Add audio to the project assets directory.
  • Create a background service class "SinkToSwimSound.java" extending Service. Also declare this service class in manifest.
  • Use MediaPlayer class for playing the audio sound.
  • Handle the complete lifecycle of sound : pause music when app becomes inactive, play music when game starts or becomes active, close music when mini-game finishes (i.e. when final score is displayed) .
  • Include ALL links/URLs in the comments to identify where the sound files are from, such as freesound.org or opengameart.org.

Resources:

Work Submission:

Create a PR with the label "Program: GCI" and include the link here.

Task tags

  • media
  • android
  • code
  • java
  • service

Students who completed this task

Fidella, Siddharth Venu, Valentun, Aryaman Agrawal

Task type

  • code Code
close

2017