How to start an Intent from preference page AND GET RESULTS?

by Jason Parekh » Wed, 29 Apr 2009 07:17:58 GMT


Sponsored Links
 The easiest solution for your situation is to refresh the summaries in your
preference activity's onResume.

Otherwise you'll have to override onPreferenceTreeClick and start the
activity manually.

(sent from phone)




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

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. creating a shared jar library

hey,

i have several apps (each in its own apk, process etc)  running at the
same time on user's device.

these apps are all linked to a single common jar file (internally
devloped) which contains a large portion of their overall code size.

is there a way for me to force Andro to make this common jar load only
once (e.g. into shared memory)?

the reason we want to do it this way, btw, are to reduction of each of
the
single apps memory intake, on disk footprint and possibly of their
startup time.


your help will be appreciated.

tnx, GilkadH

--~--~---------~--~----~------------~-------~--~----~

2. Map view info window

Hi,

I have displayed map view with marker.
now i want,

When i'm clicking marker it should display info window.
When i'm clicking info window i need to redirect another page........

any one can know about these.

please reply me.

thanks in advance..........
--~--~---------~--~----~------------~-------~--~----~

3. why I can't use movieview to play the movie came from the internet?

4. Native database

5. How to populate a listview with XML file to Internet

6. MediaRecorder setVideoFrameRate

7. Bluetooth HID and DUN work