com.google.zxing.client.result.CalendarParsedResult Java Examples

The following examples show how to use com.google.zxing.client.result.CalendarParsedResult. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CalendarResultHandler.java    From ZXing-Standalone-library with Apache License 2.0 6 votes vote down vote up
@Override
public void handleButtonPress(int index) {
  if (index == 0) {
    CalendarParsedResult calendarResult = (CalendarParsedResult) getResult();

    String description = calendarResult.getDescription();
    String organizer = calendarResult.getOrganizer();
    if (organizer != null) { // No separate Intent key, put in description
      if (description == null) {
        description = organizer;
      } else {
        description = description + '\n' + organizer;
      }
    }

    addCalendarEvent(calendarResult.getSummary(),
                     calendarResult.getStart(),
                     calendarResult.isStartAllDay(),
                     calendarResult.getEnd(),
                     calendarResult.getLocation(),
                     description,
                     calendarResult.getAttendees());
  }
}
 
Example #2
Source File: CalendarResultHandler.java    From analyzer-of-android-for-Apache-Weex with Apache License 2.0 6 votes vote down vote up
@Override
public void handleButtonPress(int index) {
  if (index == 0) {
    CalendarParsedResult calendarResult = (CalendarParsedResult) getResult();

    String description = calendarResult.getDescription();
    String organizer = calendarResult.getOrganizer();
    if (organizer != null) { // No separate Intent key, put in description
      if (description == null) {
        description = organizer;
      } else {
        description = description + '\n' + organizer;
      }
    }

    addCalendarEvent(calendarResult.getSummary(),
                     calendarResult.getStart(),
                     calendarResult.isStartAllDay(),
                     calendarResult.getEnd(),
                     calendarResult.getLocation(),
                     description,
                     calendarResult.getAttendees());
  }
}
 
Example #3
Source File: CalendarResultHandler.java    From weex with Apache License 2.0 6 votes vote down vote up
@Override
public void handleButtonPress(int index) {
  if (index == 0) {
    CalendarParsedResult calendarResult = (CalendarParsedResult) getResult();

    String description = calendarResult.getDescription();
    String organizer = calendarResult.getOrganizer();
    if (organizer != null) { // No separate Intent key, put in description
      if (description == null) {
        description = organizer;
      } else {
        description = description + '\n' + organizer;
      }
    }

    addCalendarEvent(calendarResult.getSummary(),
                     calendarResult.getStart(),
                     calendarResult.isStartAllDay(),
                     calendarResult.getEnd(),
                     calendarResult.getLocation(),
                     description,
                     calendarResult.getAttendees());
  }
}
 
Example #4
Source File: CalendarResultHandler.java    From Study_Android_Demo with Apache License 2.0 6 votes vote down vote up
@Override
public void handleButtonPress(int index) {
  if (index == 0) {
    CalendarParsedResult calendarResult = (CalendarParsedResult) getResult();

    String description = calendarResult.getDescription();
    String organizer = calendarResult.getOrganizer();
    if (organizer != null) { // No separate Intent key, put in description
      if (description == null) {
        description = organizer;
      } else {
        description = description + '\n' + organizer;
      }
    }

    addCalendarEvent(calendarResult.getSummary(),
                     calendarResult.getStart(),
                     calendarResult.isStartAllDay(),
                     calendarResult.getEnd(),
                     calendarResult.getLocation(),
                     description,
                     calendarResult.getAttendees());
  }
}
 
Example #5
Source File: CalendarResultHandler.java    From barcodescanner-lib-aar with MIT License 6 votes vote down vote up
@Override
public void handleButtonPress(int index) {
  if (index == 0) {
    CalendarParsedResult calendarResult = (CalendarParsedResult) getResult();

    String description = calendarResult.getDescription();
    String organizer = calendarResult.getOrganizer();
    if (organizer != null) { // No separate Intent key, put in description
      if (description == null) {
        description = organizer;
      } else {
        description = description + '\n' + organizer;
      }
    }

    addCalendarEvent(calendarResult.getSummary(),
                     calendarResult.getStart(),
                     calendarResult.isStartAllDay(),
                     calendarResult.getEnd(),
                     calendarResult.getLocation(),
                     description,
                     calendarResult.getAttendees());
  }
}
 
Example #6
Source File: CalendarResultHandler.java    From reacteu-app with MIT License 6 votes vote down vote up
@Override
public void handleButtonPress(int index) {
  if (index == 0) {
    CalendarParsedResult calendarResult = (CalendarParsedResult) getResult();

    String description = calendarResult.getDescription();
    String organizer = calendarResult.getOrganizer();
    if (organizer != null) { // No separate Intent key, put in description
      if (description == null) {
        description = organizer;
      } else {
        description = description + '\n' + organizer;
      }
    }

    addCalendarEvent(calendarResult.getSummary(),
                     calendarResult.getStart(),
                     calendarResult.isStartAllDay(),
                     calendarResult.getEnd(),
                     calendarResult.getLocation(),
                     description,
                     calendarResult.getAttendees());
  }
}
 
Example #7
Source File: CalendarResultHandler.java    From android-apps with MIT License 6 votes vote down vote up
@Override
public CharSequence getDisplayContents() {
  CalendarParsedResult calResult = (CalendarParsedResult) getResult();
  StringBuilder result = new StringBuilder(100);
  ParsedResult.maybeAppend(calResult.getSummary(), result);
  String startString = calResult.getStart();
  appendTime(startString, result, false, false);

  String endString = calResult.getEnd();
  if (endString != null) {
    boolean sameStartEnd = startString.equals(endString);
    appendTime(endString, result, true, sameStartEnd);
  }

  ParsedResult.maybeAppend(calResult.getLocation(), result);
  ParsedResult.maybeAppend(calResult.getAttendee(), result);
  ParsedResult.maybeAppend(calResult.getDescription(), result);
  return result.toString();
}
 
Example #8
Source File: CalendarResultHandler.java    From barterli_android with Apache License 2.0 6 votes vote down vote up
@Override
public CharSequence getDisplayContents() {
    CalendarParsedResult calResult = (CalendarParsedResult) getResult();
    StringBuilder result = new StringBuilder(100);
    ParsedResult.maybeAppend(calResult.getSummary(), result);
    Date start = calResult.getStart();
    String startString = start.toGMTString();
    appendTime(startString, result, false, false);

    Date end = calResult.getEnd();
    String endString = end.toGMTString();
    if (endString != null) {
        boolean sameStartEnd = startString.equals(endString);
        appendTime(endString, result, true, sameStartEnd);
    }

    ParsedResult.maybeAppend(calResult.getLocation(), result);
    ParsedResult.maybeAppend(calResult.getAttendees(), result);
    ParsedResult.maybeAppend(calResult.getDescription(), result);
    return result.toString();
}
 
Example #9
Source File: CalendarResultHandler.java    From android-quick-response-code with Apache License 2.0 6 votes vote down vote up
@Override
public CharSequence getDisplayContents() {
    CalendarParsedResult calResult = (CalendarParsedResult) getResult();
    StringBuilder result = new StringBuilder(100);
    ParsedResult.maybeAppend(calResult.getSummary(), result);
    Date start = calResult.getStart();
    String startString = start.toGMTString();
    appendTime(startString, result, false, false);

    Date end = calResult.getEnd();
    String endString = end.toGMTString();
    if (endString != null) {
        boolean sameStartEnd = startString.equals(endString);
        appendTime(endString, result, true, sameStartEnd);
    }

    ParsedResult.maybeAppend(calResult.getLocation(), result);
    ParsedResult.maybeAppend(calResult.getAttendees(), result);
    ParsedResult.maybeAppend(calResult.getDescription(), result);
    return result.toString();
}
 
Example #10
Source File: CalendarResultHandler.java    From zxingfragmentlib with Apache License 2.0 6 votes vote down vote up
@Override
public void handleButtonPress(int index) {
  if (index == 0) {
    CalendarParsedResult calendarResult = (CalendarParsedResult) getResult();

    String description = calendarResult.getDescription();
    String organizer = calendarResult.getOrganizer();
    if (organizer != null) { // No separate Intent key, put in description
      if (description == null) {
        description = organizer;
      } else {
        description = description + '\n' + organizer;
      }
    }

    addCalendarEvent(calendarResult.getSummary(),
                     calendarResult.getStart(),
                     calendarResult.isStartAllDay(),
                     calendarResult.getEnd(),
                     calendarResult.getLocation(),
                     description,
                     calendarResult.getAttendees());
  }
}
 
Example #11
Source File: CalendarResultHandler.java    From android-apps with MIT License 5 votes vote down vote up
@Override
public void handleButtonPress(int index) {
  CalendarParsedResult calendarResult = (CalendarParsedResult) getResult();
  if (index == 0) {
    addCalendarEvent(calendarResult.getSummary(),
                     calendarResult.getStart(),
                     calendarResult.getEnd(),
                     calendarResult.getLocation(),
                     calendarResult.getDescription());
  }
}