Search code examples
androidandroid-activitypreferenceactivityringtone

RingtonePreference and onActivityResult aren't playing nice


I have a PreferenceActivity that contains a RingtonePrefernce built in xml along with other preferences. One of the other preferences acts like a button and does some checks and uses an onActivityResult. This is interfering with the RingtonePreference and now the RingtonePreference is sending its result there instead of handling it itself... Is it possible to tell it to ignore or hide the onActivityResult from the RingtonePreference?


Solution

  • Not sure about the problem without seeing the code, but are you using a custom request code in the other preference? If you are, maybe you should check if the request code in your onActivityResult, handle it if it comes from your preference, or go on and invoke super.onActivityResult otherwise.