open google maps through intent for specific location in android

后端 未结 12 1118
别那么骄傲
别那么骄傲 2020-11-30 20:17

I\'m designing one application in which I want to show specific location on Map. I\'m passing String of address which is already placed on Google Map

12条回答
  •  暖寄归人
    2020-11-30 20:50

    https://www.google.com/maps/dir//37.4219983,-122.084

    String location = "https://www.google.com/maps/dir//" + latitude + "," + longitude; try { SmsManager sms = SmsManager.getDefault(); // using android SmsManager sms.sendTextMessage(number, null, message + location, null, null); // adding number and text Toast.makeText(getApplicationContext(), "Message Sent", Toast.LENGTH_SHORT).show(); } catch (Exception e) { Toast.makeText(this, "Sms not send, please check phone number/network", Toast.LENGTH_SHORT).show(); e.printStackTrace(); }

提交回复
热议问题