在Android的广播接收器对话框问题 [英] BroadCast receiver dialog issue in Android

查看:142
本文介绍了在Android的广播接收器对话框问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有关于广播接收器弹出的问题。我以活动与主题对话框实现弹出。但是,当应用程序在后台,我收到了广播。弹出窗口显示上方打开我的活动没有独立。

I am having the issue regarding popup in broadcast receiver. I have implemented the popup by using activity with theme dialog. But When the app is in background and i received a broadcast. the popup window display above of the my opened activity no stand alone.

如何打开弹出窗口而已,不是我上面的背景活动。

How to open the popup window only, not above my background activity.

推荐答案

我想..在你的onReceive方法......你可以这样写

I guess.. in your onReceive method... you can write this

 Intent i = new Intent(context, NightClock.class);
        i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        context.startActivity(i); 

这篇关于在Android的广播接收器对话框问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆