Making Dynamic Island app for Android

Osama Alek
2 min readSep 29, 2022

In this article we will make a Dynamic Island app for android

The Dynamic Island is a new feature in Apple Devices.

Let’s start:

The first step is to add these permissions to the manifest file

<uses-permission android:name="android.permission.ACTION_MANAGE_OVERLAY_PERMISSION" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.BIND_ACCESSIBILITY_SERVICE"
tools:ignore="ProtectedPermissions" />

Then we should create an accessibility service

The most important function is showTheIsland that draws on the device screen.

Now we need to create the island layout

And we need to add our service to the manifest file

<service
android:name=".DynamicIslandService"
android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="android.accessibilityservice.AccessibilityService"/>
</intent-filter>
<meta-data android:name="android.accessibilityservice" android:resource="@xml/overlay_layout"/>

</service>

The last step is to add some code to the MainActivity:

  1. Check if the app can draw over the screen.
  2. Request Overlay permission.
  3. Check if accessibility service is enabled.
  4. Move to settings for enabling the service.

You can turn the service on or off from the accessibility settings.

We will suffice here to keep the example as simple as possible.

You can add a lot of features to this simple project such as a quick access list, notifications, including it in your app, and more.

The source code for this demo app can be found here:

--

--

Osama Alek

Android Developer, I love to share my experience in tech and software development. You can find me on linkedin.com/in/osama-alek-27a352202/ github.com/osamaalek