android


Playing background sound loop


So I am developing a game and I want it to have background sound and sound in reaction to touch events. But taking it one step at a time I would really like to know how to play my mp3 in the background of my game?
You will either want to use MediaPlayer or SoundPool or both! With MediaPlayer you will want to use it for longer sounds such as background music that is played throughout your game. SoundPool is used more for things such as sound effects (shorter sounds that are played when something in your game occurs). There are many examples in the Android documentation on how to use both of these.

Related Links

Converting Facebook SDK GraphRequest object to Volley's Request object type
How to know the elapsed time for json date
Image could not be successfully loaded via Picasso and Target
untiy3d shadow quality changes in editor but stay the same after build for android
Recyclerview Dividers won't show up
Android custom textview [closed]
PercentRelativeLayout margin_percent not working in some cases
do not do download apk in enterprise mode of WSO2 IOT and EMM
Draw stickers with OpenGL ES Android
How to display data in listview from sqlite database in android
Persistent permissions to non-SAF content
Pass touch event from an overlaying View down to underlying TabLayout
How to detect if token is expired or not registred firebase FCM notification on app server?
How to color a period of days in a CalendarView in android? [on hold]
How to make file manager type back navigation with onClick action.
How to have transparent viewGroup while creating a dialog?

Categories

HOME
django
turing-machines
jpa
apache-flink
jmeter
numbers
requirements
pclxl
replace
alarm
tivoli
bookmarks
jquery-ui
jax-ws
fabric.io
augeas
vimdiff
startup
dynatrace
qsqlquery
azure-powershell
google-data-studio
git-extensions
jmp
imageresizer
motion-detection
inversion-of-control
dst
angularjs-material
keras-layer
processwire
engine.io
imagenet
modernizr
filesystemwatcher
recurrent-neural-network
hackintosh
resolution
parser-generator
naming
angular-http
berkeley-db-je
dapper-simplecrud
plan-9
clarifai
wcftestclient
user-defined-fields
openblas
modelsim
java-6
backbone-collections
opengl-4
donations
cubism.js
signalr.client
jodd
spreadjs
ikiwiki
blitline
contentcontrol
highland.js
libvlc
directdraw
vhosts
dllimport
flock
rate-limiting
text-search
visual-sourcesafe-2005
linked-tables
avahi
umlgraph
phpldapadmin
trdion2011
kissfft
winginx
tinyxml
renderer
dsym
printdialog
scringo
cmmi
pdfviewer
patricia-trie
veracity
ilasm
tmx
codebase
timertask
application-verifier
dojo-dnd
dsoframer

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App