use of de.danoeh.antennapod.core.export.favorites.FavoritesWriter in project AntennaPod by AntennaPod.
the class ImportExportPreferencesFragment method setupStorageScreen.
private void setupStorageScreen() {
findPreference(PREF_OPML_EXPORT).setOnPreferenceClickListener(preference -> {
openExportPathPicker(CONTENT_TYPE_OPML, dateStampFilename(DEFAULT_OPML_OUTPUT_NAME), chooseOpmlExportPathLauncher, new OpmlWriter());
return true;
});
findPreference(PREF_HTML_EXPORT).setOnPreferenceClickListener(preference -> {
openExportPathPicker(CONTENT_TYPE_HTML, dateStampFilename(DEFAULT_HTML_OUTPUT_NAME), chooseHtmlExportPathLauncher, new HtmlWriter());
return true;
});
findPreference(PREF_OPML_IMPORT).setOnPreferenceClickListener(preference -> {
try {
chooseOpmlImportPathLauncher.launch("*/*");
} catch (ActivityNotFoundException e) {
Log.e(TAG, "No activity found. Should never happen...");
}
return true;
});
findPreference(PREF_DATABASE_IMPORT).setOnPreferenceClickListener(preference -> {
importDatabase();
return true;
});
findPreference(PREF_DATABASE_EXPORT).setOnPreferenceClickListener(preference -> {
exportDatabase();
return true;
});
findPreference(PREF_FAVORITE_EXPORT).setOnPreferenceClickListener(preference -> {
openExportPathPicker(CONTENT_TYPE_HTML, dateStampFilename(DEFAULT_FAVORITES_OUTPUT_NAME), chooseFavoritesExportPathLauncher, new FavoritesWriter());
return true;
});
}
use of de.danoeh.antennapod.core.export.favorites.FavoritesWriter in project AntennaPod by AntennaPod.
the class ImportExportPreferencesFragment method chooseFavoritesExportPathResult.
private void chooseFavoritesExportPathResult(final ActivityResult result) {
if (result.getResultCode() != Activity.RESULT_OK || result.getData() == null) {
return;
}
final Uri uri = result.getData().getData();
exportWithWriter(new FavoritesWriter(), uri);
}
Aggregations