I want to show a live map inside an andriod notification. Is it possible to create a google map activity inside an android notification and pass it long lat values to show the location of a restaurant/location and an eta from that point ?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
No, that is not possible, assuming that by "live map" you mean Maps V2's MapView
. The RemoteViews
that you can use in a Notification
can only handle a few widgets, and MapView
is not one of them.
You are welcome to use some sort of static map image generator and show that image in an ImageView
in the Notification
.
Note that even an expanded Notification
is not all that large, so your map will be rather small.