Android how can I get coordinates and add it to link automatically

rooot_999

I'm developing an application that organized my addresses, and I would like to achieve the following:

When I click on the add address button there will be two text boxes, Name and Link. I want the Link text box to get the current location automatically and add the coordinates to this URL:

http://maps.google.com/maps?q=

For example this is the coordinates 27.123456,49.123456 so the final result will be like this:

http://maps.google.com/maps?q=27.123456,49.123456

I searched for hours but all I manged to do is to get the current location coordinates. So please guys if any one can help me with it I'll be extremely thankful.

*** Update this is the problem now :

public void buildLink(float textLatt, float textLot) {
return String.format("http://maps.google.com/maps?q=%f,%f", textLatt, textLot);
}
rooot_999
txtmylink.setText(
    String.valueOf("http://maps.google.com/maps?q=") + 
    String.valueOf(mLastLocation.getLatitude()) +
    String.valueOf(",") + 
    String.valueOf(mLastLocation.getLongitude()));

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How can I automatically add a class to a link based on active anchor?

From Dev

Selenium: How can I get the link for downloads that started automatically?

From Dev

How can I get the coordinates of my mouse?

From Dev

How can I add a link to the <i> tag?

From Dev

How can I add a link to the <i> tag?

From Dev

How can i get link content (innerHTML) and add it to an other link as title

From Dev

How can i get libreoffice writer to automatically add a closed bracket when I open a bracket?

From Dev

How can i add hover button to the link

From Dev

How can I add time dimension in polar coordinates in R?

From Dev

How can i get clicked link href?

From Dev

How can I get the nearest city to geo-coordinates with Go?

From Dev

How can I get the coordinates of a sprite's position in pygame?

From Dev

How can I get a component's position on screen (screen coordinates)

From Dev

Gimp: How can I get the coordinates of path tool points?

From Dev

How can I get coordinates of object collision in AS3?

From Dev

How can I get the ending (x,y) coordinates of a view?

From Dev

How can I get Coordinates from the Vertices (Typ: String)

From Dev

How can I automatically add workspaces, only if I need them?

From Dev

How can I get 'edge' points (furthest edge coordinates) from a list of coordinates

From Dev

How can I add the compilation date to java project automatically

From Dev

How can I automatically add the blogpost author into the member list?

From Dev

How can I add a link as a parameter inside a link so I can start from terminal

From Dev

Can I add a class to a link

From Java

How can I add a link for a rate button with swift?

From Dev

how can I add body to the mailto link from console Win?

From Dev

How can I add a link to the text of a Switch widget?

From Dev

How can I add a link around every image on a page?

From Dev

How can I simply add a link to a Spring Data REST Entity

From Dev

DITA XML: How can I add a link to the table of contents?

Related Related

  1. 1

    How can I automatically add a class to a link based on active anchor?

  2. 2

    Selenium: How can I get the link for downloads that started automatically?

  3. 3

    How can I get the coordinates of my mouse?

  4. 4

    How can I add a link to the <i> tag?

  5. 5

    How can I add a link to the <i> tag?

  6. 6

    How can i get link content (innerHTML) and add it to an other link as title

  7. 7

    How can i get libreoffice writer to automatically add a closed bracket when I open a bracket?

  8. 8

    How can i add hover button to the link

  9. 9

    How can I add time dimension in polar coordinates in R?

  10. 10

    How can i get clicked link href?

  11. 11

    How can I get the nearest city to geo-coordinates with Go?

  12. 12

    How can I get the coordinates of a sprite's position in pygame?

  13. 13

    How can I get a component's position on screen (screen coordinates)

  14. 14

    Gimp: How can I get the coordinates of path tool points?

  15. 15

    How can I get coordinates of object collision in AS3?

  16. 16

    How can I get the ending (x,y) coordinates of a view?

  17. 17

    How can I get Coordinates from the Vertices (Typ: String)

  18. 18

    How can I automatically add workspaces, only if I need them?

  19. 19

    How can I get 'edge' points (furthest edge coordinates) from a list of coordinates

  20. 20

    How can I add the compilation date to java project automatically

  21. 21

    How can I automatically add the blogpost author into the member list?

  22. 22

    How can I add a link as a parameter inside a link so I can start from terminal

  23. 23

    Can I add a class to a link

  24. 24

    How can I add a link for a rate button with swift?

  25. 25

    how can I add body to the mailto link from console Win?

  26. 26

    How can I add a link to the text of a Switch widget?

  27. 27

    How can I add a link around every image on a page?

  28. 28

    How can I simply add a link to a Spring Data REST Entity

  29. 29

    DITA XML: How can I add a link to the table of contents?

HotTag

Archive