From 13d5181fd69172ab45d60c0bdfa85f1d271a3e40 Mon Sep 17 00:00:00 2001 From: rlee1990 Date: Thu, 27 Jan 2022 09:26:39 -0500 Subject: [PATCH 1/5] Update --- android/build.gradle | 4 ++-- example/android/app/build.gradle | 4 ++-- example/lib/main.dart | 2 +- pubspec.yaml | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 197831c..efacee5 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -27,11 +27,11 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { - compileSdkVersion 30 + compileSdkVersion 31 defaultConfig { minSdkVersion 19 - compileSdkVersion(30) + compileSdkVersion(31) buildToolsVersion("30.0.2") } diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 123b530..55b2639 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -25,7 +25,7 @@ apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 29 + compileSdkVersion 31 lintOptions { disable 'InvalidPackage' @@ -35,7 +35,7 @@ android { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.camera_deep_ar_example" minSdkVersion 21 - targetSdkVersion 29 + targetSdkVersion 31 versionCode flutterVersionCode.toInteger() versionName flutterVersionName } diff --git a/example/lib/main.dart b/example/lib/main.dart index 92941e9..355aaec 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -110,7 +110,7 @@ class _MyAppState extends State { @override void dispose() { - deepArController?.dispose(); + deepArController.dispose(); super.dispose(); } diff --git a/pubspec.yaml b/pubspec.yaml index adb92cf..7406581 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -5,7 +5,7 @@ version: 0.0.2+3 homepage: https://github.com/mtellect/CameraDeepAR environment: - sdk: ">=2.13.0 <3.0.0" + sdk: ">=2.14.0 <3.0.0" flutter: ">=1.12.0" # flutter: ">=1.20.0 <2.0.0" @@ -18,10 +18,10 @@ dependencies: # wakelock: ^0.5.0+2 # wakelock: ^0.5.6 # permission_handler: ^6.0.1 - permission_handler: ^8.2.5 + permission_handler: ^8.3.0 # flutter_device_type: ^0.4.0 flutter_plugin_android_lifecycle: ^2.0.5 - path_provider: ^2.0.5 + path_provider: ^2.0.8 dev_dependencies: From 8260ef8c9a6d6ac053f5974452c67929a34855b1 Mon Sep 17 00:00:00 2001 From: rlee1990 Date: Sun, 6 Feb 2022 18:51:17 -0500 Subject: [PATCH 2/5] u --- example/android/app/build.gradle | 2 +- example/lib/config.dart | 4 ++-- example/lib/main.dart | 1 - ios/camera_deep_ar.podspec | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 55b2639..803a810 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -34,7 +34,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.camera_deep_ar_example" - minSdkVersion 21 + minSdkVersion 23 targetSdkVersion 31 versionCode flutterVersionCode.toInteger() versionName flutterVersionName diff --git a/example/lib/config.dart b/example/lib/config.dart index 66c5ac5..ff92860 100644 --- a/example/lib/config.dart +++ b/example/lib/config.dart @@ -10,9 +10,9 @@ import 'package:camera_deep_ar/camera_deep_ar.dart'; DeepArConfig config = DeepArConfig( androidKey: - "3b58c448bd650192e7c53d965cfe5dc1c341d2568b663a3962b7517c4ac6eeed0ba1fb2afe491a4b", + '8903e1c3c703b321f50af61f5bcb931cef8a302c972632bdc80a795bd09ddae0c87043b79709f988', ioskey: - "53618212114fc16bbd7499c0c04c2ca11a4eed188dc20ed62a7f7eec02b41cb34d638e72945a6bf6", + '42fd12d37e64a70aa698ee1692e0cddf92b199845cd8c1ad716d6d70830fc2e9015b1d74ea325020', displayMode: DisplayMode.camera, // displayMode: DisplayMode.camera, ); diff --git a/example/lib/main.dart b/example/lib/main.dart index 355aaec..4637101 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -4,7 +4,6 @@ import 'package:camera_deep_ar/camera_deep_ar.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:image_picker/image_picker.dart'; import 'package:path_provider/path_provider.dart'; import 'config.dart'; diff --git a/ios/camera_deep_ar.podspec b/ios/camera_deep_ar.podspec index dee354c..601b2aa 100644 --- a/ios/camera_deep_ar.podspec +++ b/ios/camera_deep_ar.podspec @@ -15,7 +15,7 @@ A new Flutter plugin. s.source = { :path => '.' } s.source_files = 'Classes/**/*' s.dependency 'Flutter' - s.platform = :ios, '8.0' + s.platform = :ios, '9.0' # Flutter.framework does not contain a i386 slice. s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } From 811566db999761094a6e17c34a79272eeaca3b50 Mon Sep 17 00:00:00 2001 From: rlee1990 Date: Tue, 22 Feb 2022 20:19:20 -0500 Subject: [PATCH 3/5] Update pubspec.yaml --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 7406581..873272e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -6,7 +6,7 @@ homepage: https://github.com/mtellect/CameraDeepAR environment: sdk: ">=2.14.0 <3.0.0" - flutter: ">=1.12.0" + flutter: ">=2.10.0" # flutter: ">=1.20.0 <2.0.0" dependencies: From bab6bf14b122fb7fc529214792e31f3a4c5ce071 Mon Sep 17 00:00:00 2001 From: rlee1990 Date: Tue, 22 Feb 2022 20:24:15 -0500 Subject: [PATCH 4/5] Update Ios --- example/ios/Podfile | 2 +- ios/camera_deep_ar.podspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/example/ios/Podfile b/example/ios/Podfile index 1e8c3c9..074e821 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '9.0' +platform :ios, '14.1' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/ios/camera_deep_ar.podspec b/ios/camera_deep_ar.podspec index 601b2aa..b781663 100644 --- a/ios/camera_deep_ar.podspec +++ b/ios/camera_deep_ar.podspec @@ -15,7 +15,7 @@ A new Flutter plugin. s.source = { :path => '.' } s.source_files = 'Classes/**/*' s.dependency 'Flutter' - s.platform = :ios, '9.0' + s.platform = :ios, '14.1' # Flutter.framework does not contain a i386 slice. s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } From f05d75a14686174e0cc54b3352906fc66c65de2b Mon Sep 17 00:00:00 2001 From: rlee1990 Date: Sat, 12 Mar 2022 21:34:15 -0500 Subject: [PATCH 5/5] update --- .../camera_deep_ar/CameraDeepArPlugin.java | 15 +++++++++- example/analysis_options.yaml | 29 +++++++++++++++++++ .../android/app/src/main/AndroidManifest.xml | 2 +- .../main/kotlin/com/example/MainActivity.kt | 6 ++++ .../res/drawable-v21/launch_background.xml | 12 ++++++++ .../app/src/main/res/values-night/styles.xml | 18 ++++++++++++ pubspec.yaml | 2 +- 7 files changed, 81 insertions(+), 3 deletions(-) create mode 100644 example/analysis_options.yaml create mode 100644 example/android/app/src/main/kotlin/com/example/MainActivity.kt create mode 100644 example/android/app/src/main/res/drawable-v21/launch_background.xml create mode 100644 example/android/app/src/main/res/values-night/styles.xml diff --git a/android/src/main/java/com/camera_deep_ar/CameraDeepArPlugin.java b/android/src/main/java/com/camera_deep_ar/CameraDeepArPlugin.java index 1ae9c38..d3a13a4 100644 --- a/android/src/main/java/com/camera_deep_ar/CameraDeepArPlugin.java +++ b/android/src/main/java/com/camera_deep_ar/CameraDeepArPlugin.java @@ -16,11 +16,13 @@ import java.util.List; import io.flutter.embedding.engine.plugins.FlutterPlugin; +import io.flutter.embedding.engine.FlutterEngine; import io.flutter.embedding.engine.plugins.activity.ActivityAware; import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding; -import io.flutter.plugin.common.MethodChannel; +import io.flutter.embedding.android.FlutterActivity; import io.flutter.plugin.common.PluginRegistry; import io.flutter.plugin.common.PluginRegistry.Registrar; +import io.flutter.plugins.GeneratedPluginRegistrant; //import ai.deepar.ar.DeepAR; @@ -32,6 +34,17 @@ public class CameraDeepArPlugin implements FlutterPlugin ,ActivityAware{ public CameraDeepArPlugin() {} + @Override + public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) { + GeneratedPluginRegistrant.registerWith(flutterEngine); + new MethodChannel(flutterEngine.getDartExecutor().getBinaryMessenger(), CHANNEL) + .setMethodCallHandler( + (call, result) -> { + // Your existing code + } + ); + } + @Override public void onAttachedToActivity(@NonNull ActivityPluginBinding binding) { diff --git a/example/analysis_options.yaml b/example/analysis_options.yaml new file mode 100644 index 0000000..61b6c4d --- /dev/null +++ b/example/analysis_options.yaml @@ -0,0 +1,29 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at + # https://dart-lang.github.io/linter/lints/index.html. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index 98065d5..e0630d5 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -30,7 +30,7 @@ additional functionality it is fine to subclass or reimplement FlutterApplication and put your custom class here. --> diff --git a/example/android/app/src/main/kotlin/com/example/MainActivity.kt b/example/android/app/src/main/kotlin/com/example/MainActivity.kt new file mode 100644 index 0000000..7d247cb --- /dev/null +++ b/example/android/app/src/main/kotlin/com/example/MainActivity.kt @@ -0,0 +1,6 @@ +package com.camera_deep_ar_example; + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/example/android/app/src/main/res/drawable-v21/launch_background.xml b/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000..f74085f --- /dev/null +++ b/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/example/android/app/src/main/res/values-night/styles.xml b/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..3db14bb --- /dev/null +++ b/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/pubspec.yaml b/pubspec.yaml index 873272e..b042e0e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: # wakelock: ^0.5.0+2 # wakelock: ^0.5.6 # permission_handler: ^6.0.1 - permission_handler: ^8.3.0 + permission_handler: ^9.2.0 # flutter_device_type: ^0.4.0 flutter_plugin_android_lifecycle: ^2.0.5 path_provider: ^2.0.8