开发者

Android application need to detect if the user came back from Google Maps Intent

开发者 https://www.devze.com 2023-04-09 04:45 出处:网络
I\'m making an App and I use the Google Maps navigation Intent intent = new Intent(android.content.Intent.ACTION_VIEW,

I'm making an App and I use the Google Maps navigation

Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
                Uri.parse("http://maps.google.com/maps?saddr=" + mLat + "," + mLng + "&daddr=" + mLatitude + " , " + mLongitude + ""));

And if the user come back from this intent I want to show the rating bar for the place the user has navigated t开发者_开发技巧o. Is startActivityForResult something I can use on Intent not from my application? Or is there another way to detect the user did came back to my App?


I don't know if you can get back something from an Intent you just throw up in the air for Android to handle but...

I'd recommend showing the map within one of your own activity; this way you'd exactly know what the user has done and which pin they've selected. You can then setResult in that Activity and get back the information.

I know it involves little bit more of development but you'd have total control of the map view and what the user do there. I'm sure you've seen this but take a look.

http://developer.android.com/resources/tutorials/views/hello-mapview.html

-serkan

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号