[英]how to show local push notification (on app icon on home screen like i-phone) in android
I am given a task to show local push notification. 我有一个任务显示本地推送通知。 I have successfully completed showing push notification on bar.
我已成功完成在栏上显示推送通知。 But also I have to show local notification on app launching icon on home screen like in i-phone.
但是我也必须在主屏幕上显示关于app启动图标的本地通知,就像在i-phone中一样。 See the image
看图像
I want this kind of notification. 我想要这种通知。 Here, may be the dialog I create using custom AlertDialog.
这里,可能是我使用自定义AlertDialog创建的对话框。 But I'm stuck with the notification on the app icon ie that bubble containing notification no on upper right corner of app icon.
但是我坚持使用应用程序图标上的通知,即在应用程序图标的右上角包含通知no的气泡。 I think this functionality is not given by android sdk.
我认为这个功能不是由android sdk给出的。 but our client says that she has seen these kinds of notifications on her Android mobile for some applications.
但我们的客户说,她已经在她的Android手机上看到过某些应用程序的这类通知。 So is it possible in Android, and if yes then how to do it?
那么在Android中是否可能,如果是,那该怎么做呢?
What you're looking for is a "badge" and I'm sorry to tell you that this does not exist on Android - your client must be mistaken. 您正在寻找的是一个“徽章”,我很遗憾地告诉您,这在Android上不存在 - 您的客户端必定是错误的。
One workaround you could do is to create a widget for your app (and you can even make it look like an app icon if you wish...), and you can add a badge or update how it looks any way you choose. 您可以做的一个解决方法是为您的应用创建一个小部件(如果您愿意,您甚至可以使其看起来像应用程序图标),并且您可以添加徽章或更新它的外观以您选择的方式。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.