cja
cja

Reputation: 10026

Can AndroidManifest.xml application/intent-filter element contain a value?

The Google developer docs at http://developer.android.com/training/sync-adapters/creating-sync-adapter.html#DeclareSyncAdapterManifest give this example of a service declaration in the manifest:

<service
    android:name="com.example.android.datasync.SyncService"
    android:exported="true"
    android:process=":sync">
    <intent-filter>com.example.android.datasync.provider
        <action android:name="android.content.SyncAdapter"/>
    </intent-filter>
    <meta-data android:name="android.content.SyncAdapter"
               android:resource="@xml/syncadapter" />
</service>  

To reiterate, the above XML is written by Google, in their own Android developer documentation, at the link above.

Note the value of the intent-filter element: com.example.android.datasync.provider. The intent-filter developer documentation at http://developer.android.com/guide/topics/manifest/intent-filter-element.html doesn't say that it is valid and doesn't say how the value would be used if it was present.

Is it valid for intent-filter to have a value and if so then what would the value be used for?

If it's not valid then what might Google have intended by writing this?

Upvotes: 1

Views: 140

Answers (2)

j__m
j__m

Reputation: 9625

This text is not used by PackageParser at all and is most likely a mistake.

Upvotes: 0

c0m3tx
c0m3tx

Reputation: 98

That looks like a typo. Never seen something like that, and it doesn't make sense. Moreover, in the following text that text is never quoted.

However, if you search it in the page you'll notice that's something about an "authority", but once more I have no idea why it's written that way.

Normally intent-filters only have one or more actions which are the ones which trigger the service onReceive.

Upvotes: 1

Related Questions