简体   繁体   English

如何在Android上制作类似“ Google Play服务”的叠加提示?

[英]How to make “Google Play Service”-like overlay prompt on android?

Sorry for my bad English. 对不起,我的英语不好。

I need to make an native SDK to show an overlay popup window to show a message on the top of the current activity. 我需要制作一个本机SDK,以显示一个叠加弹出窗口,以在当前活动的顶部显示一条消息。

The window will show about several seconds and then dismiss. 窗口将显示约几秒钟,然后关闭。

When the window is showing, the content behind needs to be active. 当窗口显示时,后面的内容需要处于活动状态。

I try several methods, such as startActivity with not touchable and popupWindow.showAtLocation , but no one can act as the same behavior like Google Play Service-overlay window when you log in using Google account in applications. 我尝试了几种方法,例如带有popupWindow.showAtLocation startActivitypopupWindow.showAtLocation ,但是当您在应用程序中使用Google帐户登录时,没有人可以像Google Play服务覆盖窗口那样表现相同的行为。

I cannot get the current activity context or the current view since I don't have the GET_TASK permission. 由于我没有GET_TASK权限,因此无法获取当前活动上下文或当前视图。

Google Play popup overlay window Screenshot: Google Play弹出式叠加窗口截图: http://www.blogcdn.com/www.engadget.com/media/2013/05/googleplaygameservices619pxhedimg.jpg

I need advise, thanks. 我需要建议,谢谢。

I think you need to create a showCase for your app. 我认为您需要为您的应用创建一个showCase。

This library will help you . 该库将为您提供帮助。

if you want more customization . 如果您想要more customization you have to create a Service. 您必须创建一个服务。 And read this question if you want an overlay. 如果您想要覆盖,请阅读此问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM