diff --git a/.idea/conreality-plugins.iml b/.idea/conreality-plugins.iml
new file mode 100644
index 0000000..5351c1d
--- /dev/null
+++ b/.idea/conreality-plugins.iml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..952de9e
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..b698cd8
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 0000000..7079e3e
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1619762014446
+
+
+ 1619762014446
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/conreality_headset/CHANGELOG.md b/conreality_headset/CHANGELOG.md
index a22006a..bd1f1c1 100644
--- a/conreality_headset/CHANGELOG.md
+++ b/conreality_headset/CHANGELOG.md
@@ -6,19 +6,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
-## 0.2.1 - 2019-08-06
-### Changed
-- Added a dependency on AndroidX core classes
-- Declared the Android permissions the plugin needs
-### Added
-- Support for recording audio from Bluetooth SCO headsets (on Android only)
-- Support for playing back audio (on Android only)
-
## 0.2.0 - 2019-07-15
### Changed
- Required Flutter 1.7.8+ and Dart 2.4.0+
### Added
-- AndroidX `@NonNull`/`@Nullable`/etc annotations
+- AndroidX @NonNull/@Nullable/etc annotations
- [AndroidX lifecycle](https://developer.android.com/topic/libraries/architecture/lifecycle) support
## 0.1.4 - 2019-07-12
diff --git a/conreality_headset/android/build.gradle b/conreality_headset/android/build.gradle
index 94b41b0..38976a6 100644
--- a/conreality_headset/android/build.gradle
+++ b/conreality_headset/android/build.gradle
@@ -1,5 +1,5 @@
group 'app.conreality.plugins.headset'
-version file('../VERSION').text.trim()
+version '1.0-SNAPSHOT'
buildscript {
repositories {
@@ -8,8 +8,7 @@ buildscript {
}
dependencies {
- // See: https://developer.android.com/studio/releases/gradle-plugin
- classpath 'com.android.tools.build:gradle:3.3.2'
+ classpath 'com.android.tools.build:gradle:3.3.2' // or higher
}
}
@@ -41,21 +40,11 @@ android {
}
dependencies {
- // See: https://github.com/conreality/conreality-android/releases
- compileOnly fileTree(dir: 'libs', include: 'conreality-android-*.aar')
-
- // See: https://developer.android.com/jetpack/androidx/releases/core
- implementation 'androidx.core:core:1.0.2'
-
// See: https://developer.android.com/jetpack/androidx/releases/annotation
- implementation 'androidx.annotation:annotation:1.1.0'
+ compile "androidx.annotation:annotation:1.1.0"
// See: https://developer.android.com/jetpack/androidx/releases/lifecycle
def lifecycle_version = '2.0.0'
implementation "androidx.lifecycle:lifecycle-runtime:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
-
- // See: https://github.com/ReactiveX/RxJava/releases
- implementation 'io.reactivex.rxjava2:rxjava:2.2.11'
- implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
}
diff --git a/conreality_headset/android/libs/.gitignore b/conreality_headset/android/libs/.gitignore
deleted file mode 100644
index 0939492..0000000
--- a/conreality_headset/android/libs/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-conreality-android-*.aar
diff --git a/conreality_headset/android/src/main/AndroidManifest.xml b/conreality_headset/android/src/main/AndroidManifest.xml
index 418f7ee..a2d0e3d 100644
--- a/conreality_headset/android/src/main/AndroidManifest.xml
+++ b/conreality_headset/android/src/main/AndroidManifest.xml
@@ -1,21 +1,8 @@
+ package="app.conreality.plugins.headset">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
diff --git a/conreality_headset/android/src/main/java/app/conreality/plugins/headset/ConrealityHeadsetPlugin.java b/conreality_headset/android/src/main/java/app/conreality/plugins/headset/ConrealityHeadsetPlugin.java
index 2868fc4..1b52bfe 100644
--- a/conreality_headset/android/src/main/java/app/conreality/plugins/headset/ConrealityHeadsetPlugin.java
+++ b/conreality_headset/android/src/main/java/app/conreality/plugins/headset/ConrealityHeadsetPlugin.java
@@ -3,19 +3,29 @@
package app.conreality.plugins.headset;
import android.app.Activity;
+import android.bluetooth.BluetoothAdapter;
+import android.bluetooth.BluetoothDevice;
+import android.bluetooth.BluetoothHeadset;
+import android.bluetooth.BluetoothManager;
+import android.bluetooth.BluetoothProfile;
+import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
import android.content.ServiceConnection;
+import android.media.AudioManager;
import android.os.IBinder;
import android.util.Log;
+import androidx.annotation.MainThread;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
-import androidx.annotation.UiThread;
import androidx.lifecycle.DefaultLifecycleObserver;
import androidx.lifecycle.LifecycleOwner;
-import dev.conreality.sdk.android.Headset;
-import dev.conreality.sdk.android.HeadsetService;
-import dev.conreality.sdk.android.HeadsetStatus;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
import io.flutter.plugin.common.EventChannel;
import io.flutter.plugin.common.EventChannel.EventSink;
import io.flutter.plugin.common.EventChannel.StreamHandler;
@@ -24,11 +34,9 @@
import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
import io.flutter.plugin.common.MethodChannel.Result;
import io.flutter.plugin.common.PluginRegistry.Registrar;
-import io.reactivex.android.schedulers.AndroidSchedulers;
-import io.reactivex.disposables.Disposable;
/** ConrealityHeadsetPlugin */
-public final class ConrealityHeadsetPlugin implements DefaultLifecycleObserver, ServiceConnection, StreamHandler, MethodCallHandler {
+public final class ConrealityHeadsetPlugin extends BroadcastReceiver implements DefaultLifecycleObserver, ServiceConnection, MethodCallHandler, StreamHandler, BluetoothProfile.ServiceListener {
private static final String TAG = "ConrealityHeadset";
private static final String METHOD_CHANNEL = "app.conreality.plugins.headset";
private static final String EVENT_CHANNEL = "app.conreality.plugins.headset/status";
@@ -37,96 +45,94 @@ public final class ConrealityHeadsetPlugin implements DefaultLifecycleObserver,
public static void registerWith(final @NonNull Registrar registrar) {
assert(registrar != null);
+ final MethodChannel methodChannel = new MethodChannel(registrar.messenger(), METHOD_CHANNEL);
+ final EventChannel eventChannel = new EventChannel(registrar.messenger(), EVENT_CHANNEL);
final ConrealityHeadsetPlugin instance = new ConrealityHeadsetPlugin(registrar);
-
- new EventChannel(registrar.messenger(), EVENT_CHANNEL)
- .setStreamHandler(instance);
- new MethodChannel(registrar.messenger(), METHOD_CHANNEL)
- .setMethodCallHandler(instance);
+ methodChannel.setMethodCallHandler(instance);
+ eventChannel.setStreamHandler(instance);
}
private final @NonNull Registrar registrar;
+ private final @Nullable BluetoothAdapter bluetoothAdapter;
private @Nullable HeadsetService service;
- private @Nullable Disposable input;
- private @Nullable EventChannel.EventSink output;
+ private @Nullable BluetoothHeadset bluetoothHeadset;
+ private @Nullable EventChannel.EventSink events;
+ private boolean hasWiredHeadset;
+ private boolean hasWirelessHeadset;
+ private boolean hasMicrophone;
- private ConrealityHeadsetPlugin(final @NonNull Registrar registrar) {
+ @SuppressWarnings("deprecation")
+ ConrealityHeadsetPlugin(final @NonNull Registrar registrar) {
assert(registrar != null);
this.registrar = registrar;
+ this.bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
final @NonNull Activity activity = registrar.activity();
if (activity instanceof LifecycleOwner) {
((LifecycleOwner)activity).getLifecycle().addObserver(this);
}
- final @NonNull Context context = registrar.context();
- final boolean ok = HeadsetService.bind(context, this);
+ final @NonNull Context context = this.registrar.context();
+ final boolean ok = context.bindService(new Intent(context, HeadsetService.class), this, Context.BIND_AUTO_CREATE);
if (!ok) {
- Log.e(TAG, "Failed to connect to the headset service.");
+ Log.e(TAG, "Failed to connect to the bound service.");
}
- // Request the permission to record audio:
- if (!Headset.hasPermissions(context)) {
- Headset.requestPermissions(activity);
+ final @Nullable AudioManager audioManager = (AudioManager)registrar.context().getSystemService(Context.AUDIO_SERVICE);
+ if (audioManager != null) {
+ this.hasWiredHeadset = audioManager.isWiredHeadsetOn();
+ this.hasWirelessHeadset = audioManager.isBluetoothA2dpOn() || audioManager.isBluetoothScoOn();
}
}
- /** Implements android.content.ServiceConnection#onServiceConnected(). */
+ private boolean isConnected() {
+ return this.hasWiredHeadset || this.hasWirelessHeadset;
+ }
+
+ private void sendEvent(final Object event) {
+ assert(this.events != null);
+ this.events.success(event);
+ }
+
+ private void sendStatus() {
+
+ try {
+ JSONObject json = new JSONObject();
+ json.put("isConnected", this.isConnected());
+ json.put("hasWiredHeadset", this.hasWiredHeadset);
+ json.put("hasWirelessHeadset", this.hasWirelessHeadset);
+ json.put("hasMicrophone", this.hasMicrophone);
+ json.put("hasHeadsetMicrophone", null);
+ json.put("hasInbuiltMicrophone", null);
+ this.sendEvent(json.toString());
+ } catch (JSONException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /** Implements ServiceConnection#onServiceConnected(). */
@Override
public void onServiceConnected(final @NonNull ComponentName name, final @NonNull IBinder service) {
assert(name != null);
assert(service != null);
Log.d(TAG, String.format("onServiceConnected: name=%s service=%s", name, service));
-
- this.service = ((HeadsetService.LocalBinder)service).getService();
- this.input = this.service.listen()
- .observeOn(AndroidSchedulers.mainThread())
- // TODO: error handling
- .subscribe(event -> {
- if (output != null) {
- output.success(event.hasWiredHeadset || event.hasWirelessHeadset);
- }
- });
+ HeadsetService.LocalBinder binder = (HeadsetService.LocalBinder) service;
+ this.service = (HeadsetService) binder.getService();
+ this.service.onConnection(this.registrar.context());
}
- /** Implements android.content.ServiceConnection#onServiceDisconnected(). */
+ /** Implements ServiceConnection#onServiceDisconnected(). */
@Override
public void onServiceDisconnected(final @NonNull ComponentName name) {
assert(name != null);
Log.d(TAG, String.format("onServiceDisconnected: name=%s", name));
-
- if (this.input != null) {
- this.input.dispose();
- this.input = null;
- }
this.service = null;
}
- /** Implements io.flutter.plugin.common.EventChannel.StreamHandler#onListen(). */
- @UiThread
- @Override
- public void onListen(final Object _arguments, final @NonNull EventChannel.EventSink events) {
- assert(events != null);
-
- this.output = events;
- this.output.success(this.isConnected()); // send the initial event
- }
-
- /** Implements io.flutter.plugin.common.EventChannel.StreamHandler#onCancel(). */
- @UiThread
- @Override
- public void onCancel(final Object _arguments) {
- if (this.output != null) {
- this.output.endOfStream();
- this.output = null;
- }
- }
-
- /** Implements io.flutter.plugin.common.MethodChannel.MethodCallHandler#onMethodCall(). */
- @UiThread
+ /** Implements MethodCallHandler#onMethodCall(). */
@Override
public void onMethodCall(final @NonNull MethodCall call, final @NonNull Result result) {
assert(result != null);
@@ -144,11 +150,6 @@ public void onMethodCall(final @NonNull MethodCall call, final @NonNull Result r
break;
}
- case "playFile": {
- result.success((this.service == null) ? false : this.service.playFile((String)call.arguments));
- break;
- }
-
case "speak": {
result.success((this.service == null) ? false : this.service.speak((String)call.arguments));
break;
@@ -174,8 +175,101 @@ public void onMethodCall(final @NonNull MethodCall call, final @NonNull Result r
}
}
- private boolean isConnected() {
- final HeadsetStatus status = (this.service != null) ? this.service.getStatus() : null;
- return (status != null) && (status.hasWiredHeadset || status.hasWirelessHeadset);
+ /** Implements StreamHandler#onListen(). */
+ @Override
+ public void onListen(final @Nullable Object _arguments, final @NonNull EventChannel.EventSink events) {
+ assert(events != null);
+
+ this.events = events;
+
+ final Context context = this.registrar.context();
+
+ if (this.bluetoothAdapter != null && this.bluetoothAdapter.isEnabled()) {
+ final boolean ok = this.bluetoothAdapter.getProfileProxy(context, this, BluetoothProfile.HEADSET);
+ if (!ok) {
+ Log.e(TAG, "Failed to connect to the Bluetooth headset service.");
+ }
+ }
+
+ context.registerReceiver(this, new IntentFilter(AudioManager.ACTION_HEADSET_PLUG));
+ context.registerReceiver(this, new IntentFilter(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED));
+ }
+
+ /** Implements StreamHandler#onCancel(). */
+ @Override
+ public void onCancel(final @Nullable Object _arguments) {
+ this.registrar.context().unregisterReceiver(this);
+
+ if (this.bluetoothAdapter != null && this.bluetoothHeadset != null) {
+ this.bluetoothAdapter.closeProfileProxy(BluetoothProfile.HEADSET, this.bluetoothHeadset);
+ this.bluetoothHeadset = null;
+ }
+
+ this.events = null;
+ }
+
+ /** Implements BroadcastReceiver#onReceive(). */
+ @MainThread
+ @Override
+ public void onReceive(final @NonNull Context context, final @NonNull Intent intent) {
+ assert(context != null);
+ assert(intent != null);
+
+ switch (intent.getAction()) {
+ case AudioManager.ACTION_HEADSET_PLUG: {
+
+ final int state = intent.getIntExtra("state", -1);
+ final int microphone = intent.getIntExtra("microphone", -1);
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ final String name = intent.getStringExtra("name");
+ Log.d(TAG, String.format("Received broadcast: %s state=%d microphone=%d name=%s", intent.toString(), state, microphone, name));
+ }
+ this.hasWiredHeadset = (state == 1);
+ this.hasMicrophone = (microphone == 1);
+ this.sendStatus();
+ break;
+ }
+
+ case BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED: {
+ final int state = intent.getIntExtra(BluetoothProfile.EXTRA_STATE, -1);
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ final BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
+ Log.d(TAG, String.format("Received broadcast: %s state=%d device=%s", intent.toString(), state, device.toString()));
+ }
+ this.hasWirelessHeadset = (state == BluetoothProfile.STATE_CONNECTED);
+ this.sendStatus();
+ break;
+ }
+
+ default: break; // ignore UFOs
+ }
+ }
+
+ /** Implements BluetoothProfile.ServiceListener#onServiceConnected(). */
+ @Override
+ public void onServiceConnected(final int profile, final @NonNull BluetoothProfile proxy) {
+ assert(proxy != null);
+
+ if (profile == BluetoothProfile.HEADSET) {
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Log.d(TAG, "Connected to the Bluetooth headset service.");
+ }
+ this.bluetoothHeadset = (BluetoothHeadset)proxy;
+ this.hasWirelessHeadset = (proxy.getConnectedDevices().size() > 0);
+ this.sendStatus();
+ }
+ }
+
+ /** Implements BluetoothProfile.ServiceListener#onServiceDisconnected(). */
+ @Override
+ public void onServiceDisconnected(final int profile) {
+ if (profile == BluetoothProfile.HEADSET) {
+ if (Log.isLoggable(TAG, Log.INFO)) {
+ Log.i(TAG, "Disconnected from the Bluetooth headset service.");
+ }
+ this.bluetoothHeadset = null;
+ this.hasWirelessHeadset = false;
+ this.sendStatus();
+ }
}
}
diff --git a/conreality_headset/android/src/main/java/app/conreality/plugins/headset/HeadsetService.java b/conreality_headset/android/src/main/java/app/conreality/plugins/headset/HeadsetService.java
new file mode 100644
index 0000000..ec1ec8a
--- /dev/null
+++ b/conreality_headset/android/src/main/java/app/conreality/plugins/headset/HeadsetService.java
@@ -0,0 +1,141 @@
+/* This is free and unencumbered software released into the public domain. */
+
+package app.conreality.plugins.headset;
+
+import android.app.Service;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Binder;
+import android.os.Bundle;
+import android.os.IBinder;
+import android.speech.tts.TextToSpeech;
+import android.speech.tts.UtteranceProgressListener;
+import android.util.Log;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+/** HeadsetService */
+public final class HeadsetService extends Service implements TextToSpeech.OnInitListener {
+ private static final String TAG = "ConrealityHeadset";
+ private static final String TTS_ENGINE = "com.google.android.tts";
+
+ public final class LocalBinder extends Binder {
+ public @NonNull HeadsetService getService() {
+ return HeadsetService.this;
+ }
+ }
+
+ private final @NonNull IBinder binder = new LocalBinder();
+ private @Nullable TextToSpeech ttsEngine;
+ private @Nullable Bundle ttsParams;
+ private @Nullable List ttsQueue = new ArrayList();
+
+ /** Implements Service#onBind(). */
+ @Override
+ public @NonNull IBinder onBind(final @NonNull Intent intent) {
+ return this.binder;
+ }
+
+ /** Implements Service#onCreate(). */
+ @Override
+ public void onCreate() {
+ Log.i(TAG, "Created the bound service.");
+ }
+
+ public void onConnection(final @NonNull Context context) {
+ assert(context != null);
+
+ this.ttsEngine = new TextToSpeech(context, this, TTS_ENGINE);
+ this.ttsParams = new Bundle();
+ }
+
+ /** Implements Service#onDestroy(). */
+ @Override
+ public void onDestroy() {
+ Log.d(TAG, "Terminating the bound service...");
+ if (this.ttsEngine != null) {
+ this.ttsEngine.shutdown();
+ this.ttsEngine = null;
+ this.ttsParams = null;
+ }
+ if (this.ttsQueue != null) {
+ this.ttsQueue = null;
+ }
+ Log.i(TAG, "Terminated the bound service.");
+ }
+
+ /** Implements Service#onStartCommand(). */
+ @Override
+ public int onStartCommand(final @NonNull Intent intent, final int flags, final int startID) {
+ assert(intent != null);
+
+ final String action = (intent != null) ? intent.getAction() : null;
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Log.d(TAG, String.format("HeadsetService.onStartCommand: intent=%s flags=%d startID=%d action=%s", intent, flags, startID, action));
+ }
+ switch (action) {
+ case "speak": {
+ this.speak(intent.getStringExtra("message"));
+ break;
+ }
+ }
+ return START_REDELIVER_INTENT;
+ }
+
+ /** Implements TextToSpeech.OnInitListener#onInit(). */
+ @Override
+ public void onInit(final int status) {
+ if (status == TextToSpeech.SUCCESS && this.ttsQueue != null) {
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Log.d(TAG, "Initialized the speech synthesis engine.");
+ }
+ //this.ttsEngine.setOnUtteranceProgressListener(this); // TODO
+ for (final String message : this.ttsQueue) {
+ this._speak(message, TextToSpeech.QUEUE_ADD);
+ }
+ this.ttsQueue.clear();
+ }
+ else {
+ this.ttsEngine = null;
+ this.ttsParams = null;
+ this.ttsQueue = null;
+ Log.e(TAG, "Failed to initialize the speech synthesis engine.");
+ }
+ }
+
+ public boolean canSpeak() {
+ return (this.ttsEngine != null) || (this.ttsQueue != null);
+ }
+
+ public boolean speak(final @NonNull String message) {
+ assert(message != null);
+
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Log.d(TAG, String.format("HeadsetService.speak: message=\"%s\"", message));
+ }
+
+ if (this.ttsEngine == null) {
+ if (this.ttsQueue == null) return false; // nothing to be done
+ return ttsQueue.add(message);
+ }
+ return this._speak(message, TextToSpeech.QUEUE_FLUSH);
+ }
+
+ public boolean stopSpeaking() {
+ Log.d(TAG, "HeadsetService.stopSpeaking");
+
+ if (this.ttsQueue != null) this.ttsQueue.clear();
+ if (this.ttsEngine == null) return false;
+ return this.ttsEngine.stop() == TextToSpeech.SUCCESS;
+ }
+
+ private boolean _speak(final @NonNull String message, int queueMode) {
+ assert(message != null);
+
+ final @NonNull String utteranceID = UUID.randomUUID().toString();
+ return this.ttsEngine.speak(message, queueMode, this.ttsParams, utteranceID) == TextToSpeech.SUCCESS;
+ }
+}
diff --git a/conreality_headset/example/.flutter-plugins-dependencies b/conreality_headset/example/.flutter-plugins-dependencies
new file mode 100644
index 0000000..37217db
--- /dev/null
+++ b/conreality_headset/example/.flutter-plugins-dependencies
@@ -0,0 +1 @@
+{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"conreality_headset","path":"/Users/gangadharashetty/Code/Company/conreality-plugins/conreality_headset/","dependencies":[]}],"android":[{"name":"conreality_headset","path":"/Users/gangadharashetty/Code/Company/conreality-plugins/conreality_headset/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"conreality_headset","dependencies":[]}],"date_created":"2021-05-31 14:37:28.603530","version":"1.22.6"}
\ No newline at end of file
diff --git a/conreality_headset/example/.gitignore b/conreality_headset/example/.gitignore
new file mode 100644
index 0000000..0fa6b67
--- /dev/null
+++ b/conreality_headset/example/.gitignore
@@ -0,0 +1,46 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.buildlog/
+.history
+.svn/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# The .vscode folder contains launch configuration and tasks you configure in
+# VS Code which you may wish to be included in version control, so this line
+# is commented out by default.
+#.vscode/
+
+# Flutter/Dart/Pub related
+**/doc/api/
+**/ios/Flutter/.last_build_id
+.dart_tool/
+.flutter-plugins
+.flutter-plugins-dependencies
+.packages
+.pub-cache/
+.pub/
+/build/
+
+# Web related
+lib/generated_plugin_registrant.dart
+
+# Symbolication related
+app.*.symbols
+
+# Obfuscation related
+app.*.map.json
+
+# Android Studio will place build artifacts here
+/android/app/debug
+/android/app/profile
+/android/app/release
diff --git a/conreality_headset/example/.metadata b/conreality_headset/example/.metadata
new file mode 100644
index 0000000..140b929
--- /dev/null
+++ b/conreality_headset/example/.metadata
@@ -0,0 +1,10 @@
+# This file tracks properties of this Flutter project.
+# Used by Flutter tool to assess capabilities and perform upgrades etc.
+#
+# This file should be version controlled and should not be manually edited.
+
+version:
+ revision: 4d7946a68d26794349189cf21b3f68cc6fe61dcb
+ channel: stable
+
+project_type: app
diff --git a/conreality_headset/example/android/.gitignore b/conreality_headset/example/android/.gitignore
new file mode 100644
index 0000000..0a741cb
--- /dev/null
+++ b/conreality_headset/example/android/.gitignore
@@ -0,0 +1,11 @@
+gradle-wrapper.jar
+/.gradle
+/captures/
+/gradlew
+/gradlew.bat
+/local.properties
+GeneratedPluginRegistrant.java
+
+# Remember to never publicly share your keystore.
+# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
+key.properties
diff --git a/conreality_headset/example/android/app/build.gradle b/conreality_headset/example/android/app/build.gradle
new file mode 100644
index 0000000..8351136
--- /dev/null
+++ b/conreality_headset/example/android/app/build.gradle
@@ -0,0 +1,59 @@
+def localProperties = new Properties()
+def localPropertiesFile = rootProject.file('local.properties')
+if (localPropertiesFile.exists()) {
+ localPropertiesFile.withReader('UTF-8') { reader ->
+ localProperties.load(reader)
+ }
+}
+
+def flutterRoot = localProperties.getProperty('flutter.sdk')
+if (flutterRoot == null) {
+ throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
+}
+
+def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
+if (flutterVersionCode == null) {
+ flutterVersionCode = '1'
+}
+
+def flutterVersionName = localProperties.getProperty('flutter.versionName')
+if (flutterVersionName == null) {
+ flutterVersionName = '1.0'
+}
+
+apply plugin: 'com.android.application'
+apply plugin: 'kotlin-android'
+apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
+
+android {
+ compileSdkVersion 30
+
+ sourceSets {
+ main.java.srcDirs += 'src/main/kotlin'
+ }
+
+ defaultConfig {
+ // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
+ applicationId "com.example.example"
+ minSdkVersion 21
+ targetSdkVersion 30
+ versionCode flutterVersionCode.toInteger()
+ versionName flutterVersionName
+ }
+
+ buildTypes {
+ release {
+ // TODO: Add your own signing config for the release build.
+ // Signing with the debug keys for now, so `flutter run --release` works.
+ signingConfig signingConfigs.debug
+ }
+ }
+}
+
+flutter {
+ source '../..'
+}
+
+dependencies {
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
+}
diff --git a/conreality_headset/example/android/app/src/debug/AndroidManifest.xml b/conreality_headset/example/android/app/src/debug/AndroidManifest.xml
new file mode 100644
index 0000000..c208884
--- /dev/null
+++ b/conreality_headset/example/android/app/src/debug/AndroidManifest.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/conreality_headset/example/android/app/src/main/AndroidManifest.xml b/conreality_headset/example/android/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..34dd77e
--- /dev/null
+++ b/conreality_headset/example/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/conreality_headset/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt b/conreality_headset/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt
new file mode 100644
index 0000000..e793a00
--- /dev/null
+++ b/conreality_headset/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt
@@ -0,0 +1,6 @@
+package com.example.example
+
+import io.flutter.embedding.android.FlutterActivity
+
+class MainActivity: FlutterActivity() {
+}
diff --git a/conreality_headset/example/android/app/src/main/res/drawable-v21/launch_background.xml b/conreality_headset/example/android/app/src/main/res/drawable-v21/launch_background.xml
new file mode 100644
index 0000000..f74085f
--- /dev/null
+++ b/conreality_headset/example/android/app/src/main/res/drawable-v21/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/conreality_headset/example/android/app/src/main/res/drawable/launch_background.xml b/conreality_headset/example/android/app/src/main/res/drawable/launch_background.xml
new file mode 100644
index 0000000..304732f
--- /dev/null
+++ b/conreality_headset/example/android/app/src/main/res/drawable/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/conreality_headset/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/conreality_headset/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..db77bb4
Binary files /dev/null and b/conreality_headset/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/conreality_headset/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/conreality_headset/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..17987b7
Binary files /dev/null and b/conreality_headset/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/conreality_headset/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/conreality_headset/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..09d4391
Binary files /dev/null and b/conreality_headset/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/conreality_headset/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/conreality_headset/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..d5f1c8d
Binary files /dev/null and b/conreality_headset/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/conreality_headset/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/conreality_headset/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..4d6372e
Binary files /dev/null and b/conreality_headset/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/conreality_headset/example/android/app/src/main/res/values-night/styles.xml b/conreality_headset/example/android/app/src/main/res/values-night/styles.xml
new file mode 100644
index 0000000..449a9f9
--- /dev/null
+++ b/conreality_headset/example/android/app/src/main/res/values-night/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/conreality_headset/example/android/app/src/main/res/values/styles.xml b/conreality_headset/example/android/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..d74aa35
--- /dev/null
+++ b/conreality_headset/example/android/app/src/main/res/values/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/conreality_headset/example/android/app/src/profile/AndroidManifest.xml b/conreality_headset/example/android/app/src/profile/AndroidManifest.xml
new file mode 100644
index 0000000..c208884
--- /dev/null
+++ b/conreality_headset/example/android/app/src/profile/AndroidManifest.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/conreality_headset/example/android/build.gradle b/conreality_headset/example/android/build.gradle
new file mode 100644
index 0000000..c505a86
--- /dev/null
+++ b/conreality_headset/example/android/build.gradle
@@ -0,0 +1,31 @@
+buildscript {
+ ext.kotlin_version = '1.3.50'
+ repositories {
+ google()
+ jcenter()
+ }
+
+ dependencies {
+ classpath 'com.android.tools.build:gradle:4.1.0'
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+ }
+}
+
+allprojects {
+ repositories {
+ google()
+ jcenter()
+ }
+}
+
+rootProject.buildDir = '../build'
+subprojects {
+ project.buildDir = "${rootProject.buildDir}/${project.name}"
+}
+subprojects {
+ project.evaluationDependsOn(':app')
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
diff --git a/conreality_headset/example/android/gradle.properties b/conreality_headset/example/android/gradle.properties
new file mode 100644
index 0000000..94adc3a
--- /dev/null
+++ b/conreality_headset/example/android/gradle.properties
@@ -0,0 +1,3 @@
+org.gradle.jvmargs=-Xmx1536M
+android.useAndroidX=true
+android.enableJetifier=true
diff --git a/conreality_headset/example/android/gradle/wrapper/gradle-wrapper.properties b/conreality_headset/example/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..bc6a58a
--- /dev/null
+++ b/conreality_headset/example/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Fri Jun 23 08:50:38 CEST 2017
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
diff --git a/conreality_headset/example/android/settings.gradle b/conreality_headset/example/android/settings.gradle
new file mode 100644
index 0000000..44e62bc
--- /dev/null
+++ b/conreality_headset/example/android/settings.gradle
@@ -0,0 +1,11 @@
+include ':app'
+
+def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
+def properties = new Properties()
+
+assert localPropertiesFile.exists()
+localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
+
+def flutterSdkPath = properties.getProperty("flutter.sdk")
+assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
+apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
diff --git a/conreality_headset/example/ios/.gitignore b/conreality_headset/example/ios/.gitignore
new file mode 100644
index 0000000..e96ef60
--- /dev/null
+++ b/conreality_headset/example/ios/.gitignore
@@ -0,0 +1,32 @@
+*.mode1v3
+*.mode2v3
+*.moved-aside
+*.pbxuser
+*.perspectivev3
+**/*sync/
+.sconsign.dblite
+.tags*
+**/.vagrant/
+**/DerivedData/
+Icon?
+**/Pods/
+**/.symlinks/
+profile
+xcuserdata
+**/.generated/
+Flutter/App.framework
+Flutter/Flutter.framework
+Flutter/Flutter.podspec
+Flutter/Generated.xcconfig
+Flutter/app.flx
+Flutter/app.zip
+Flutter/flutter_assets/
+Flutter/flutter_export_environment.sh
+ServiceDefinitions.json
+Runner/GeneratedPluginRegistrant.*
+
+# Exceptions to above rules.
+!default.mode1v3
+!default.mode2v3
+!default.pbxuser
+!default.perspectivev3
diff --git a/conreality_headset/example/ios/Flutter/AppFrameworkInfo.plist b/conreality_headset/example/ios/Flutter/AppFrameworkInfo.plist
new file mode 100644
index 0000000..9367d48
--- /dev/null
+++ b/conreality_headset/example/ios/Flutter/AppFrameworkInfo.plist
@@ -0,0 +1,26 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ App
+ CFBundleIdentifier
+ io.flutter.flutter.app
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ App
+ CFBundlePackageType
+ FMWK
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1.0
+ MinimumOSVersion
+ 8.0
+
+
diff --git a/conreality_headset/example/ios/Flutter/Debug.xcconfig b/conreality_headset/example/ios/Flutter/Debug.xcconfig
new file mode 100644
index 0000000..96e9085
--- /dev/null
+++ b/conreality_headset/example/ios/Flutter/Debug.xcconfig
@@ -0,0 +1,3 @@
+#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
+#include "Generated.xcconfig"
diff --git a/conreality_headset/example/ios/Flutter/Release.xcconfig b/conreality_headset/example/ios/Flutter/Release.xcconfig
new file mode 100644
index 0000000..388e6ff
--- /dev/null
+++ b/conreality_headset/example/ios/Flutter/Release.xcconfig
@@ -0,0 +1,3 @@
+#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
+#include "Generated.xcconfig"
diff --git a/conreality_headset/example/ios/Podfile b/conreality_headset/example/ios/Podfile
new file mode 100644
index 0000000..1e8c3c9
--- /dev/null
+++ b/conreality_headset/example/ios/Podfile
@@ -0,0 +1,41 @@
+# Uncomment this line to define a global platform for your project
+# platform :ios, '9.0'
+
+# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
+ENV['COCOAPODS_DISABLE_STATS'] = 'true'
+
+project 'Runner', {
+ 'Debug' => :debug,
+ 'Profile' => :release,
+ 'Release' => :release,
+}
+
+def flutter_root
+ generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
+ unless File.exist?(generated_xcode_build_settings_path)
+ raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
+ end
+
+ File.foreach(generated_xcode_build_settings_path) do |line|
+ matches = line.match(/FLUTTER_ROOT\=(.*)/)
+ return matches[1].strip if matches
+ end
+ raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
+end
+
+require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
+
+flutter_ios_podfile_setup
+
+target 'Runner' do
+ use_frameworks!
+ use_modular_headers!
+
+ flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
+end
+
+post_install do |installer|
+ installer.pods_project.targets.each do |target|
+ flutter_additional_ios_build_settings(target)
+ end
+end
diff --git a/conreality_headset/example/ios/Podfile.lock b/conreality_headset/example/ios/Podfile.lock
new file mode 100644
index 0000000..748f884
--- /dev/null
+++ b/conreality_headset/example/ios/Podfile.lock
@@ -0,0 +1,22 @@
+PODS:
+ - conreality_headset (0.2.0):
+ - Flutter
+ - Flutter (1.0.0)
+
+DEPENDENCIES:
+ - conreality_headset (from `.symlinks/plugins/conreality_headset/ios`)
+ - Flutter (from `Flutter`)
+
+EXTERNAL SOURCES:
+ conreality_headset:
+ :path: ".symlinks/plugins/conreality_headset/ios"
+ Flutter:
+ :path: Flutter
+
+SPEC CHECKSUMS:
+ conreality_headset: 6fdb46a68192033c6ee2351dd13762dd618846a4
+ Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
+
+PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
+
+COCOAPODS: 1.10.1
diff --git a/conreality_headset/example/ios/Runner.xcodeproj/project.pbxproj b/conreality_headset/example/ios/Runner.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..d56aee4
--- /dev/null
+++ b/conreality_headset/example/ios/Runner.xcodeproj/project.pbxproj
@@ -0,0 +1,539 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
+ C6E3500129BCAB23ABE2E95B /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 07ECB684BD30B2547ED2D606 /* Pods_Runner.framework */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 10;
+ files = (
+ );
+ name = "Embed Frameworks";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 07ECB684BD30B2547ED2D606 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ 0C3BC5C55BC0BF7452C8E4E9 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
+ 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
+ 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
+ 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+ B1794994880CAE516DDCCED3 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
+ DFABC8519E50AFDE14CE284E /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 97C146EB1CF9000F007C117D /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ C6E3500129BCAB23ABE2E95B /* Pods_Runner.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 32BDBD2A3A1EDCE5DFA7413B /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 07ECB684BD30B2547ED2D606 /* Pods_Runner.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "";
+ };
+ 9740EEB11CF90186004384FC /* Flutter */ = {
+ isa = PBXGroup;
+ children = (
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */,
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */,
+ );
+ name = Flutter;
+ sourceTree = "";
+ };
+ 97C146E51CF9000F007C117D = {
+ isa = PBXGroup;
+ children = (
+ 9740EEB11CF90186004384FC /* Flutter */,
+ 97C146F01CF9000F007C117D /* Runner */,
+ 97C146EF1CF9000F007C117D /* Products */,
+ BFD5C8B1E85D764C440D0606 /* Pods */,
+ 32BDBD2A3A1EDCE5DFA7413B /* Frameworks */,
+ );
+ sourceTree = "";
+ };
+ 97C146EF1CF9000F007C117D /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146EE1CF9000F007C117D /* Runner.app */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 97C146F01CF9000F007C117D /* Runner */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146FA1CF9000F007C117D /* Main.storyboard */,
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */,
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
+ 97C147021CF9000F007C117D /* Info.plist */,
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
+ );
+ path = Runner;
+ sourceTree = "";
+ };
+ BFD5C8B1E85D764C440D0606 /* Pods */ = {
+ isa = PBXGroup;
+ children = (
+ 0C3BC5C55BC0BF7452C8E4E9 /* Pods-Runner.debug.xcconfig */,
+ DFABC8519E50AFDE14CE284E /* Pods-Runner.release.xcconfig */,
+ B1794994880CAE516DDCCED3 /* Pods-Runner.profile.xcconfig */,
+ );
+ name = Pods;
+ path = Pods;
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 97C146ED1CF9000F007C117D /* Runner */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
+ buildPhases = (
+ D517689E8B281DDEB6638701 /* [CP] Check Pods Manifest.lock */,
+ 9740EEB61CF901F6004384FC /* Run Script */,
+ 97C146EA1CF9000F007C117D /* Sources */,
+ 97C146EB1CF9000F007C117D /* Frameworks */,
+ 97C146EC1CF9000F007C117D /* Resources */,
+ 9705A1C41CF9048500538489 /* Embed Frameworks */,
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
+ 543EFD3BD88FE6BB92D11171 /* [CP] Embed Pods Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = Runner;
+ productName = Runner;
+ productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 97C146E61CF9000F007C117D /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 1020;
+ ORGANIZATIONNAME = "";
+ TargetAttributes = {
+ 97C146ED1CF9000F007C117D = {
+ CreatedOnToolsVersion = 7.3.1;
+ LastSwiftMigration = 1100;
+ };
+ };
+ };
+ buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
+ compatibilityVersion = "Xcode 9.3";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = 97C146E51CF9000F007C117D;
+ productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 97C146ED1CF9000F007C117D /* Runner */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 97C146EC1CF9000F007C117D /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Thin Binary";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
+ };
+ 543EFD3BD88FE6BB92D11171 /* [CP] Embed Pods Frameworks */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
+ );
+ name = "[CP] Embed Pods Frameworks";
+ outputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
+ showEnvVarsInLog = 0;
+ };
+ 9740EEB61CF901F6004384FC /* Run Script */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Run Script";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
+ };
+ D517689E8B281DDEB6638701 /* [CP] Check Pods Manifest.lock */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ );
+ inputPaths = (
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+ "${PODS_ROOT}/Manifest.lock",
+ );
+ name = "[CP] Check Pods Manifest.lock";
+ outputFileListPaths = (
+ );
+ outputPaths = (
+ "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+ showEnvVarsInLog = 0;
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 97C146EA1CF9000F007C117D /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C146FB1CF9000F007C117D /* Base */,
+ );
+ name = Main.storyboard;
+ sourceTree = "";
+ };
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C147001CF9000F007C117D /* Base */,
+ );
+ name = LaunchScreen.storyboard;
+ sourceTree = "";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 249021D3217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Profile;
+ };
+ 249021D4217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Profile;
+ };
+ 97C147031CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 97C147041CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
+ SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 97C147061CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Debug;
+ };
+ 97C147071CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147031CF9000F007C117D /* Debug */,
+ 97C147041CF9000F007C117D /* Release */,
+ 249021D3217E4FDB00AE95B9 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147061CF9000F007C117D /* Debug */,
+ 97C147071CF9000F007C117D /* Release */,
+ 249021D4217E4FDB00AE95B9 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 97C146E61CF9000F007C117D /* Project object */;
+}
diff --git a/conreality_headset/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/conreality_headset/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..919434a
--- /dev/null
+++ b/conreality_headset/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/conreality_headset/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/conreality_headset/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/conreality_headset/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/conreality_headset/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/conreality_headset/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..f9b0d7c
--- /dev/null
+++ b/conreality_headset/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/conreality_headset/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/conreality_headset/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
new file mode 100644
index 0000000..a28140c
--- /dev/null
+++ b/conreality_headset/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/conreality_headset/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/conreality_headset/example/ios/Runner.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..21a3cc1
--- /dev/null
+++ b/conreality_headset/example/ios/Runner.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
diff --git a/conreality_headset/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/conreality_headset/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/conreality_headset/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/conreality_headset/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/conreality_headset/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..f9b0d7c
--- /dev/null
+++ b/conreality_headset/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/conreality_headset/example/ios/Runner/AppDelegate.swift b/conreality_headset/example/ios/Runner/AppDelegate.swift
new file mode 100644
index 0000000..70693e4
--- /dev/null
+++ b/conreality_headset/example/ios/Runner/AppDelegate.swift
@@ -0,0 +1,13 @@
+import UIKit
+import Flutter
+
+@UIApplicationMain
+@objc class AppDelegate: FlutterAppDelegate {
+ override func application(
+ _ application: UIApplication,
+ didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
+ ) -> Bool {
+ GeneratedPluginRegistrant.register(with: self)
+ return super.application(application, didFinishLaunchingWithOptions: launchOptions)
+ }
+}
diff --git a/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000..d36b1fa
--- /dev/null
+++ b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,122 @@
+{
+ "images" : [
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-20x20@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-20x20@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-40x40@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-40x40@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-60x60@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-60x60@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-20x20@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-20x20@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-29x29@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-29x29@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-40x40@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-40x40@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-76x76@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-76x76@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "83.5x83.5",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-83.5x83.5@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "1024x1024",
+ "idiom" : "ios-marketing",
+ "filename" : "Icon-App-1024x1024@1x.png",
+ "scale" : "1x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
diff --git a/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
new file mode 100644
index 0000000..dc9ada4
Binary files /dev/null and b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ
diff --git a/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
new file mode 100644
index 0000000..28c6bf0
Binary files /dev/null and b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ
diff --git a/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
new file mode 100644
index 0000000..2ccbfd9
Binary files /dev/null and b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ
diff --git a/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
new file mode 100644
index 0000000..f091b6b
Binary files /dev/null and b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ
diff --git a/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
new file mode 100644
index 0000000..4cde121
Binary files /dev/null and b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ
diff --git a/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
new file mode 100644
index 0000000..d0ef06e
Binary files /dev/null and b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ
diff --git a/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
new file mode 100644
index 0000000..dcdc230
Binary files /dev/null and b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ
diff --git a/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
new file mode 100644
index 0000000..2ccbfd9
Binary files /dev/null and b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ
diff --git a/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
new file mode 100644
index 0000000..c8f9ed8
Binary files /dev/null and b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ
diff --git a/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
new file mode 100644
index 0000000..a6d6b86
Binary files /dev/null and b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ
diff --git a/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
new file mode 100644
index 0000000..a6d6b86
Binary files /dev/null and b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ
diff --git a/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
new file mode 100644
index 0000000..75b2d16
Binary files /dev/null and b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ
diff --git a/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
new file mode 100644
index 0000000..c4df70d
Binary files /dev/null and b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ
diff --git a/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
new file mode 100644
index 0000000..6a84f41
Binary files /dev/null and b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ
diff --git a/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
new file mode 100644
index 0000000..d0e1f58
Binary files /dev/null and b/conreality_headset/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ
diff --git a/conreality_headset/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/conreality_headset/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
new file mode 100644
index 0000000..0bedcf2
--- /dev/null
+++ b/conreality_headset/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage@3x.png",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
diff --git a/conreality_headset/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/conreality_headset/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/conreality_headset/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ
diff --git a/conreality_headset/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/conreality_headset/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/conreality_headset/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ
diff --git a/conreality_headset/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/conreality_headset/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/conreality_headset/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ
diff --git a/conreality_headset/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/conreality_headset/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
new file mode 100644
index 0000000..89c2725
--- /dev/null
+++ b/conreality_headset/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
@@ -0,0 +1,5 @@
+# Launch Screen Assets
+
+You can customize the launch screen with your own desired assets by replacing the image files in this directory.
+
+You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
\ No newline at end of file
diff --git a/conreality_headset/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/conreality_headset/example/ios/Runner/Base.lproj/LaunchScreen.storyboard
new file mode 100644
index 0000000..f2e259c
--- /dev/null
+++ b/conreality_headset/example/ios/Runner/Base.lproj/LaunchScreen.storyboard
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/conreality_headset/example/ios/Runner/Base.lproj/Main.storyboard b/conreality_headset/example/ios/Runner/Base.lproj/Main.storyboard
new file mode 100644
index 0000000..f3c2851
--- /dev/null
+++ b/conreality_headset/example/ios/Runner/Base.lproj/Main.storyboard
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/conreality_headset/example/ios/Runner/Info.plist b/conreality_headset/example/ios/Runner/Info.plist
new file mode 100644
index 0000000..a060db6
--- /dev/null
+++ b/conreality_headset/example/ios/Runner/Info.plist
@@ -0,0 +1,45 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ example
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ $(FLUTTER_BUILD_NAME)
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ $(FLUTTER_BUILD_NUMBER)
+ LSRequiresIPhoneOS
+
+ UILaunchStoryboardName
+ LaunchScreen
+ UIMainStoryboardFile
+ Main
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UIViewControllerBasedStatusBarAppearance
+
+
+
diff --git a/conreality_headset/example/ios/Runner/Runner-Bridging-Header.h b/conreality_headset/example/ios/Runner/Runner-Bridging-Header.h
new file mode 100644
index 0000000..308a2a5
--- /dev/null
+++ b/conreality_headset/example/ios/Runner/Runner-Bridging-Header.h
@@ -0,0 +1 @@
+#import "GeneratedPluginRegistrant.h"
diff --git a/conreality_headset/example/lib/main.dart b/conreality_headset/example/lib/main.dart
new file mode 100644
index 0000000..22f0443
--- /dev/null
+++ b/conreality_headset/example/lib/main.dart
@@ -0,0 +1,46 @@
+import 'package:conreality_headset/conreality_headset.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+
+void main() {
+ runApp(MyApp());
+}
+
+class MyApp extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return MaterialApp(
+ home: FirstPage(),
+ );
+ }
+}
+
+class FirstPage extends StatefulWidget {
+ @override
+ _FirstPageState createState() => _FirstPageState();
+}
+
+class _FirstPageState extends State {
+ bool connected = false;
+ @override
+ void initState() {
+ WidgetsBinding.instance.addPostFrameCallback((timeStamp) async {
+ (await Headset.subscribe()).listen(
+ (event) {
+ print(event.toJson());
+ },
+ );
+ connected = await Headset.isConnected;
+ });
+ super.initState();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ body: Center(
+ child: Text('Headser: $connected'),
+ ),
+ );
+ }
+}
diff --git a/conreality_headset/example/pubspec.lock b/conreality_headset/example/pubspec.lock
index 94b7b24..07721e0 100644
--- a/conreality_headset/example/pubspec.lock
+++ b/conreality_headset/example/pubspec.lock
@@ -7,30 +7,44 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
- version: "2.2.0"
+ version: "2.5.0-nullsafety.1"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
- version: "1.0.4"
+ version: "2.1.0-nullsafety.1"
+ characters:
+ dependency: transitive
+ description:
+ name: characters
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "1.1.0-nullsafety.3"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
- version: "1.1.2"
+ version: "1.2.0-nullsafety.1"
+ clock:
+ dependency: transitive
+ description:
+ name: clock
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "1.1.0-nullsafety.1"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
- version: "1.14.11"
+ version: "1.15.0-nullsafety.3"
conreality_headset:
- dependency: "direct dev"
+ dependency: "direct main"
description:
path: ".."
relative: true
@@ -42,7 +56,14 @@ packages:
name: cupertino_icons
url: "https://pub.dartlang.org"
source: hosted
- version: "0.1.2"
+ version: "0.1.3"
+ fake_async:
+ dependency: transitive
+ description:
+ name: fake_async
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "1.2.0-nullsafety.1"
flutter:
dependency: "direct main"
description: flutter
@@ -59,35 +80,21 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
- version: "0.12.5"
+ version: "0.12.10-nullsafety.1"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
- version: "1.1.6"
+ version: "1.3.0-nullsafety.3"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
- version: "1.6.2"
- pedantic:
- dependency: transitive
- description:
- name: pedantic
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.7.0"
- quiver:
- dependency: transitive
- description:
- name: quiver
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.0.3"
+ version: "1.8.0-nullsafety.1"
sky_engine:
dependency: transitive
description: flutter
@@ -99,56 +106,56 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
- version: "1.5.5"
+ version: "1.8.0-nullsafety.2"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
- version: "1.9.3"
+ version: "1.10.0-nullsafety.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
- version: "2.0.0"
+ version: "2.1.0-nullsafety.1"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
- version: "1.0.4"
+ version: "1.1.0-nullsafety.1"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
- version: "1.1.0"
+ version: "1.2.0-nullsafety.1"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
- version: "0.2.5"
+ version: "0.2.19-nullsafety.2"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
- version: "1.1.6"
+ version: "1.3.0-nullsafety.3"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
- version: "2.0.8"
+ version: "2.1.0-nullsafety.3"
sdks:
- dart: ">=2.4.0 <3.0.0"
+ dart: ">=2.10.0-110 <2.11.0"
flutter: ">=1.7.8 <2.0.0"
diff --git a/conreality_headset/example/pubspec.yaml b/conreality_headset/example/pubspec.yaml
index 4fbe06f..8e5d9a4 100644
--- a/conreality_headset/example/pubspec.yaml
+++ b/conreality_headset/example/pubspec.yaml
@@ -12,6 +12,8 @@ dependencies:
sdk: flutter
cupertino_icons: ^0.1.2
+ conreality_headset:
+ path: ../
dev_dependencies:
flutter_test:
diff --git a/conreality_headset/example/test/widget_test.dart b/conreality_headset/example/test/widget_test.dart
new file mode 100644
index 0000000..747db1d
--- /dev/null
+++ b/conreality_headset/example/test/widget_test.dart
@@ -0,0 +1,30 @@
+// This is a basic Flutter widget test.
+//
+// To perform an interaction with a widget in your test, use the WidgetTester
+// utility that Flutter provides. For example, you can send tap and scroll
+// gestures. You can also use WidgetTester to find child widgets in the widget
+// tree, read text, and verify that the values of widget properties are correct.
+
+import 'package:flutter/material.dart';
+import 'package:flutter_test/flutter_test.dart';
+
+import 'package:example/main.dart';
+
+void main() {
+ testWidgets('Counter increments smoke test', (WidgetTester tester) async {
+ // Build our app and trigger a frame.
+ await tester.pumpWidget(MyApp());
+
+ // Verify that our counter starts at 0.
+ expect(find.text('0'), findsOneWidget);
+ expect(find.text('1'), findsNothing);
+
+ // Tap the '+' icon and trigger a frame.
+ await tester.tap(find.byIcon(Icons.add));
+ await tester.pump();
+
+ // Verify that our counter has incremented.
+ expect(find.text('0'), findsNothing);
+ expect(find.text('1'), findsOneWidget);
+ });
+}
diff --git a/conreality_headset/example/web/favicon.png b/conreality_headset/example/web/favicon.png
new file mode 100644
index 0000000..8aaa46a
Binary files /dev/null and b/conreality_headset/example/web/favicon.png differ
diff --git a/conreality_headset/example/web/icons/Icon-192.png b/conreality_headset/example/web/icons/Icon-192.png
new file mode 100644
index 0000000..b749bfe
Binary files /dev/null and b/conreality_headset/example/web/icons/Icon-192.png differ
diff --git a/conreality_headset/example/web/icons/Icon-512.png b/conreality_headset/example/web/icons/Icon-512.png
new file mode 100644
index 0000000..88cfd48
Binary files /dev/null and b/conreality_headset/example/web/icons/Icon-512.png differ
diff --git a/conreality_headset/example/web/manifest.json b/conreality_headset/example/web/manifest.json
new file mode 100644
index 0000000..8c01291
--- /dev/null
+++ b/conreality_headset/example/web/manifest.json
@@ -0,0 +1,23 @@
+{
+ "name": "example",
+ "short_name": "example",
+ "start_url": ".",
+ "display": "standalone",
+ "background_color": "#0175C2",
+ "theme_color": "#0175C2",
+ "description": "A new Flutter project.",
+ "orientation": "portrait-primary",
+ "prefer_related_applications": false,
+ "icons": [
+ {
+ "src": "icons/Icon-192.png",
+ "sizes": "192x192",
+ "type": "image/png"
+ },
+ {
+ "src": "icons/Icon-512.png",
+ "sizes": "512x512",
+ "type": "image/png"
+ }
+ ]
+}
diff --git a/conreality_headset/ios/Classes/SwiftConrealityHeadsetPlugin.swift b/conreality_headset/ios/Classes/SwiftConrealityHeadsetPlugin.swift
index b2710b0..ef532fb 100644
--- a/conreality_headset/ios/Classes/SwiftConrealityHeadsetPlugin.swift
+++ b/conreality_headset/ios/Classes/SwiftConrealityHeadsetPlugin.swift
@@ -2,15 +2,155 @@
import Flutter
import UIKit
+import AVFoundation
public class SwiftConrealityHeadsetPlugin: NSObject, FlutterPlugin {
- public static func register(with registrar: FlutterPluginRegistrar) {
- let channel = FlutterMethodChannel(name: "app.conreality.plugins.headset", binaryMessenger: registrar.messenger())
- let instance = SwiftConrealityHeadsetPlugin()
- registrar.addMethodCallDelegate(instance, channel: channel)
- }
+ public static var channel:FlutterMethodChannel?
+ public static var eventChannel:FlutterEventChannel?
+ public static var event: FlutterEventSink?
+ var headphonesConnected: Bool = false
+ var bluetoothHeadphonesConnected: Bool = false
+ var wiredHeadphonesConnected: Bool = false
+ var hasMicroPhone: Bool = false
+ var hasInbuiltMicroPhone: Bool = false
+ var hasHeadsetMicroPhone: Bool = false
+ public override init() {
+ super.init()
+ let sessionInstance = AVAudioSession.sharedInstance()
+ NotificationCenter.default.addObserver(self, selector: #selector(SwiftConrealityHeadsetPlugin.audioRouteChangeListener(_:)), name: AVAudioSession.routeChangeNotification, object: sessionInstance)
+ }
+ public static func register(with registrar: FlutterPluginRegistrar) {
+ channel = FlutterMethodChannel(name: "app.conreality.plugins.headset", binaryMessenger: registrar.messenger())
+ eventChannel = FlutterEventChannel(name: "app.conreality.plugins.headset/status", binaryMessenger: registrar.messenger())
+ let instance = SwiftConrealityHeadsetPlugin()
+ registrar.addMethodCallDelegate(instance, channel: channel!)
+ eventChannel?.setStreamHandler(HeadsetStreamHandler())
+
+ }
+
+ public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
+ print("method called: \(call.method)")
+ switch call.method {
+ case "isConnected":
+ let session = AVAudioSession.sharedInstance()
+ for output in session.currentRoute.outputs where output.portType == AVAudioSession.Port.headphones {
+ headphonesConnected = true
+ wiredHeadphonesConnected = true
+ print("headphone plugged in")
+
+ }
+ for output in session.currentRoute.outputs where output.portType == AVAudioSession.Port.bluetoothA2DP {
+ headphonesConnected = true
+ bluetoothHeadphonesConnected = true
+ print("bluetooth headphone plugged in")
+
+ }
+ for output in session.currentRoute.outputs where output.portType == AVAudioSession.Port.builtInMic {
+ hasMicroPhone = true
+ hasInbuiltMicroPhone = true
+ print("bluetooth headphone plugged in")
+
+ }
+ for output in session.currentRoute.outputs where output.portType == AVAudioSession.Port.headsetMic {
+ hasMicroPhone = true
+ hasHeadsetMicroPhone = true
+ print("bluetooth headphone plugged in")
+
+ }
+ result(headphonesConnected)
+ default:
+ result(nil)
+ }
+ }
+
+ @objc func audioRouteChangeListener(_ notification:Notification) {
+ print("called")
+ guard let userInfo = notification.userInfo,
+ let reasonValue = userInfo[AVAudioSessionRouteChangeReasonKey] as? UInt,
+ let reason:AVAudioSession.RouteChangeReason = AVAudioSession.RouteChangeReason(rawValue:reasonValue) else {
+ return
+ }
+ updateData(reason: reason, userInfo:userInfo )
+ }
+
+ func updateData(reason: AVAudioSession.RouteChangeReason, userInfo: [AnyHashable:Any]) {
+ switch reason {
+ case .newDeviceAvailable:
+ let session = AVAudioSession.sharedInstance()
+ for output in session.currentRoute.outputs where output.portType == AVAudioSession.Port.headphones {
+ headphonesConnected = true
+ wiredHeadphonesConnected = true
+ print("headphone plugged in")
+ break
+ }
+ for output in session.currentRoute.outputs where output.portType == AVAudioSession.Port.bluetoothA2DP {
+ headphonesConnected = true
+ bluetoothHeadphonesConnected = true
+ print("bluetooth headphone plugged in")
+ break
+ }
+ for output in session.currentRoute.outputs where output.portType == AVAudioSession.Port.builtInMic {
+ hasMicroPhone = true
+ hasInbuiltMicroPhone = true
+ print("bluetooth headphone plugged in")
+ break
+ }
+ for output in session.currentRoute.outputs where output.portType == AVAudioSession.Port.headsetMic {
+ hasMicroPhone = true
+ hasHeadsetMicroPhone = true
+ print("bluetooth headphone plugged in")
+ break
+ }
+ sendStatus()
+ case .oldDeviceUnavailable:
+ if let previousRoute =
+ userInfo[AVAudioSessionRouteChangePreviousRouteKey] as? AVAudioSessionRouteDescription {
+ for output in previousRoute.outputs where output.portType == AVAudioSession.Port.headphones {
+ headphonesConnected = false
+ wiredHeadphonesConnected = false
+ print("headphone pulled out")
+ break
+ }
+ for output in previousRoute.outputs where output.portType == AVAudioSession.Port.bluetoothA2DP {
+ headphonesConnected = false
+ bluetoothHeadphonesConnected = false
+ print("bluetooth headphone pulled out")
+ break
+ }
+ for output in previousRoute.outputs where output.portType == AVAudioSession.Port.builtInMic {
+ hasMicroPhone = false
+ hasInbuiltMicroPhone = false
+ print("bluetooth headphone pulled out")
+ break
+ }
+ for output in previousRoute.outputs where output.portType == AVAudioSession.Port.headsetMic {
+ hasMicroPhone = false
+ hasHeadsetMicroPhone = false
+ print("bluetooth headphone pulled out")
+ break
+ }
+ }
+ sendStatus()
+ default: ()
+ }
+ }
+
+ func sendStatus() {
+ let json:String = "{\"isConnected\":\(headphonesConnected),\"hasWiredHeadset\":\(wiredHeadphonesConnected),\"hasWirelessHeadset\":\(headphonesConnected),\"hasMicrophone\":\(hasMicroPhone),\"hasInbuiltMicroPhone\":\(hasInbuiltMicroPhone),\"hasHeadsetMicroPhone\":\(hasHeadsetMicroPhone)}"
+ print(json)
+ SwiftConrealityHeadsetPlugin.event!(json)
+ }
+}
+
- public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
- result("iOS " + UIDevice.current.systemVersion)
- }
+class HeadsetStreamHandler: NSObject, FlutterStreamHandler {
+ public func onListen(withArguments arguments: Any?, eventSink events: @escaping FlutterEventSink) -> FlutterError? {
+ SwiftConrealityHeadsetPlugin.event = events
+
+ return nil
+ }
+
+ public func onCancel(withArguments arguments: Any?) -> FlutterError? {
+ return nil
+ }
}
diff --git a/conreality_headset/lib/conreality_headset.dart b/conreality_headset/lib/conreality_headset.dart
index 7123a8c..112139f 100644
--- a/conreality_headset/lib/conreality_headset.dart
+++ b/conreality_headset/lib/conreality_headset.dart
@@ -18,5 +18,5 @@ abstract class ConrealityHeadset {
ConrealityHeadset._();
/// The current plugin version string.
- static String get version => '0.2.0';
+ static String get version => "0.2.0";
}
diff --git a/conreality_headset/lib/src/headset.dart b/conreality_headset/lib/src/headset.dart
index 2869999..fcc8337 100644
--- a/conreality_headset/lib/src/headset.dart
+++ b/conreality_headset/lib/src/headset.dart
@@ -1,13 +1,10 @@
/* This is free and unencumbered software released into the public domain. */
import 'dart:async' show Future, Stream;
+import 'dart:convert';
import 'package:flutter/services.dart' show EventChannel, MethodChannel;
-import 'headset_event.dart' show HeadsetEvent;
-import 'headset_status.dart' show HeadsetStatus;
-import 'headset_type.dart' show HeadsetType;
-
const MethodChannel _methodChannel =
MethodChannel('app.conreality.plugins.headset');
@@ -26,11 +23,6 @@ abstract class Headset {
static Future get canSpeak async =>
await _methodChannel.invokeMethod('canSpeak');
- /// Plays a PCM file to the headset.
- static Future playFile(final String filePath) {
- return _methodChannel.invokeMethod('playFile', filePath);
- }
-
/// Synthesizes speech from the contents of [message] for immediate playback.
static Future speak(final String message) {
return _methodChannel.invokeMethod('speak', message);
@@ -42,9 +34,51 @@ abstract class Headset {
}
/// Subscribes to headset device events.
- static Future> subscribe() async {
- return _eventChannel.receiveBroadcastStream().map((dynamic isConnected) =>
- HeadsetStatus(
- type: HeadsetType.unknown, isConnected: isConnected as bool));
+ static Future> subscribe() async {
+ return _eventChannel.receiveBroadcastStream().map(
+ (dynamic json) {
+ return HeadphoneStatus.fromJson(jsonDecode(json));
+ },
+ );
+ }
+}
+
+class HeadphoneStatus {
+ bool isConnected;
+ bool hasWiredHeadset;
+ bool hasWirelessHeadset;
+ bool hasMicrophone;
+ bool hasInbuiltMicroPhone;
+ bool hasHeadsetMicroPhone;
+
+ HeadphoneStatus({
+ this.isConnected,
+ this.hasWiredHeadset,
+ this.hasWirelessHeadset,
+ this.hasMicrophone,
+ this.hasInbuiltMicroPhone,
+ this.hasHeadsetMicroPhone,
+ });
+
+ static fromJson(Map json) {
+ return HeadphoneStatus(
+ isConnected: json["isConnected"],
+ hasWiredHeadset: json["hasWiredHeadset"],
+ hasWirelessHeadset: json["hasWirelessHeadset"],
+ hasMicrophone: json["hasMicrophone"],
+ hasInbuiltMicroPhone: json["hasInbuiltMicroPhone"],
+ hasHeadsetMicroPhone: json["hasHeadsetMicroPhone"],
+ );
+ }
+
+ Map toJson() {
+ return {
+ "isConnected": isConnected,
+ "hasWiredHeadset": hasWiredHeadset,
+ "hasWirelessHeadset": hasWirelessHeadset,
+ "hasMicrophone": hasMicrophone,
+ "hasInbuiltMicroPhone": hasInbuiltMicroPhone,
+ "hasHeadsetMicroPhone": hasHeadsetMicroPhone,
+ };
}
}
diff --git a/conreality_headset/pubspec.lock b/conreality_headset/pubspec.lock
index 9d99164..4a165f7 100644
--- a/conreality_headset/pubspec.lock
+++ b/conreality_headset/pubspec.lock
@@ -7,28 +7,49 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
- version: "2.2.0"
+ version: "2.5.0-nullsafety.1"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
- version: "1.0.4"
+ version: "2.1.0-nullsafety.1"
+ characters:
+ dependency: transitive
+ description:
+ name: characters
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "1.1.0-nullsafety.3"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
- version: "1.1.2"
+ version: "1.2.0-nullsafety.1"
+ clock:
+ dependency: transitive
+ description:
+ name: clock
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "1.1.0-nullsafety.1"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
- version: "1.14.11"
+ version: "1.15.0-nullsafety.3"
+ fake_async:
+ dependency: transitive
+ description:
+ name: fake_async
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "1.2.0-nullsafety.1"
flutter:
dependency: "direct main"
description: flutter
@@ -45,35 +66,21 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
- version: "0.12.5"
+ version: "0.12.10-nullsafety.1"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
- version: "1.1.6"
+ version: "1.3.0-nullsafety.3"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
- version: "1.6.2"
- pedantic:
- dependency: transitive
- description:
- name: pedantic
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.7.0"
- quiver:
- dependency: transitive
- description:
- name: quiver
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.0.3"
+ version: "1.8.0-nullsafety.1"
sky_engine:
dependency: transitive
description: flutter
@@ -85,56 +92,56 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
- version: "1.5.5"
+ version: "1.8.0-nullsafety.2"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
- version: "1.9.3"
+ version: "1.10.0-nullsafety.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
- version: "2.0.0"
+ version: "2.1.0-nullsafety.1"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
- version: "1.0.4"
+ version: "1.1.0-nullsafety.1"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
- version: "1.1.0"
+ version: "1.2.0-nullsafety.1"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
- version: "0.2.5"
+ version: "0.2.19-nullsafety.2"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
- version: "1.1.6"
+ version: "1.3.0-nullsafety.3"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
- version: "2.0.8"
+ version: "2.1.0-nullsafety.3"
sdks:
- dart: ">=2.4.0 <3.0.0"
+ dart: ">=2.10.0-110 <2.11.0"
flutter: ">=1.7.8 <2.0.0"