Skip to main content

Day 54

Notifying when driver arrives and changing google map's pointer were implemented today.
Once we have our GeoApiContext, we can now use the DirectionsAPI class (which has a static method called newRequest) to request direction information. This newRequest method takes a GeoApiContext as an argument, which then returns us a DirectionsApiRequest.
On the DirectionsApiRequest object we have some methods that we need to set before we make this request. First we need to set our TravelMode, which can be Driving, Bicycling, Walking or Transit.
We then need to set our origin and our destination points. To accomplish this, there are two separate methods that return a DirectionsApiRequest that take either a LatLng or a String as an argument. What’s awesome about the methods which take in a String, is that the Latitude and Longitude will be automatically calculated based on the String address that you provide.
Lastly, we can call the departureTime method, so that we know the travel times that are returned are based on the departure time we provided. This method takes a simple DateTime object.
Now we can call the await method on the DirectionsApiRequest. This will make a synchronous call to the web service and return us a DirectionsResultobject.

Comments

Popular posts from this blog

Day 14

Today we started working on UI of our application and we developed sin up and login forms and customized it's design. The user interface for an Android app is built using a hierarchy of  layouts  ( ViewGroup  objects) and  widgets ( View  objects). Layouts are containers that control how their child views are positioned on the screen. Widgets are UI components such as buttons and text boxes.

Day 24

Today we worked on a navigation activity, worked with use of float button and item listeners.We also added the validation of unique data storage in fire base in our app. Android  Event  Listeners . In  android , Event  Listener  is an interface in the View class that contains a single call-back method. These methods will be called by the  Android  framework when the View which is registered with  listener  is triggered by user interaction with the item in UI.

Day 62

Worked on time stamp of a ride and history of single page system. A thin wrapper around  java.util.Date  that allows the JDBC API to identify this as an SQL  TIMESTAMP  value. It adds the ability to hold the SQL  TIMESTAMP  fractional seconds value, by allowing the specification of fractional seconds to a precision of nanoseconds. A Timestamp also provides formatting and parsing operations to support the JDBC escape syntax for timestamp values. The precision of a Timestamp object is calculated to be either: 19  , which is the number of characters in yyyy-mm-dd hh:mm:ss 20 + s  , which is the number of characters in the yyyy-mm-dd hh:mm:ss.[fff...] and  s  represents the scale of the given Timestamp, its fractional seconds precision.