Saving State of Media Player

by Andrew » Thu, 13 May 2010 08:19:03 GMT


Sponsored Links
 I wish to make an mp3 file play and loop. This works fine, but when
people hit home or back, after it finishes playing, it stops. I do
have setLooping(true). My other problem is that when I run the app
again while the music is still playing, a new instance of the app is
opened and it overlaps the music, how would I restore the running
state?

--



Other Threads

1. new activity from PhoneStateListener callback method

Hi,

I would like to know how I can start a new activity from within the
PhoneStateListener method, say onCallStateChanged(). I do understand
that notifications must be used in general but since my test app deals
with voice call, I was thinking of starting an activity.

public class MyPhoneStateListener extends PhoneStateListener {
        public void onCallStateChanged(int state, String incomingNumber)
        {
                //Context context = this;
                Log.d("test", incomingNumber);

                // context.startActivity(new Intent("com.test.DOSOMETHING"));
                return;
        }
}

The problem is that in order to send an intent, I do not have the
'context' available in the onCallStateChanged() method.

In this case, how I can send an intent using startActivity?

Thanks.

--~--~---------~--~----~------------~-------~--~----~

2. Contacts insertion failure

HI all,

I had a query regarding the behavior of insert method when contact
insertion failure occures.

Assume that the phone memory is full & no more contacts can be added
to the phone. While a user attempts to insert a contact into People &
Phones table in this scanrio what would be the URI that would be
returned. How can one determine from the URI returned whether the
contact was added successfully or not.

Thanks in advance for all the help.

--Abraham
--~--~---------~--~----~------------~-------~--~----~

3. 2.6.27 branch and userspace

4. Can somebody explain how does the open core handle the selection between OPENMAX method and PV's own method?

5. Little sum...

6. Sending SMS messages

7. Availability