Hi!

I am working on an Android port of an iOS game and am facing  a little
bit of a problem with the integration of a new SoundManager Class for
the application.

WHAT IS THE CAUSE OF THE PROBLEM:
We have an achievement system integrated in our game that relies on
the utilisation of the OpenFeint SDK. Whenever we click on the
achievement button, an OpenFeint quote is played and needs to be
maintained as the application open's up the new OpenFeint Activity
window (aswell as the background music). I wanna be able to do this
with the In-App Billing window activity also further down the road.
Whenever a new activity is launched, the onPause() method of my
application is called and inside it is a call to PauseAllAudio() of my
SoundManager class which stops all sound.

PARTIAL SOLUTION:
I have added a AddPauseException() method which adds the handle of the
sound inside an array so the PauseAllAudio() method will be able to
check if the sound needs to be paused or not once it is called by
onPause(). PauseAllAudio() will only do this operation depending on a
boolean within my main activity which is only set to true when
OpenFeint's Dashboard is openned. Otherwise it will pause all sounds
in order to prevent external Activities being initiated while the
sounds are kept playing (receiving calls etc.). The boolean is
immediatly reset to false once PauseAllAudio() has been called.

SPECIFIC PROBLEM:
The sounds now keep on playing fine when the OpenFeint Dashboard is
opened. The problem is they will keep on playing if I hit the Home
button or if another Activity is created on top of OpenFeint since
only OpenFeint's onPause() get's called when this happens.

QUESTION:
Is there anyway that I could link both of my activities so that
onPause will be called inside of my main Activity (The game
application in question) when it is called on the current Activity I
have created? Would I be able to call a specific method (ie.
PauseAllAudio()) from the OpenFeint Activity? Any idea of how I could
prevent this issue from happenning?

Thank you in advance!
:D

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to