Automated flights saver Franck Dosso Automated flights saver
Requirements Android Studio Java Qpx Express Api Sqlite
Installments Install Android studio https://developer.android.com/studio/install.html Dependencies to use Qpx express Api on android https://developers.google.com/api-client- library/java/apis/qpxExpress/v1 More on Qpx https://developers.google.com/qpx-express/ Sqlite Database https://www.tutorialspoint.com/android/android_sqlit e_database.htm
Important steps Utilities function FillSlices() : allows us to set up most of the information we want about a flight such as (date,carriers,number of stops, origin, and destination) Makerequest(): complete the other part of the flight(round trip) and then we send the request. ExtractRequest(): We are passed the result(list) from the makerequest which contains infos about the flight requested then extract them. *Function names are links
Asyntask Loader Benefits: What are loaders for: Loaders are responsible for performing queries/requests on a separate thread. Benefits: Encapsulation : The Activity or the main thread does not need to know how to load data. Instead, it delegates the task to the Loader, which carries out the request in the background delivered the results back to the Activity/Fragment or the main thread. Event-driven. Loaders monitor the underlying data source and automatically perform new loads for up-to-date results when changes are detected. https://github.com/disenn10/Flights_saver/blob/master/app/src/main/java/com/example/disen/myflights/FlightsLo ader.java
Sqlite Database What is Sqlite Database? SQLite is a open source SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation. Creation of table Insertion of data Displaying data *The underlined titles represent links
Exporting a CSV file We create a function to extract the data from the database, make it into a csv file and then export it through email. https://github.com/disenn10/Flights_saver/blob/master/app/src/main/java/com/example/disen/myflights/Flights.java#L74
Any questions?
Fin.