Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

135
Views
Matrix API and Google TTS Integration with location tracker in android app

I am developing an app based on JavaScript. There's a certain process I want but am not sure how to move forward with it. The following is the process if anyone could help me with the code for the idea.

So the person clicks a button on the main home page after which another activity is opened. Here, the app quickly takes the location of the person and gives the Matrix Api the coordinates. Along with a coordinate previously chosen in the login screen saved on the firebase database, the coordinates apply to the Matrix API and find the time taken to reach. Over here for an example:-

 $curl "https://api.mapbox.com/directions-matrix/v1/mapbox/driving/c,h?approaches=curb;curb;curb&access_token=YOUR_MAPBOX_ACCESS_TOKEN"

where c is for the current location taken and h for the location from the login screen.

This returns a JSON file for example:-

{
"code": "Ok",
"durations": [
    [ 0,      573],
    [ 573,    0],
],

where I'll take 573 secs and convert it to minutes in the code and then apply it to the following text:- "The car will reach you in 'f' minutes" where 'f' is the time and then this text is spoken through google TTS.

The official documentation of the Matrix API that I was thinking of taking:- https://docs.mapbox.com/api/navigation/matrix/

Can someone tell me how to code this part of my app out... I think this is a bit based on my python development skills as I have used the same logic but I'm not sure how to add that into my app as I'm new to Android Development so if anyone could help it would be great. Pls, Help ๐Ÿ™

about 4 years ago ยท Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
ยฉ 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!