diff --git a/example/README.md b/example/README.md index 6ace9f6a..71508300 100644 --- a/example/README.md +++ b/example/README.md @@ -5,4 +5,21 @@ Demonstrates how to use the `flutter_reactive_ble` plugin. ## Getting Started For help getting started with Flutter, view our online -[documentation](http://flutter.dev/). \ No newline at end of file +[documentation](http://flutter.dev/). + +## Android permissions + +The example application requests certain permissions and will display a message similar to the following on launch without them. + +> "Authorize the FlutterReactiveBle example app to use Bluetooth and location" + +Enable visibility to nearby devices + +1. Open the _Settings_ +2. Find and click on _Apps_ +3. Find and click on _flutter_reactive_ble_example_ +4. Scroll to _Permissions : nearby devices_ +5. _Nearby Devices_ should appear in the _not allowed_ section. +6. Click on _Nearby Devices_ and select _allow_ + +This permission will persist until you delete the example app from the device. diff --git a/example/android/.gitignore b/example/android/.gitignore index 9eaee1a5..d83574ed 100644 --- a/example/android/.gitignore +++ b/example/android/.gitignore @@ -10,4 +10,6 @@ GeneratedPluginRegistrant.java # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app key.properties **/*.keystore -**/*.jks \ No newline at end of file +**/*.jks + +**/.cxx/ \ No newline at end of file diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index a07261ac..55fc17ce 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -23,7 +23,7 @@ if (flutterVersionName == null) { } android { - compileSdkVersion 33 + compileSdkVersion 34 sourceSets { main.java.srcDirs += 'src/main/kotlin' @@ -31,18 +31,18 @@ android { compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } kotlinOptions { - jvmTarget = JavaVersion.VERSION_1_8.toString() + jvmTarget = JavaVersion.VERSION_11.toString() } defaultConfig { applicationId "com.signify.hue.reactivebleexample" - minSdkVersion 21 - targetSdkVersion 33 + minSdkVersion 34 + targetSdkVersion 34 versionCode flutterVersionCode.toInteger() versionName flutterVersionName } diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index 89e56bdb..2aaed3a1 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip diff --git a/example/android/settings.gradle b/example/android/settings.gradle index a4124b6e..a844aa4e 100644 --- a/example/android/settings.gradle +++ b/example/android/settings.gradle @@ -18,7 +18,7 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "8.0.2" apply false + id "com.android.application" version "8.7.3" apply false id "org.jetbrains.kotlin.android" version "1.8.21" apply false } diff --git a/example/devtools_options.yaml b/example/devtools_options.yaml new file mode 100644 index 00000000..fa0b357c --- /dev/null +++ b/example/devtools_options.yaml @@ -0,0 +1,3 @@ +description: This file stores settings for Dart & Flutter DevTools. +documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states +extensions: