This video demonstrates a demo application that shows the movement of the car on a map developed after inspiration from Uber.
The APIs and Libraries used are Google Maps API, Google Maps Directions API, and Volley. Get these API keys on google developers console after enabling them for your project.
Follow these steps to know how to do uber like car animation in your android studio:-
1. Parse the "overview_polyline" from the JSON by providing the appropriate GET parameters.
2. Decode the polyline which will provide you with a list of latitudes and longitudes.
3. Set up the Value animator: Create a value animator by providing the offloat value, setting duration and adding update listener in Handler
4. In the value animator, Update listener and get the Animation fraction and evaluate the latitudes and longitudes.
5. Finally, you can set the position of the marker to the new position, also evaluating the bearing between the consecutive points so that it seems the car is turning literally and finally update the camera.
6. Running the project:- Replace your google maps directions API key in strings.xml and google maps key in google_maps_api.xml.
Chapters:
00:00 Intro
00:20 Enable Direction api
01:50 prase diretion
05:07 add markers in locations
8:00 Crate clases for animation
10:20 Project Run Successfully
Watch more videos like a tutorial of uber like car animation in android studio at
Game App Studio : https://www.youtube.com/watch?v=OnAOi...
Subscribe to our YouTube channel: https://www.youtube.com/channel/UCdcD
Visit us here: http://www.gameappstudio.com/
Follow us on Facebook: / gameappstudio
Hit Follow On Instagram: / gameappstudio
Would you like Game App Studio to speak at your school or organization?
For info, contact us at http://www.gameappstudio.com/contact/
Mail us at [email protected]
#androidtutorial #ubercaranimation #howtocode #learntocode #gameappstudio