Add auto connection feature, if the BLE beacon is spotted, try to establish a connection.

This commit is contained in:
darken
2022-01-14 20:16:04 +01:00
parent 632cfdd84b
commit 3b4ccd8ed1
16 changed files with 208 additions and 51 deletions
@@ -0,0 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal"
android:autoMirrored="true">
<path
android:fillColor="@android:color/white"
android:pathData="M14.24,12.01l2.32,2.32c0.28,-0.72 0.44,-1.51 0.44,-2.33 0,-0.82 -0.16,-1.59 -0.43,-2.31l-2.33,2.32zM19.53,6.71l-1.26,1.26c0.63,1.21 0.98,2.57 0.98,4.02s-0.36,2.82 -0.98,4.02l1.2,1.2c0.97,-1.54 1.54,-3.36 1.54,-5.31 -0.01,-1.89 -0.55,-3.67 -1.48,-5.19zM15.71,7.71L10,2L9,2v7.59L4.41,5 3,6.41 8.59,12 3,17.59 4.41,19 9,14.41L9,22h1l5.71,-5.71 -4.3,-4.29 4.3,-4.29zM11,5.83l1.88,1.88L11,9.59L11,5.83zM12.88,16.29L11,18.17v-3.76l1.88,1.88z" />
</vector>
+11 -5
View File
@@ -61,7 +61,7 @@
<string name="pods_connection_state_hanging_up_label">Hanging up</string>
<string name="pods_unknown_raw_data_label">Raw data</string>
<string name="pods_unknown_label">Unknown device</string>
<string name="pods_unknown_contact_dev">This is an unknown device, but it is using Apple\'s message format. Let\'s add support for it, contact me :).</string>
<string name="pods_unknown_contact_dev">This is an unknown device, but it is using similar message format. Let\'s add support for it, contact me :).</string>
<string name="pods_none_label_short">No device</string>
<string name="pods_none_label">No paired device connected.</string>
<string name="pods_none_description">Connect a paired device or enable the \'Show all\' option.</string>
@@ -103,11 +103,11 @@
<string name="settings_scanner_mode_balanced_label">Balanced</string>
<string name="settings_scanner_mode_lowlatency_label">Low latency</string>
<string name="settings_autopause_label">Auto pause</string>
<string name="settings_autopause_description">Pause music when removing the device from your ear (if supported).</string>
<string name="settings_autopause_description">Pause music when removing the device from your ear.</string>
<string name="settings_showall_label">Show all devices</string>
<string name="settings_showall_description">Show other people\'s devices that are near you.</string>
<string name="settings_autopplay_label">Auto play</string>
<string name="settings_autoplay_description">Start music playback music when wearing the device (if supported).</string>
<string name="settings_autoplay_description">Start music playback music when wearing the device.</string>
<string name="settings_fake_data_label">Fake data</string>
<string name="settings_fake_data_description">Show fake data, i.e. simulate device that don\'t exist.</string>
<string name="settings_debug_label">Debug settings</string>
@@ -118,10 +118,16 @@
<string name="settings_signal_minimum_label">Minimum signal quality</string>
<string name="settings_signal_minimum_description">The minimum signal quality that a device needs to have to be considered yours.</string>
<string name="settings_autoconnect_label">Auto connect</string>
<string name="settings_autoconnect_description">Seeing the device and being connected is not the same. If Android does not automatically connect, we can ask it too.</string>
<string name="settings_autoconnect_description">If Android does not automatically connect, we can ask it too. This will set the monitor mode setting to \'Always\'.</string>
<string name="settings_autoconnect_condition_label">Auto connect condition</string>
<string name="settings_autoconnect_condition_description">When should we auto connect to your device?</string>
<string name="settings_autoconnect_condition_description">When should we try to connect to your device?</string>
<string name="settings_reaction_label">Reactions</string>
<string name="settings_reaction_description">React to events and behaviors.</string>
<string name="settings_category_yourdevice_label">Your device</string>
<string name="settings_maindevice_address_label">Main device</string>
<string name="settings_maindevice_address_description">The paired pod device to which this app should react.</string>
<string name="settings_maindevice_address_none">None</string>
<string name="settings_reaction_autoconnect_whenseen_label">When seen</string>
<string name="settings_reaction_autoconnect_caseopen_label">Case is open</string>
<string name="settings_reaction_autoconnect_inear_label">In ear</string>
</resources>
+6 -5
View File
@@ -29,11 +29,12 @@
android:title="@string/settings_signal_minimum_label"
app:pspMax="0.9"
app:pspMin="0.1" />
<ListPreference
android:icon="@drawable/ic_baseline_settings_bluetooth_24"
android:key="core.scanner.mode"
android:summary="@string/settings_scanner_mode_description"
android:title="@string/settings_scanner_mode_label" />
<Preference
android:icon="@drawable/ic_baseline_bluetooth_searching_24"
android:key="core.maindevice.address"
android:summary="@string/settings_maindevice_address_description"
android:title="@string/settings_maindevice_address_label" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/settings_category_other_label">