简体   繁体   English

在地图活动上方打开活动

[英]Open an Activity on top of Map activity

I need to open two activities simultaneously, one of them is an Android intent for launching route on Google maps. 我需要同时打开两个活动,其中之一是Android意图在Google地图上启动路线。

For this I used, PendingIntent.getActivities. 为此,我使用了PendingIntent.getActivities。 Using this method it looks whenever I launch more than one activity the data doesn't gets delivered to Android map activity. 使用这种方法,每当我启动多个活动时,数据就不会传递到Android地图活动中。

As a workaround for this I created another Activity and from there I am launching these two activities, using startActivity twice. 作为一种解决方法,我创建了另一个活动,然后使用startActivity两次启动这两个活动。

This starts both of them, but not in the same required sequence, the map activity is always on top, while the second one comes to front when I press the back and finish the Map, even using delayed launch of the other activity does not creates any effect. 这将启动它们两个,但不是按相同的必需顺序进行,map活动始终位于最前面,而当我按后退并完成Map时,第二个活动位于最前面,即使使用其他活动的延迟启动也不会创建任何效果。

Any help ? 有什么帮助吗?

So, 所以,

Finally I used a work around, and launched the activity using pending intent, and it's working now. 最后,我使用了一个变通方法,并使用未决的意图启动了该活动,现在它正在工作。

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

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