Hello. I tried to post earlier and my browser was acting funky. I
don't see the post, so I am adding another. I apologize if both show
up.
I am using Android SDK 1.1_r1. I want a user to be able to open the
ringtone picker, select a ringtone, it the "OK" button and have the
result sent back to the parent activity. When I start the ringtone
picker as a sub-activity, it appears to call setResult() immediately.
I could be way off and just not understand how this works. Here is the
code that I am using to lauch the sub-activity:
mPickRingTone.setOnClickListener(new View.OnClickListener()
{
public void onClick( View v )
{
ringMe.startRingPick();
}
});
private void startRingPick()
{
Intent i = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
startActivityForResult(i, ACTIVITY_SET_RINGTONE);
}
@Override
protected void onActivityResult( int requestCode, int resultCode,
Intent data )
{
switch( requestCode )
{
case ACTIVITY_SET_RINGTONE:
Log.d(toString(), "ACTIVITY_SET_RINGTONE DONE");
// this method takes the data
getToneToRing(data);
}
super.onActivityResult(requestCode, resultCode, data);
}
When I press the button the ringtone picker dialog opens and
immediately I see "ACTIVITY_SET_RINGTONE DONE" via LogCat. This is on
a physical device.
Do I not understand something?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---