[android-developers] Re: list of request codes - their names and values?

2009-04-09 Thread Mark Murphy

Rob Franz wrote:
> What I am doing is getting the URI of the ringtone that the user selects
> in the ringtone picker.  Then I save it for later use.

That should be in your preferences, though. After all, you're the one
asking for the ringtone via the RingtonePreference, right?

Just open up your SharedPreferences
(PreferenceManager.getDefaultSharedPreferences()) and read out the
value. Or use Preference.OnPreferenceChangeListener to be notified when
the user changed your preference of interest.

I feel like I'm missing something...

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 2.0 Available!

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



[android-developers] Re: list of request codes - their names and values?

2009-04-09 Thread Rob Franz
What I am doing is getting the URI of the ringtone that the user selects in
the ringtone picker.  Then I save it for later use.
It works, but I'm just trying to figure out what that request code is.

Thanks
Rob

On Thu, Apr 9, 2009 at 7:15 PM, Mark Murphy  wrote:

>
> Rob Franz wrote:
> > But this is a RingtonePreference - I'm not starting the activity from
> > code.  RingtonePreference is defined in preferences.xml (which defines
> > how the Preferences are laid out).
> >
> > All I know is that the request code - not the *result code* - that is
> > returned is 100.
> >
> > I need to know the name associated with that value 100... I can't find
> > it anywhere :-)
>
> What are you attempting to achieve by listening on onActivityResult()
> from a PreferenceActivity?
>
> Is it something that could be handled better via a
> Preference.OnPreferenceChangeListener?
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
>
> >
>

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



[android-developers] Re: list of request codes - their names and values?

2009-04-09 Thread Mark Murphy

Rob Franz wrote:
> But this is a RingtonePreference - I'm not starting the activity from
> code.  RingtonePreference is defined in preferences.xml (which defines
> how the Preferences are laid out).
> 
> All I know is that the request code - not the *result code* - that is
> returned is 100.
> 
> I need to know the name associated with that value 100... I can't find
> it anywhere :-)

What are you attempting to achieve by listening on onActivityResult()
from a PreferenceActivity?

Is it something that could be handled better via a
Preference.OnPreferenceChangeListener?

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 2.0 Available!

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



[android-developers] Re: list of request codes - their names and values?

2009-04-09 Thread Rob Franz
But this is a RingtonePreference - I'm not starting the activity from code.
 RingtonePreference is defined in preferences.xml (which defines how the
Preferences are laid out).
All I know is that the request code - not the *result code* - that is
returned is 100.

I need to know the name associated with that value 100... I can't find it
anywhere :-)

Thanks
Rob

On Thu, Apr 9, 2009 at 1:42 AM, for android  wrote:

> The requestCode is the constant you send from ur code which starts the
> activity
>
> startActivityForResult(intent,100);
>
>
> So you are sending the code 100.
>
> you need to look at the result code which are RESULT_OK,RESULT_CANCELED
> which are defined in the Activity class.
>
>
> On Thu, Apr 9, 2009 at 7:09 AM, Rob Franz  wrote:
>
>>
>> Hi all
>> I just can't seem to find this anywhere... I've been googling!
>>
>> I have a RingtonePreference in one of my classes and, upon return, the
>> onActivityResult says that the requestCode being returned is 100.
>>
>> Unfortunately, I can't seem to find the *constant name* for this
>> value.
>>
>> Is there a master list somewhere?  It's just not jumping out at me in
>> the documentation...
>>
>> Thanks
>> Rob
>>
>>
>
> >
>

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



[android-developers] Re: list of request codes - their names and values?

2009-04-08 Thread for android
The requestCode is the constant you send from ur code which starts the
activity

startActivityForResult(intent,100);


So you are sending the code 100.

you need to look at the result code which are RESULT_OK,RESULT_CANCELED
which are defined in the Activity class.

On Thu, Apr 9, 2009 at 7:09 AM, Rob Franz  wrote:

>
> Hi all
> I just can't seem to find this anywhere... I've been googling!
>
> I have a RingtonePreference in one of my classes and, upon return, the
> onActivityResult says that the requestCode being returned is 100.
>
> Unfortunately, I can't seem to find the *constant name* for this
> value.
>
> Is there a master list somewhere?  It's just not jumping out at me in
> the documentation...
>
> Thanks
> Rob
> >
>

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