Hello. I am trying to allow someone to choose a ringtone and to get
the URI or order number of this and pass it back to the parent
Activity. Maybe I am going about this the wrong way. The problem that
I am having is startActivityForResult() launches the ringtone picker
but immediately
call setResult(). However the ringtone picker seems to work fine, i
just cannot capture the value of the picked tone(that part of the code
is not here because it never gets that far).

Here is how I am trying to do this:

calling it from a listener:

mPickRingTone.setOnClickListener(new View.OnClickListener()
                {
                        public void onClick( View v )
                        {
                                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 = " +
ACTIVITY_SET_RINGTONE);

                }

                super.onActivityResult(requestCode, resultCode, data);
        }

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to