I have successfully implemented the Android firebase app invites functionality using this link and it is working fine for most of the devices.
But on marshmallow device (6.0.1) when I click on the sms contact, the system crashes with message "Unfortunately Google Play Services has Stopped.".
In log I get the following error:
11-08 15:09:29.854 1364-1364/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.google.android.gms.ui, PID: 1364
java.lang.SecurityException: com.google.android.gms from uid 10017 not allowed to perform SYSTEM_ALERT_WINDOW
at android.os.Parcel.readException(Parcel.java:1620)
at android.os.Parcel.readException(Parcel.java:1573)
at android.view.IWindowSession$Stub$Proxy.addToDisplay(IWindowSession.java:791)
at android.view.ViewRootImpl.setView(ViewRootImpl.java:813)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:337)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
at dkm.a(:com.google.android.gms:146)
at dkm.a(:com.google.android.gms:128)
at dgw.h(:com.google.android.gms:1037)
at dgw.c(:com.google.android.gms:863)
at dgw.a(:com.google.android.gms:582)
at dif.onClick(:com.google.android.gms:75)
at android.view.View.performClick(View.java:5697)
at android.view.View$PerformClick.run(View.java:22526)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7224)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
11-08 15:09:29.884 4044-1551/? E/android.os.Debug: ro.product_ship = true
11-08 15:09:29.884 4044-1551/? E/android.os.Debug: ro.debug_level = 0x4f4c
11-08 15:09:29.884 4044-1551/? E/android.os.Debug: sys.mobilecare.preload = false
I tried giving the permission but it is still not working. Any help would be appreciated.