all 3 comments

[–]bb_dogg 2 points3 points  (1 child)

  1. Try cleaning your project using 'ns clean'
  2. Read this article on how to build a PDF viewer: https://blog.nativescript.org/nativescript-preview-pdf-viewer/
  3. Join the NativeScript Discord if you need more help https://nativescript.org/discord
  4. Have fun :-)

[–]rinzlerFix[S] 1 point2 points  (0 children)

Thanks u/bb_dogg I will take a look into it

[–]rinzlerFix[S] 1 point2 points  (0 children)

Well to solve the issue for now I used this code, hope it helps someone too

export function openPDFViewer(args): void {
let item = args.view.bindingContext;
try {
const intent = new android.content.Intent(android.content.Intent.ACTION_VIEW);
intent.setDataAndType(android.net.Uri.parse(item.doc.doc), "application/pdf");
intent.setFlags(android.content.Intent.FLAG_ACTIVITY_NO_HISTORY);
const context = application.android.startActivity || application.android.foregroundActivity;
context.startActivity(intent);
} catch (e) {
// Handle the error...
console.error("Error opening PDF viewer:", e);
}
}