kingston
kingston

Reputation: 11419

permission for exported service in android

I installed the new android ADT and now I see warnings about exported services defined in the AndroidManifest that do not require a permission. The problem is that the services are related with the sync adapter. In the SampleSyncAdaapter there are no required permissions either but I do not see that warning.

Which permission should I define for the sync adapter?

I have the same problem for the service that handles CLEAR_MISSED_CALLS.

Upvotes: 2

Views: 1544

Answers (1)

aggregate1166877
aggregate1166877

Reputation: 3230

You are getting that warning because you are exporting the service with no permission restrictions. In your <service> declaration, make the permission android:permission="your.app.name". Example:
<service android:name=".ClassName" android:permission="your.app.name"></service>

For a more detailed explanation, have a look here.

Upvotes: 2

Related Questions