how to call the google map from my android application like invoke the email

余生长醉 提交于 2019-12-02 00:58:34

问题


try {
        Intent searchAddress = new Intent(Intent.ACTION_VIEW, 
        Uri.parse("geo:0,0?="+emp_city_location));
        startActivity(searchAddress);
    } catch(Exception e) {
        System.out.println(e);
    }

i got the exception like

03-03 21:01:56.349: INFO/System.out(179): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=geo:0,0?=chennai }

please do reply me


回答1:


You need to construct your geo: URL properly. See the documentation for the syntax. I think you may only be missing a q between the ? and the =, but I have not tried that particular geo: syntax.




回答2:


Make sure that you are using the Google API emulator image for your testing. Bring up the AVD and set the emulator to be a Google API emulator. If you don't do this, then you will continue to get the bug. Also, the previous poster was right... you need to following the URI standards found here: http://developer.android.com/intl/de/guide/appendix/g-app-intents.html

Regards, Chris




回答3:


Have declared Activity in manifest file also check have you added Google map library in manifest file




回答4:


Try something like this :

geo:0,0?q=chennai


来源:https://stackoverflow.com/questions/2372557/how-to-call-the-google-map-from-my-android-application-like-invoke-the-email

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!