示例#1
0
 @Override
 protected com.ean.mobile.hotel.HotelInformation doInBackground(final Void... voids) {
   try {
     return RequestProcessor.run(new InformationRequest(hotelId));
   } catch (EanWsError ewe) {
     Log.d(SampleConstants.LOG_TAG, "Unexpected error occurred within the api", ewe);
   } catch (UrlRedirectionException ure) {
     SampleApp.sendRedirectionToast(getApplicationContext());
   }
   return null;
 }
示例#2
0
 @Override
 protected List<HotelRoom> doInBackground(final Void... voids) {
   try {
     final RoomAvailabilityRequest request =
         new RoomAvailabilityRequest(hotelId, SampleApp.occupancy(), arrivalDate, departureDate);
     return RequestProcessor.run(request);
   } catch (EanWsError ewe) {
     Log.d(SampleConstants.LOG_TAG, "An error occurred in the api", ewe);
   } catch (UrlRedirectionException ure) {
     SampleApp.sendRedirectionToast(getApplicationContext());
   }
   return null;
 }