Android AlertDialog: TYPE_SYSTEM_ALERT -


i have tried out know , can find, still cannot alert dialog show type_system_alert. shows on app when open it, not pop if app not on front.

i've got:

final alertdialog.builder d = new alertdialog.builder(this); d.settitle("app name"); d.setmessage("message"); d.setpositivebutton("ok", null); d.seticon(r.drawable.ic_launcher);  alertdialog dialog = d.create(); dialog.getwindow().settype(windowmanager.layoutparams.type_system_alert); d.show(); 

and have in manifest:

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

what missing??

the function flow before alert following:

  1. broadcast receiver listens incoming sms messages.
  2. once received, passes message function in mainactivity using "runonuithread".
  3. the message parsed , alert dialog shown. why type_system_alert not working?? can see logcat message parsed ok still alert dialog not showing system alert. anyone?

the required permission system apps:

<permission android:name="android.permission.system_alert_window"     android:protectionlevel=    "signature|preinstalled|appop|pre23|development"/> 

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -