Java Code Examples for android.content.Intent.getCharExtra()

The following are Jave code examples for showing how to use getCharExtra() of the android.content.Intent class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: financisto1-holo   File: CsvImportOptions.java   View Source Code Vote up 6 votes
public static CsvImportOptions fromIntent(Intent data) {
    WhereFilter filter = WhereFilter.fromIntent(data);
    Currency currency = CurrencyExportPreferences.fromIntent(data, "csv");
    char fieldSeparator = data.getCharExtra(CsvImportActivity.CSV_IMPORT_FIELD_SEPARATOR, ',');
    String dateFormat = data.getStringExtra(CsvImportActivity.CSV_IMPORT_DATE_FORMAT);
    long selectedAccountId = data.getLongExtra(CsvImportActivity.CSV_IMPORT_SELECTED_ACCOUNT_2, -1);
    String filename = data.getStringExtra(CsvImportActivity.CSV_IMPORT_FILENAME);
    boolean useHeaderFromFile = data.getBooleanExtra(CsvImportActivity.CSV_IMPORT_USE_HEADER_FROM_FILE, true);
    return new CsvImportOptions(currency, dateFormat, selectedAccountId, filter, filename, fieldSeparator, useHeaderFromFile);
}
 
Example 2
Project: financisto1-holo   File: CsvExportOptions.java   View Source Code Vote up 6 votes
public static CsvExportOptions fromIntent(Intent data) {
    WhereFilter filter = WhereFilter.fromIntent(data);
    Currency currency = CurrencyExportPreferences.fromIntent(data, "csv");
    char fieldSeparator = data.getCharExtra(CsvExportActivity.CSV_EXPORT_FIELD_SEPARATOR, ',');
    boolean includeHeader = data.getBooleanExtra(CsvExportActivity.CSV_EXPORT_INCLUDE_HEADER, true);
    boolean exportSplits = data.getBooleanExtra(CsvExportActivity.CSV_EXPORT_SPLITS, false);
    boolean uploadToDropbox = data.getBooleanExtra(CsvExportActivity.CSV_EXPORT_UPLOAD_TO_DROPBOX, false);
    return new CsvExportOptions(currency, fieldSeparator, includeHeader, exportSplits, uploadToDropbox, filter, true);
}