Working With Android Service

Sam myles
Aug 1, 2021

--

I learn’t about services Pluralsight under Google Africa Scholarship,It was well explained and i have been using services ever since.

What’s a service?Services are components running without a user interface and with a conceptual affinity
toward long-running processes. They are separate from notifications in the status bar or a
Toast. Services can be started by apps, or they can be bound to by apps, or both.There are different types of services.Tried to put them in way that they are self explanatory.

Declaring Services:Services get declared inside the app’s AndroidManifest.xml file as follows:

<?xml version=”1.0" encoding=”utf-8"?>
<manifest …>
<application …>
<activity …>
</activity>
<service
android:name=”.MyService”
android:enabled=”true”
android:exported=”true”>
</service>
</application>
</manifest>

--

--