在服务启动对话框时不依赖Activity


在服务启动对话框不依赖Activity
 Builder builder=new Builder(getApplicationContext());
builder.setTitle("Title");
builder.setMessage("This is message");
builder.setNegativeButton("OK", null);
Dialog dialog=builder.create();
dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
dialog.show();
权限


 

你可能感兴趣的:(在服务启动对话框时不依赖Activity)