Calculate a price using stop watch and google maps

Hi everyone,

I am working on a small project and i’ve tried to make a stop watch/timer so i can calculate a price.
For example: Like the Uber app, but where i can start a timer on the app as i come to the pick-up destination, then when i finish with the work i’ll stop the timer and i’ll get a price with the calculations of:
Time spend * 1$ = X
Miles droven * 1$ = Y

The total price is: X+Y

I hope to hear from you guys

To calculate the time spent-

Whenever the user clicks the “Start” timer button - store the start time (let’s say it startTime A)
Whenever the user clicks the “Stop” timer button- store the stop time (let’s say it stopTime A)

Time spend= StopTimeA- startTimeA

For milesDrove you need to use the 3 rd party service like or natively to get the current lat & long . Using the lat & long’s list, create a path on the map, then use that data to determine how many miles were driven.

But the concept is similar to time spent.

Ankur@ Nocodetalks
Looking for a Bubble Coach? Check out here

This topic was automatically closed after 70 days. New replies are no longer allowed.