public HomeScreen() {
		// Set the displayed title of the screen       
		setTitle("TravelSDK Example");

		CustomButtonField buttonFlightSearch = new CustomButtonField("Flight search");
		buttonFlightSearch.setChangeListener(new FieldChangeListener() {

			public void fieldChanged(Field field, int context) {
				if (!TravelSDK.INSTANCE.isInitialized()) {
					Dialog.alert("Travel SDK isn't initialized");
					return;
				}
				UiApplication.getUiApplication().pushScreen(new FlightSearchScreen());
			}
		});

		CustomButtonField buttonHotelSearch = new CustomButtonField("Hotel search");
		buttonHotelSearch.setChangeListener(new FieldChangeListener() {

			public void fieldChanged(Field field, int context) {
				if (!TravelSDK.INSTANCE.isInitialized()) {
					Dialog.alert("Travel SDK isn't initialized");
					return;
				}
				UiApplication.getUiApplication().pushScreen(new HotelSearchScreen());
			}
		});

		CustomButtonField buttonRentacarSearch = new CustomButtonField("Renta car search");
		buttonRentacarSearch.setChangeListener(new FieldChangeListener() {

			public void fieldChanged(Field field, int context) {
				if (!TravelSDK.INSTANCE.isInitialized()) {
					Dialog.alert("Travel SDK isn't initialized");
					return;
				}
				UiApplication.getUiApplication().pushScreen(new RentacarSearchScreen());
			}
		});

		CustomButtonField buttonExcursionSearch = new CustomButtonField("Excursion search");
		buttonExcursionSearch.setChangeListener(new FieldChangeListener() {

			public void fieldChanged(Field field, int context) {
				if (!TravelSDK.INSTANCE.isInitialized()) {
					Dialog.alert("Travel SDK isn't initialized");
					return;
				}
				UiApplication.getUiApplication().pushScreen(new ExcursionSearchScreen());
			}
		});

		CustomButtonField buttonBasket = new CustomButtonField("Basket");
		buttonBasket.setChangeListener(new FieldChangeListener() {

			public void fieldChanged(Field field, int context) {
				if (!TravelSDK.INSTANCE.isInitialized()) {
					Dialog.alert("Travel SDK isn't initialized");
					return;
				}
				UiApplication.getUiApplication().pushScreen(new BasketScreen());
			}
		});

		CustomButtonField buttonBookings = new CustomButtonField("Bookings");
		buttonBookings.setChangeListener(new FieldChangeListener() {

			public void fieldChanged(Field field, int context) {
				if (!TravelSDK.INSTANCE.isInitialized()) {
					Dialog.alert("Travel SDK isn't initialized");
					return;
				}

				ProcessBookingsList processBookingsList = new ProcessBookingsList() {

					public void onComplete() {
						UiApplication.getUiApplication().invokeLater(new Runnable() {
							public void run() {
								if(getErrorCode() != null) {
									Dialog.alert("Error: " + errorCode);
									return;
								}
								UiApplication.getUiApplication().pushScreen(new BookingsScreen(getResult()));
							}
						});
					}

					public String getLoadingMessage() {
						return "Receiving bookings ...";
					}

				};
				
				TravelSDK.INSTANCE.receiveBookings(processBookingsList);
			}
		});

		CustomButtonField buttonDebugLog = new CustomButtonField("Debug information");
		buttonDebugLog.setChangeListener(new FieldChangeListener() {
			public void fieldChanged(Field field, int context) {
				try {
					Logger.sendLog();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		});

		this.add(buttonFlightSearch);
		this.add(buttonHotelSearch);
		this.add(buttonRentacarSearch);
		this.add(buttonExcursionSearch);
		this.add(buttonBasket);
		this.add(buttonBookings);
		this.add(buttonDebugLog);

		UiApplication.getUiApplication().invokeLater(new Runnable() {
			public void run() {
				// Init travel SDK
				init();
			}
		});
	}