Advertisement
Guest User

Untitled

a guest
Dec 1st, 2015
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. if (localization != null) {
  2.  
  3. SimpleDateFormat sdf = new SimpleDateFormat( "yyyy-MM-dd kk:mm:ss");
  4.  
  5. String latitude = String.valueOf(localization.get(0).latitude);
  6. String longitude = String.valueOf(localization.get(0).longitude);
  7. String data = sdf.format(localization.get(0).dateTime);
  8. Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
  9. Uri.parse("geo:0,0?q=" + latitude + "," + longitude + " (" + data + ")"));
  10. startActivity(intent);
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement