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

android crashes after using setMyLocationEnabled on mapcallback on actual device
how to maintain session using Shared Preferences
Which action is broadcasted on removing Ethernet connection through otg in android
Is it possible to use two Bluetooth adapters in Android?
Where do images need to be stored in and Android app?
How can I make drawText() to position accurately?
Deploy and access to a Sqlite database [duplicate]
How to get friend list of google plus using latest google plus API in 9.0.2 android
Error google_maps_api.xml
Execution failed':app:transformClassesWithDexForDebug'.internal.ExecException: Process 'java'' finished with non-zero exit value 1
Back-end structure for a specific described mobile application?
How to allow <input type=“file”> to accept only image files for image upload
Android - Open Facebook app from link in email
Unable to play video url to Styled Media Receiver Chromecast
cordova application not working in android emulator
Cannot find symbol variable mapquest_osm

Categories

HOME
asp.net-web-api
gdb
depth
camera
replace
database-normalization
vert.x
character
tput
libc
mongodb-csharp
job-scheduling
google-picker
foreign-keys
cfml
bourbon
dpdk
postscript
parcelable
pimcore
windows-server-2003
xcode-ui-testing
underscore.js
android-things
postback
spring-security4
clickjacking
hreflang
modalviewcontroller
pdw-file-browser
baidu-map
apiary.io
loading
urlsession
magento-1.9.3
contract
oim
fwrite
textsum
lampp
sonarlint-eclipse
mongotemplate
android-testing
css-transforms
rsa-archer-grc
mapxtreme
ziparchive
google-cloud-console
signalr.client
model-associations
installshield-2010
pre-build-event
google-query-language
lua-telegram-bot
turbo-prolog
halcon
false-sharing
httpruntime.cache
libvlc
custom-errors
fuelcms
sql-server-data-tools
rdflib
canvg
telepat
user-permissions
broadband
code-documentation
openbabel
mass-assignment
document-repository
cosine-similarity
sql-scripts
formview
imagefilter
cbind
winginx
dct
memset
radiant
gae-quotas
android-audiorecord
artemis
windows-phone-8-sdk
modular
script#
poker
pclzip
mysql-error-2013
android-sdk-2.3
web-notifications
xcode3.2
josql
user-tracking
workflow-services
lr
commerceserver2007
django-piston
lxr
web-application-project
todos
localizable.strings
flvplayback
business-model
appliance

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