see: http://www.anddev.org/starting_intent_from_preferences_screen-t4505.html
This invokes an Intent directly from Preferences XML which is handy. (Perhaps you could specify ACTION_GET_CONTENT to return a value to your app, although I have not tried this.) Invoking the intent works OK internally, but I have not been able to invoke an activity outside of my application. For instance, I have not been able to invoke the generic phone Dialer. I have only been able to invoke activities defined in my manifest file. This doesn't seem fair since you can invoke outside activities through java code using intents... br, Jim On Mar 6, 6:37 pm, Xin Zhao <uszhao...@gmail.com> wrote: > Hey guys, > > I am trying to start an intent from a preference activity, AND GET RESULTS > once the new intent is done. As such, I can update the summary of the > preference. > > Normall we do startActivityForResult() to wait for results. But how can I do > this here? > > My code is as follow: > > PreferenceScreen intentPref = > getPreferenceManager().createPreferenceScreen(this); > Intent intent = new Intent(this, PolicyEditor.class); > intent.putExtra(PhoneCardDbAdapter.COL_ROWID, (long)rule.mRuleID); > intentPref.setIntent(intent); <--- I want to make sure once the > activity related to intent is done, we can update the summary > title = "Rule " + (i+1); > summary = rule.ruleSummary(); > intentPref.setTitle(title); > intentPref.setSummary(summary); > mlaunchPrefCat.addPreference(intentPref); > > Any idea? > > Thanks, > xin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---