Skip to content

Instantly share code, notes, and snippets.

@guuilp
Last active February 14, 2017 00:19
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save guuilp/34932978b1f950d8a58b9878c4f19681 to your computer and use it in GitHub Desktop.
public static final String QUERY_PARAMETER = "q";
public void onClickOpenAddressButton(View v) {
// COMPLETED (5) Store an address in a String
String addressString = "1600 Amphitheatre Parkway, CA";
// COMPLETED (6) Use Uri.Builder with the appropriate scheme and query to form the Uri for the address
Uri.Builder builder = new Uri.Builder();
builder.scheme("geo")
.path("0,0")
.appendQueryParameter(QUERY_PARAMETER, addressString);
Uri addressUri = builder.build();
// COMPLETED (7) Replace the Toast with a call to showMap, passing in the Uri from the previous step
showMap(addressUri);
}
@guuilp
Copy link
Author

guuilp commented Feb 14, 2017

I just changed the query method to appendQueryParameter instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment