From 18b260c1ce2c12d5339b758f6fbd3040c872c61c Mon Sep 17 00:00:00 2001 From: "yuvaraj.gajaraj" Date: Thu, 1 Oct 2020 23:55:10 +0530 Subject: [PATCH] New samples added --- android/app/src/main/AndroidManifest.xml | 4 +- .../flutter_examples/MainActivity.java | 41 ++++++++++--------- pubspec.yaml | 2 +- 3 files changed, 25 insertions(+), 22 deletions(-) diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 02aff474..2867e27c 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -9,9 +9,11 @@ additional functionality it is fine to subclass or reimplement FlutterApplication and put your custom class here. --> + { + if (call.method.equals("viewPdf") || call.method.equals("viewExcel")) { + String path = call.argument("file_path"); + if(!checkPermission(Manifest.permission.READ_EXTERNAL_STORAGE)){ + requestPermission(new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}); + } else { + launchFile(path); + } + } + } + ); + } private void requestPermission(String[] permission){ ActivityCompat.requestPermissions(this, permission, 1); } diff --git a/pubspec.yaml b/pubspec.yaml index a8cda5af..77097880 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -24,7 +24,7 @@ dependencies: syncfusion_flutter_datepicker: ^18.3.35-beta syncfusion_flutter_charts: ^18.3.35 syncfusion_flutter_gauges: ^18.3.35 - syncfusion_flutter_sliders: ^18.3.35 + syncfusion_flutter_sliders: ^18.3.35-beta syncfusion_flutter_pdf: ^18.3.35-beta syncfusion_flutter_barcodes: ^18.3.35 syncfusion_officechart: ^18.3.35-beta