Dynamic IntentFilters

by Jonathan Herriott » Mon, 13 Apr 2009 21:49:10 GMT


Sponsored Links
 So, I have an instance where I want applications to be able to
dynamically specify what subset of data objects in my ContentProvider
they want to receive intents for.  The issue is that since it isn't
known at compile-time, I want them to be able to specify at runtime,
so I can query for the activities that implement the intent filter for
a specific data object and display that list.  I know Android allows
dynamically registering Receivers, so would it be possible to allow
dynamically registering Activities for specific IntentFilters in the
framework?  Is this too much of a security issue to allow?
--~--~---------~--~----~------------~-------~--~----~



Dynamic IntentFilters

by Dianne Hackborn » Mon, 13 Apr 2009 21:57:48 GMT


 Currently the contents of a manifest are static, and you can't change these
(even receivers) at runtime.  Receivers are a little bit of a special case
because you can dynamically register additional receivers while your app is
running -- but these only exist while your app is running, and are
completely independent of the receivers in the manifest (and work a little
differently from them, too).






-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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


Sponsored Links


Other Threads

1. a real-time Walkie Talkie for beta test

Hello friends,

We have just released a real-time Push-To-Talk application on Android
Market.

Thanks to Speex and NDK, the voice streams take much less network/CPU
bandwidth than PCM or G.711.

Voice streams are peer-to-peer to minimize delay whenever it is
possible to do so between parties behind firewalls.

Talks can be stored on SD-CARD and replayed.

The application is location based.

Most of important of all, it is free!!

Please give it a try and tell us how it doing while we are adding Push-
To-Video function to the application.

Thank you very much!!

Flea Papa

-- 

2. A clear, concise tutorial on PreferenceActivity & Preferences?

I was wondering can anyone direct me to a detailed Preferences
tutorial?

Or provide me with a bit of help here?

I have my preferences saved in preferences.xml as follows:

<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/
android">
<PreferenceCategory android:title="Wifi Settings">

    <EditTextPreference
            android:key="edittext_block_attach_err"
            android:title="@string/title_edittext_preference"
            android:summary="@string/summary_edittext_preference"
            android:dialogTitle="@string/
dialog_title_edittext_preference" />

</PreferenceCategory>

</PreferenceScreen>

I then have a preference activity as follows:

public class WlanSettings extends PreferenceActivity {

SharedPreferences prefs;


@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    addPreferencesFromResource(R.xml.preferences);
    prefs = this.getSharedPreferences("CiceroWlanSettings",
Activity.MODE_PRIVATE);


}

This display's the EditTextPreference fine but how do I then set up a
default preference to be displayed in the dialog box that pops up with
an EditTextPreference?

And How do I save changes that occur in my preference activity to my
preferences?

-- 

3. Android 2.1+ on G1 dev phone

4. (WTShare) Battery Time Lite di spica bikin lag

5. Hybrid positioning System(XPS)

6. Gallery View Customization

7. start native google maps app from webview