See Also: ServiceAttribute Members
The //service element is used to declare a service, which are used to implement long-running background operations or a rich communicationsAPI that can be called by other applications. The Android.App.ServiceAttribute custom attribute is used by monodroid.exe when generating AndroidManifest.xml to to declaratively generate //service elements.
The type this attribute is placed on must be a (possibly indirect) subclass of Android.App.Service.
The following type declaration
C# Example
[Service (Name="mono.samples.HelloService", Label="Service Label")] class MyService : Service { }
results in the following XML fragment:
XML Example
<service android:label="Service Label" android:name="mono.samples.HelloService" />
In addition, types using the Android.App.ServiceAttribute custom attribute can also use the Android.App.IntentFilterAttribute and Android.App.MetaDataAttribute custom attributes to declaratively generate the nested //service/intent-filter and //service/meta-data elements, respectively.