use of com.owncloud.android.ui.adapter.PrintAdapter in project android by nextcloud.
the class PrintAsyncTask method onPostExecute.
@Override
protected void onPostExecute(Boolean result) {
RichDocumentsEditorWebView richDocumentsWebView = richDocumentsWebViewWeakReference.get();
richDocumentsWebView.dismissLoadingDialog();
PrintManager printManager = (PrintManager) richDocumentsWebView.getSystemService(PRINT_SERVICE);
if (!result || printManager == null) {
DisplayUtils.showSnackMessage(richDocumentsWebView, richDocumentsWebView.getString(R.string.failed_to_print));
return;
}
PrintDocumentAdapter printAdapter = new PrintAdapter(file.getAbsolutePath());
printManager.print(JOB_NAME, printAdapter, new PrintAttributes.Builder().build());
}
Aggregations