Alternative for SYSTEM_ALERT_WINDOW to display an overlay across app activities

732 views Asked by At

Requirement is to add a chat feature in the app, that would be available across all activities in minimized view once initiated - you can start a chat within one activity and keep it live when changing activities.

Solution -> Use this permission, and create a service, to overlay across all screens.

<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />

Problem with the requirement we have -> 

  1. We don't need a view visible over all applications - a view visible only to our app.
  2. Using the above solution requires run time permission from users for api level above >=M.
  3. User can disable this permission from settings, and overlay won’t work.



Is there any way i can achieve this without using this Permission and Service.

0

There are 0 answers