How do I open google maps app on tapping an address?How can I open a URL in Android's web browser from my application?Launching Google Maps Directions via an intent on AndroidHow can I find the latitude and longitude from address?How do I show a marker in Maps launched by geo URI Intent?Android: Clear the back stackSend Email IntentHow to open the Google Play Store directly from my Android application?Google Maps Android API v2 - Interactive InfoWindow (like in original android google maps)Get Complete detail when tapping on icon which is on Android Google MapHow to get an address back from the google maps app?
How do I iterate equal values with the standard library?
What is it called when the tritone is added to a minor scale?
Is it acceptable that I plot a time-series figure with years increasing from right to left?
When is one 'Ready' to make Original Contributions to Mathematics?
How serious is plagiarism in a master’s thesis?
How come a desk dictionary be abridged?
What is the maximum amount of diamond in one Minecraft game?
How to supply water to a coastal desert town with no rain and no freshwater aquifers?
Should I cheat if the majority does it?
Should I increase my 401(k) contributions, or increase my mortgage payments
Boss furious on bad appraisal
Is it bad to suddenly introduce another element to your fantasy world a good ways into the story?
Has there ever been a cold war other than between the U.S. and the U.S.S.R.?
Initializing variables variable in an "if" statement
Is it possible to spoof an IP address to an exact number?
Is this standard Japanese employment negotiations, or am I missing something?
In the Seventh Seal why does Death let the chess game happen?
How would a sea turtle end up on its back?
Did William Shakespeare hide things in his writings?
Sleepy tired vs physically tired
Are "confidant" and "confident" homophones?
Find max number you can create from an array of numbers
Did Stalin kill all Soviet officers involved in the Winter War?
What is the difference between an "empty interior" and a "hole" in topology?
How do I open google maps app on tapping an address?
How can I open a URL in Android's web browser from my application?Launching Google Maps Directions via an intent on AndroidHow can I find the latitude and longitude from address?How do I show a marker in Maps launched by geo URI Intent?Android: Clear the back stackSend Email IntentHow to open the Google Play Store directly from my Android application?Google Maps Android API v2 - Interactive InfoWindow (like in original android google maps)Get Complete detail when tapping on icon which is on Android Google MapHow to get an address back from the google maps app?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have an address param within my app say " 921 Beverly Hills, california, CA- 09001"
Upon tapping this I want google maps to open and show annotation for this exact address. How do I do that?
Any clue?
android android-intent android-location android-maps android-googleapiclient
add a comment |
I have an address param within my app say " 921 Beverly Hills, california, CA- 09001"
Upon tapping this I want google maps to open and show annotation for this exact address. How do I do that?
Any clue?
android android-intent android-location android-maps android-googleapiclient
add a comment |
I have an address param within my app say " 921 Beverly Hills, california, CA- 09001"
Upon tapping this I want google maps to open and show annotation for this exact address. How do I do that?
Any clue?
android android-intent android-location android-maps android-googleapiclient
I have an address param within my app say " 921 Beverly Hills, california, CA- 09001"
Upon tapping this I want google maps to open and show annotation for this exact address. How do I do that?
Any clue?
android android-intent android-location android-maps android-googleapiclient
android android-intent android-location android-maps android-googleapiclient
asked Mar 25 at 19:48
Marissa NicholasMarissa Nicholas
1
1
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
launch maps
There are great resources to get you going this is a sample. In a real app you would want to handle the intent with your own map activity; maybe add bounds and a camera to zoom in or whatever...
Location sf = new Location("");
sf.setLatitude(37.7749);
sf.setLongitude(-122.4194);
requestLocation("your address");
public void requestLocation(Location location)
// Create a Uri from an intent string. Use the result to
// create an Intent.
Uri gmmIntentUri = Uri.parse("geo:" + location.getLatitude() + "," + location.getLongitude());
// Create an Intent from gmmIntentUri. Set the action to
// ACTION_VIEW
Intent mapIntent = new Intent(Intent.ACTION_VIEW,
gmmIntentUri);
// Make the Intent explicit by setting the Google Maps
// package
mapIntent.setPackage("com.google.android.apps.maps");
if (mapIntent.resolveActivity(getPackageManager()) != null)
startActivityForResult(mapIntent, REQUEST_LOCATION);
public void requestLocation(String address)
// Create a Uri from an intent string. Use the result to create
//an Intent.
Uri gmmIntentUri = Uri.parse("geo:" + address);
// Make the Intent explicit by setting the Google Maps
// package
mapIntent.setPackage("com.google.android.apps.maps");
if (mapIntent.resolveActivity(getPackageManager()) != null)
startActivityForResult(mapIntent, REQUEST_LOCATION);
added a link. please note that the code does not zoom to the location. I think it puts a tiny gray dot there; no marker...
– keepTrackOfYourStack
Mar 25 at 21:27
add a comment |
Here you can find an overview on how to use intents to start Google Maps with an Address:
https://developers.google.com/maps/documentation/urls/android-intents
I didn';t find anything for exact address there. are there any with exact address like mine?
– Marissa Nicholas
Mar 25 at 19:59
There was a line of code missing to set the address, sorry.
– keepTrackOfYourStack
Mar 25 at 21:36
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55345387%2fhow-do-i-open-google-maps-app-on-tapping-an-address%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
launch maps
There are great resources to get you going this is a sample. In a real app you would want to handle the intent with your own map activity; maybe add bounds and a camera to zoom in or whatever...
Location sf = new Location("");
sf.setLatitude(37.7749);
sf.setLongitude(-122.4194);
requestLocation("your address");
public void requestLocation(Location location)
// Create a Uri from an intent string. Use the result to
// create an Intent.
Uri gmmIntentUri = Uri.parse("geo:" + location.getLatitude() + "," + location.getLongitude());
// Create an Intent from gmmIntentUri. Set the action to
// ACTION_VIEW
Intent mapIntent = new Intent(Intent.ACTION_VIEW,
gmmIntentUri);
// Make the Intent explicit by setting the Google Maps
// package
mapIntent.setPackage("com.google.android.apps.maps");
if (mapIntent.resolveActivity(getPackageManager()) != null)
startActivityForResult(mapIntent, REQUEST_LOCATION);
public void requestLocation(String address)
// Create a Uri from an intent string. Use the result to create
//an Intent.
Uri gmmIntentUri = Uri.parse("geo:" + address);
// Make the Intent explicit by setting the Google Maps
// package
mapIntent.setPackage("com.google.android.apps.maps");
if (mapIntent.resolveActivity(getPackageManager()) != null)
startActivityForResult(mapIntent, REQUEST_LOCATION);
added a link. please note that the code does not zoom to the location. I think it puts a tiny gray dot there; no marker...
– keepTrackOfYourStack
Mar 25 at 21:27
add a comment |
launch maps
There are great resources to get you going this is a sample. In a real app you would want to handle the intent with your own map activity; maybe add bounds and a camera to zoom in or whatever...
Location sf = new Location("");
sf.setLatitude(37.7749);
sf.setLongitude(-122.4194);
requestLocation("your address");
public void requestLocation(Location location)
// Create a Uri from an intent string. Use the result to
// create an Intent.
Uri gmmIntentUri = Uri.parse("geo:" + location.getLatitude() + "," + location.getLongitude());
// Create an Intent from gmmIntentUri. Set the action to
// ACTION_VIEW
Intent mapIntent = new Intent(Intent.ACTION_VIEW,
gmmIntentUri);
// Make the Intent explicit by setting the Google Maps
// package
mapIntent.setPackage("com.google.android.apps.maps");
if (mapIntent.resolveActivity(getPackageManager()) != null)
startActivityForResult(mapIntent, REQUEST_LOCATION);
public void requestLocation(String address)
// Create a Uri from an intent string. Use the result to create
//an Intent.
Uri gmmIntentUri = Uri.parse("geo:" + address);
// Make the Intent explicit by setting the Google Maps
// package
mapIntent.setPackage("com.google.android.apps.maps");
if (mapIntent.resolveActivity(getPackageManager()) != null)
startActivityForResult(mapIntent, REQUEST_LOCATION);
added a link. please note that the code does not zoom to the location. I think it puts a tiny gray dot there; no marker...
– keepTrackOfYourStack
Mar 25 at 21:27
add a comment |
launch maps
There are great resources to get you going this is a sample. In a real app you would want to handle the intent with your own map activity; maybe add bounds and a camera to zoom in or whatever...
Location sf = new Location("");
sf.setLatitude(37.7749);
sf.setLongitude(-122.4194);
requestLocation("your address");
public void requestLocation(Location location)
// Create a Uri from an intent string. Use the result to
// create an Intent.
Uri gmmIntentUri = Uri.parse("geo:" + location.getLatitude() + "," + location.getLongitude());
// Create an Intent from gmmIntentUri. Set the action to
// ACTION_VIEW
Intent mapIntent = new Intent(Intent.ACTION_VIEW,
gmmIntentUri);
// Make the Intent explicit by setting the Google Maps
// package
mapIntent.setPackage("com.google.android.apps.maps");
if (mapIntent.resolveActivity(getPackageManager()) != null)
startActivityForResult(mapIntent, REQUEST_LOCATION);
public void requestLocation(String address)
// Create a Uri from an intent string. Use the result to create
//an Intent.
Uri gmmIntentUri = Uri.parse("geo:" + address);
// Make the Intent explicit by setting the Google Maps
// package
mapIntent.setPackage("com.google.android.apps.maps");
if (mapIntent.resolveActivity(getPackageManager()) != null)
startActivityForResult(mapIntent, REQUEST_LOCATION);
launch maps
There are great resources to get you going this is a sample. In a real app you would want to handle the intent with your own map activity; maybe add bounds and a camera to zoom in or whatever...
Location sf = new Location("");
sf.setLatitude(37.7749);
sf.setLongitude(-122.4194);
requestLocation("your address");
public void requestLocation(Location location)
// Create a Uri from an intent string. Use the result to
// create an Intent.
Uri gmmIntentUri = Uri.parse("geo:" + location.getLatitude() + "," + location.getLongitude());
// Create an Intent from gmmIntentUri. Set the action to
// ACTION_VIEW
Intent mapIntent = new Intent(Intent.ACTION_VIEW,
gmmIntentUri);
// Make the Intent explicit by setting the Google Maps
// package
mapIntent.setPackage("com.google.android.apps.maps");
if (mapIntent.resolveActivity(getPackageManager()) != null)
startActivityForResult(mapIntent, REQUEST_LOCATION);
public void requestLocation(String address)
// Create a Uri from an intent string. Use the result to create
//an Intent.
Uri gmmIntentUri = Uri.parse("geo:" + address);
// Make the Intent explicit by setting the Google Maps
// package
mapIntent.setPackage("com.google.android.apps.maps");
if (mapIntent.resolveActivity(getPackageManager()) != null)
startActivityForResult(mapIntent, REQUEST_LOCATION);
edited Mar 25 at 21:35
answered Mar 25 at 21:03
keepTrackOfYourStackkeepTrackOfYourStack
7464 silver badges14 bronze badges
7464 silver badges14 bronze badges
added a link. please note that the code does not zoom to the location. I think it puts a tiny gray dot there; no marker...
– keepTrackOfYourStack
Mar 25 at 21:27
add a comment |
added a link. please note that the code does not zoom to the location. I think it puts a tiny gray dot there; no marker...
– keepTrackOfYourStack
Mar 25 at 21:27
added a link. please note that the code does not zoom to the location. I think it puts a tiny gray dot there; no marker...
– keepTrackOfYourStack
Mar 25 at 21:27
added a link. please note that the code does not zoom to the location. I think it puts a tiny gray dot there; no marker...
– keepTrackOfYourStack
Mar 25 at 21:27
add a comment |
Here you can find an overview on how to use intents to start Google Maps with an Address:
https://developers.google.com/maps/documentation/urls/android-intents
I didn';t find anything for exact address there. are there any with exact address like mine?
– Marissa Nicholas
Mar 25 at 19:59
There was a line of code missing to set the address, sorry.
– keepTrackOfYourStack
Mar 25 at 21:36
add a comment |
Here you can find an overview on how to use intents to start Google Maps with an Address:
https://developers.google.com/maps/documentation/urls/android-intents
I didn';t find anything for exact address there. are there any with exact address like mine?
– Marissa Nicholas
Mar 25 at 19:59
There was a line of code missing to set the address, sorry.
– keepTrackOfYourStack
Mar 25 at 21:36
add a comment |
Here you can find an overview on how to use intents to start Google Maps with an Address:
https://developers.google.com/maps/documentation/urls/android-intents
Here you can find an overview on how to use intents to start Google Maps with an Address:
https://developers.google.com/maps/documentation/urls/android-intents
answered Mar 25 at 19:55
themysteriousMthemysteriousM
62 bronze badges
62 bronze badges
I didn';t find anything for exact address there. are there any with exact address like mine?
– Marissa Nicholas
Mar 25 at 19:59
There was a line of code missing to set the address, sorry.
– keepTrackOfYourStack
Mar 25 at 21:36
add a comment |
I didn';t find anything for exact address there. are there any with exact address like mine?
– Marissa Nicholas
Mar 25 at 19:59
There was a line of code missing to set the address, sorry.
– keepTrackOfYourStack
Mar 25 at 21:36
I didn';t find anything for exact address there. are there any with exact address like mine?
– Marissa Nicholas
Mar 25 at 19:59
I didn';t find anything for exact address there. are there any with exact address like mine?
– Marissa Nicholas
Mar 25 at 19:59
There was a line of code missing to set the address, sorry.
– keepTrackOfYourStack
Mar 25 at 21:36
There was a line of code missing to set the address, sorry.
– keepTrackOfYourStack
Mar 25 at 21:36
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55345387%2fhow-do-i-open-google-maps-app-on-tapping-an-address%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown