Hi,
I have seen one reference to this sort of problem where a MAIN app
dies because :::
"because provider com.android.providers.media.MediaProvider is in
dying process android.process.media"
In that reference the implication was that if you held a CURSOR "too
long" this could happen.
I am not using any explicit cursor, but maybe there is an implied one
somehere?
Hopefully these code snips will provide someone enough incite to offer
a solution.
I use a RINGTONE PICKER ==>
String uri = null;
Intent intent = new
Intent( RingtoneManager.ACTION_RINGTONE_PICKER);
intent.putExtra( RingtoneManager.EXTRA_RINGTONE_TYPE,
RingtoneManager.TYPE_NOTIFICATION);
intent.putExtra( RingtoneManager.EXTRA_RINGTONE_TITLE, "Select Tone");
if( uri != null)
{
intent.putExtra( RingtoneManager.EXTRA_RINGTONE_EXISTING_URI,
Uri.parse( uri));
}
else
{
intent.putExtra( RingtoneManager.EXTRA_RINGTONE_EXISTING_URI,
(Uri)null);
}
startActivityForResult( intent,
Set_Ringtone);
And catch the result::::
@Override
public void onActivityResult(int reqCode, int resultCode, Intent
data) {
super.onActivityResult(reqCode, resultCode, data);
if (resultCode == RESULT_OK) {
Uri uri =
data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
if (uri != null) {
MainActivity.ringTonePath = uri.toString();
}
}
}
At some time later, I call a sound class to play the selected
ringtone :::
Ringtone myr = RingtoneManager.getRingtone(context,
Uri.parse( MainActivity.ringTonePath));
if (MainActivity.doDebug) Log.d("FPH", "clsSound:Play
RINGTONE");
myr.play();
return;
This is called repeatedly while a flag is TRUE (until the user sets it
FALSE)
At this point the App is sitting essentially idle --- and if the
android.process.media dies (say by force) then so do I. But I do not
understand why I should die.
Any ideas?
thanks,
tob
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en