Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8796721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:41:15+00:00 2026-06-13T23:41:15+00:00

I’m trying to make a button in my app open the google maps app

  • 0

I’m trying to make a button in my app open the google maps app at a specific location. I have been trying to use a URI and intent. When I try to start the activity, the app quits unexpectedly. This only happens when I’m using geo:x.x,x.x. I’m able to make it open a web address, but not the google maps app. I’m not really sure what the problem is here, but here is the onclick method for the button I’m using:

  mapButton.setOnClickListener(new OnClickListener() {

        public void onClick(View v){

            String UriString = getResources().getString(R.string.map_location);
            Uri geoUri = Uri.parse(UriString);
            Intent mapCall = new Intent(Intent.ACTION_VIEW, geoUri);
            startActivity(mapCall);
        }

   });

I feel like this should be simple enough, but it just won’t work for me. Any help would be appreciated!

In case it helps, this is the rest of the code I’ve written so far:

public class MainActivity extends Activity implements OnClickListener{

public Button courseButton;
public Button mapButton;
public Button newsButton;
public Button directoryButton;
public Button calendarButton;
public Button videoButton;

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    mapButton = (Button)findViewById(R.id.mapButton);
    courseButton = (Button)findViewById(R.id.courseButton);
    newsButton = (Button)findViewById(R.id.newsButton);
    directoryButton = (Button)findViewById(R.id.directoryButton);
    calendarButton = (Button)findViewById(R.id.calendarButton);
    videoButton = (Button)findViewById(R.id.videoButton);

    courseButton.setOnClickListener(this);

    mapButton.setOnClickListener(new OnClickListener() {

        public void onClick(View v){


            String UriString = getResources().getString(R.string.map_location);
            Uri geoUri = Uri.parse(UriString);
            Intent mapCall = new Intent(Intent.ACTION_VIEW, geoUri);

            startActivity(mapCall);
            }


    });


    newsButton.setOnClickListener(new OnClickListener(){

        public void onClick(View v){
            String UriString = getResources().getString(R.string.rss_feed);
            Uri rssUri = Uri.parse(UriString);
            Intent rssCall = new Intent(Intent.ACTION_VIEW, rssUri);
            startActivity(rssCall);
        }
    });


    directoryButton.setOnClickListener(this);
    calendarButton.setOnClickListener(this);
    videoButton.setOnClickListener(this);

}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    getMenuInflater().inflate(R.menu.activity_main, menu);
    return true;
}

public void onClick(View arg0) {
    // TODO Auto-generated method stub

    }   
}

I’m just really at a loss here.

As requested:

10-29 23:02:25.031: E/AndroidRuntime(324): FATAL EXCEPTION: main
10-29 23:02:25.031: E/AndroidRuntime(324): android.content.ActivityNotFoundException: No    Activity found to handle Intent { act=android.intent.action.VIEW  dat=geo:44.873799766954136, -91.92715644836426?z=22 }
10-29 23:02:25.031: E/AndroidRuntime(324):  at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1409)
10-29 23:02:25.031: E/AndroidRuntime(324):  at android.app.Instrumentation.execStartActivity(Instrumentation.java:1379)
10-29 23:02:25.031: E/AndroidRuntime(324):  at android.app.Activity.startActivityForResult(Activity.java:2827)
10-29 23:02:25.031: E/AndroidRuntime(324):  at android.app.Activity.startActivity(Activity.java:2933)
10-29 23:02:25.031: E/AndroidRuntime(324):  at com.example.stout.MainActivity$1.onClick(MainActivity.java:46)
10-29 23:02:25.031: E/AndroidRuntime(324):  at android.view.View.performClick(View.java:2485)
10-29 23:02:25.031: E/AndroidRuntime(324):  at android.view.View$PerformClick.run(View.java:9080)
10-29 23:02:25.031: E/AndroidRuntime(324):  at android.os.Handler.handleCallback(Handler.java:587)
10-29 23:02:25.031: E/AndroidRuntime(324):  at android.os.Handler.dispatchMessage(Handler.java:92)
10-29 23:02:25.031: E/AndroidRuntime(324):  at android.os.Looper.loop(Looper.java:123)
10-29 23:02:25.031: E/AndroidRuntime(324):  at android.app.ActivityThread.main(ActivityThread.java:3683)
10-29 23:02:25.031: E/AndroidRuntime(324):  at java.lang.reflect.Method.invokeNative(Native Method)
10-29 23:02:25.031: E/AndroidRuntime(324):  at java.lang.reflect.Method.invoke(Method.java:507)
10-29 23:02:25.031: E/AndroidRuntime(324):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
10-29 23:02:25.031: E/AndroidRuntime(324):  at   com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
10-29 23:02:25.031: E/AndroidRuntime(324):  at dalvik.system.NativeStart.main(Native     Method)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T23:41:16+00:00Added an answer on June 13, 2026 at 11:41 pm

    You are seeing the activity not found exception because google maps is not installed on the default emulator/ is not part of AOSP builds which the emulator uses.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I am trying to loop through a bunch of documents I have to put
I'm making a simple page using Google Maps API 3. My first. One marker
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.