Alert appearing on all screens

0

Personal how to make my alert appear like a low battery alert or someone receiving a call, that no matter where the user is in the application, they receive this alert?

new AlertDialog.Builder(MonitorarSerChamadoActivity.this)
    .setTitle("ATENÇÃO")
    .setMessage("OCORREU UM CHAMADO NA " + msg + ".")
    .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
        @Override
        public void onClick(DialogInterface dialog, int which) {
            v.cancel();
            mp.stop();
        }
    }).show();
    
asked by anonymous 24.04.2018 / 14:27

0 answers