Skip to content

Commit fab7016

Browse files
authored
Merge pull request #674 from domoticz/beta-development
Beta development
2 parents b0139de + c6bdc0a commit fab7016

File tree

131 files changed

+864
-656
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+864
-656
lines changed

app/build.gradle

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 31
4+
compileSdkVersion 33
55

66
def versionPropsFile = file('version.properties')
77
if (versionPropsFile.canRead()) {
@@ -40,7 +40,7 @@ android {
4040
versionCode version_Code
4141
versionName "${versionMajor}.${versionMinor}.${versionPatch} (${versionBuild})"
4242
minSdkVersion 23
43-
targetSdkVersion 31
43+
targetSdkVersion 33
4444
multiDexEnabled true
4545
wearAppUnbundled true
4646
}
@@ -189,7 +189,8 @@ allprojects {
189189
dependencies {
190190
implementation fileTree(include: ['*.jar'], dir: 'libs')
191191

192-
implementation "androidx.work:work-runtime:2.8.0-alpha02"
192+
implementation 'androidx.core:core:1.9.0'
193+
implementation "androidx.work:work-runtime:2.8.0-rc01"
193194
implementation 'androidx.preference:preference:1.2.0'
194195
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
195196
implementation 'androidx.appcompat:appcompat:1.4.2'
@@ -203,7 +204,7 @@ dependencies {
203204
implementation 'com.google.android.libraries.car:car-app:1.0.0-beta.1'
204205
implementation 'org.reactivestreams:reactive-streams:1.0.3'
205206
implementation 'io.reactivex.rxjava2:rxjava:2.2.10'
206-
implementation 'com.revenuecat.purchases:purchases:5.0.0-rc3'
207+
implementation 'com.revenuecat.purchases:purchases:5.6.3'
207208

208209
implementation 'com.google.firebase:firebase-core:19.0.1'
209210
implementation 'com.google.firebase:firebase-iid:21.1.0'
@@ -256,7 +257,7 @@ dependencies {
256257

257258
implementation 'com.github.stfalcon:chatkit:0.3.3'
258259
implementation 'com.github.matthiasrobbers:shortbread:1.1.0'
259-
implementation 'androidx.core:core:1.6.0'
260+
260261
annotationProcessor 'com.github.matthiasrobbers:shortbread-compiler:1.1.0'
261262
implementation ('com.adevinta.android:leku:9.1.4') {
262263
exclude group: 'com.google.android.gms'

app/src/free/AndroidManifest.xml

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
5050
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
5151
<uses-permission android:name="com.android.vending.BILLING" />
52+
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
53+
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
5254

5355
<supports-screens
5456
android:anyDensity="true"
@@ -106,12 +108,21 @@
106108
android:requestLegacyExternalStorage="true"
107109
tools:replace="android:icon, android:label, android:theme, android:name, android:allowBackup">
108110

109-
<activity android:exported="true" android:name="nl.hnogames.domoticz.service.NFCServiceActivity">
111+
<activity android:exported="true"
112+
android:name="nl.hnogames.domoticz.NFCSettingsActivity"
113+
android:label="@string/category_nfc"
114+
android:parentActivityName="nl.hnogames.domoticz.SettingsActivity"
115+
android:resizeableActivity="true">
116+
</activity>
117+
118+
<activity android:exported="true"
119+
android:launchMode="singleTask"
120+
android:name="nl.hnogames.domoticz.service.NFCServiceActivity">
110121
<intent-filter>
111-
<action android:name="android.intent.action.VIEW" />
112-
<category android:name="android.intent.category.DEFAULT" />
113-
<category android:name="android.intent.category.BROWSABLE" />
114-
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
122+
<action android:name="android.nfc.action.TAG"/>
123+
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
124+
<action android:name="android.nfc.action.TECH"/>
125+
<category android:name="android.intent.category.DEFAULT"/>
115126
<data
116127
android:host="domoticz"
117128
android:scheme="app" />
@@ -336,22 +347,9 @@
336347
android:value="nl.hnogames.domoticz.GeoSettingsActivity" />
337348
</activity>
338349

339-
<activity android:exported="true"
340-
android:name="nl.hnogames.domoticz.NFCSettingsActivity"
341-
342-
android:label="@string/category_nfc"
343-
android:parentActivityName="nl.hnogames.domoticz.SettingsActivity"
344-
android:resizeableActivity="true">
345-
<intent-filter>
346-
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
347-
<category android:name="android.intent.category.DEFAULT" />
348-
</intent-filter>
349-
</activity>
350-
351350
<activity
352351
android:exported="true"
353352
android:name="nl.hnogames.domoticz.BluetoothSettingsActivity"
354-
355353
android:label="@string/category_bluetooth"
356354
android:parentActivityName="nl.hnogames.domoticz.SettingsActivity">
357355
<meta-data

app/src/main/AndroidManifest.xml

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -88,23 +88,6 @@
8888
</intent-filter>
8989
</service>
9090

91-
<activity
92-
android:exported="true"
93-
android:name="nl.hnogames.domoticz.service.NFCServiceActivity">
94-
<intent-filter>
95-
<action android:name="android.intent.action.VIEW" />
96-
<category android:name="android.intent.category.DEFAULT" />
97-
<category android:name="android.intent.category.BROWSABLE" />
98-
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
99-
<data
100-
android:host="domoticz"
101-
android:scheme="app" />
102-
</intent-filter>
103-
<meta-data
104-
android:name="android.nfc.action.TECH_DISCOVERED"
105-
android:resource="@xml/nfc_tech_list" />
106-
</activity>
107-
10891
<receiver
10992
android:name="nl.hnogames.domoticz.service.BluetoothConnectionReceiver"
11093
android:enabled="true"
@@ -182,7 +165,6 @@
182165

183166
<activity android:exported="true"
184167
android:name="nl.hnogames.domoticz.MainActivity"
185-
186168
android:label="@string/app_name_domoticz"
187169
android:launchMode="singleTop"
188170
android:resizeableActivity="true">
@@ -327,7 +309,6 @@
327309

328310
<activity android:exported="true"
329311
android:name="nl.hnogames.domoticz.GeoSettingsActivity"
330-
331312
android:label="@string/title_activity_server_settings"
332313
android:parentActivityName="nl.hnogames.domoticz.SettingsActivity"
333314
android:resizeableActivity="true">
@@ -338,19 +319,30 @@
338319

339320
<activity android:exported="true"
340321
android:name="nl.hnogames.domoticz.NFCSettingsActivity"
341-
342322
android:label="@string/category_nfc"
343323
android:parentActivityName="nl.hnogames.domoticz.SettingsActivity"
344324
android:resizeableActivity="true">
325+
</activity>
326+
327+
<activity android:exported="true"
328+
android:launchMode="singleTask"
329+
android:name="nl.hnogames.domoticz.service.NFCServiceActivity">
345330
<intent-filter>
346-
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
347-
<category android:name="android.intent.category.DEFAULT" />
331+
<action android:name="android.nfc.action.TAG"/>
332+
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
333+
<action android:name="android.nfc.action.TECH"/>
334+
<category android:name="android.intent.category.DEFAULT"/>
335+
<data
336+
android:host="domoticz"
337+
android:scheme="app" />
348338
</intent-filter>
339+
<meta-data
340+
android:name="android.nfc.action.TECH_DISCOVERED"
341+
android:resource="@xml/nfc_tech_list" />
349342
</activity>
350343

351344
<activity android:exported="true"
352345
android:name="nl.hnogames.domoticz.BluetoothSettingsActivity"
353-
354346
android:label="@string/category_bluetooth"
355347
android:parentActivityName="nl.hnogames.domoticz.SettingsActivity">
356348
<meta-data

app/src/main/java/nl/hnogames/domoticz/BeaconSettingsActivity.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
import androidx.annotation.NonNull;
4747
import androidx.appcompat.widget.Toolbar;
4848
import androidx.coordinatorlayout.widget.CoordinatorLayout;
49+
4950
import nl.hnogames.domoticz.adapters.BeaconAdapter;
5051
import nl.hnogames.domoticz.app.AppCompatPermissionsActivity;
5152
import nl.hnogames.domoticz.app.AppController;

app/src/main/java/nl/hnogames/domoticz/BluetoothSettingsActivity.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import com.fastaccess.permission.base.PermissionHelper;
3737
import com.ftinc.scoop.Scoop;
3838
import com.google.android.material.snackbar.Snackbar;
39+
import com.google.android.material.switchmaterial.SwitchMaterial;
3940
import com.nhaarman.listviewanimations.appearance.simple.SwingBottomInAnimationAdapter;
4041

4142
import java.util.ArrayList;
@@ -46,6 +47,7 @@
4647
import androidx.annotation.NonNull;
4748
import androidx.appcompat.widget.Toolbar;
4849
import androidx.coordinatorlayout.widget.CoordinatorLayout;
50+
4951
import nl.hnogames.domoticz.app.AppCompatPermissionsActivity;
5052
import nl.hnogames.domoticz.containers.BluetoothInfo;
5153
import nl.hnogames.domoticz.helpers.StaticHelper;
@@ -68,6 +70,7 @@ public class BluetoothSettingsActivity extends AppCompatPermissionsActivity impl
6870
private nl.hnogames.domoticz.adapters.BluetoothAdapter adapter;
6971
private PermissionHelper permissionHelper;
7072
private BluetoothAdapter mBluetoothAdapter;
73+
private SwitchMaterial switch_notifications_button;
7174
private Toolbar toolbar;
7275

7376
@Override
@@ -85,6 +88,7 @@ protected void onCreate(Bundle savedInstanceState) {
8588
toolbar = findViewById(R.id.toolbar);
8689
setSupportActionBar(toolbar);
8790
coordinatorLayout = findViewById(R.id.coordinatorLayout);
91+
8892
if (getSupportActionBar() != null)
8993
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
9094
this.setTitle(R.string.category_bluetooth);
@@ -93,6 +97,10 @@ protected void onCreate(Bundle savedInstanceState) {
9397
adapter = new nl.hnogames.domoticz.adapters.BluetoothAdapter(this, BluetoothList, this);
9498
mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
9599

100+
switch_notifications_button = findViewById(R.id.switch_notifications_button);
101+
switch_notifications_button.setChecked(mSharedPrefs.isBluetoothNotificationsEnabled());
102+
switch_notifications_button.setOnCheckedChangeListener((buttonView, isChecked) -> mSharedPrefs.setBluetoothNotificationsEnabled(isChecked));
103+
96104
createListView();
97105
}
98106

app/src/main/java/nl/hnogames/domoticz/CameraActivity.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import java.util.TimerTask;
3232

3333
import androidx.appcompat.widget.Toolbar;
34+
3435
import nl.hnogames.domoticz.app.AppCompatAssistActivity;
3536
import nl.hnogames.domoticz.fragments.Camera;
3637

app/src/main/java/nl/hnogames/domoticz/EventsActivity.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import com.ftinc.scoop.Scoop;
2727

2828
import androidx.appcompat.widget.Toolbar;
29+
2930
import nl.hnogames.domoticz.app.AppCompatPermissionsActivity;
3031
import nl.hnogames.domoticz.fragments.Events;
3132
import nl.hnogames.domoticz.utils.SharedPrefUtil;

app/src/main/java/nl/hnogames/domoticz/GeoSettingsActivity.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
import androidx.appcompat.app.AlertDialog;
5050
import androidx.appcompat.widget.Toolbar;
5151
import androidx.coordinatorlayout.widget.CoordinatorLayout;
52+
5253
import nl.hnogames.domoticz.adapters.LocationAdapter;
5354
import nl.hnogames.domoticz.app.AppCompatAssistActivity;
5455
import nl.hnogames.domoticz.containers.LocationInfo;

app/src/main/java/nl/hnogames/domoticz/GraphActivity.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import com.ftinc.scoop.Scoop;
2828

2929
import androidx.appcompat.widget.Toolbar;
30+
3031
import nl.hnogames.domoticz.app.AppCompatAssistActivity;
3132
import nl.hnogames.domoticz.fragments.Graph;
3233
import nl.hnogames.domoticz.utils.SharedPrefUtil;

app/src/main/java/nl/hnogames/domoticz/LogsActivity.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import com.ftinc.scoop.Scoop;
2727

2828
import androidx.appcompat.widget.Toolbar;
29+
2930
import nl.hnogames.domoticz.app.AppCompatPermissionsActivity;
3031
import nl.hnogames.domoticz.fragments.Logs;
3132
import nl.hnogames.domoticz.utils.SharedPrefUtil;

app/src/main/java/nl/hnogames/domoticz/MainActivity.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
import androidx.fragment.app.FragmentTransaction;
8484
import androidx.work.OneTimeWorkRequest;
8585
import androidx.work.WorkManager;
86+
8687
import hotchemi.android.rate.AppRate;
8788
import nl.hnogames.domoticz.app.AppCompatPermissionsActivity;
8889
import nl.hnogames.domoticz.app.AppController;
@@ -186,7 +187,7 @@ protected void onCreate(Bundle savedInstanceState) {
186187
.addTestDevice("1AAE9D81347967A359E372B0445549DE")
187188
.addTestDevice("440E239997F3D1DD8BC59D0ADC9B5DB5")
188189
.addTestDevice("D6A4EE627F1D3912332E0BFCA8EA2AD2")
189-
.addTestDevice("2C114D01992840EC6BF853D44CB96754")
190+
.addTestDevice("7ABE5FC9B0E902B7CF857CE3A57831AB")
190191
.build();
191192
((AdView) findViewById(R.id.adView)).loadAd(adRequest);
192193
} else
@@ -689,8 +690,8 @@ private void setScreenAlwaysOn() {
689690
}
690691

691692
@Override
692-
693693
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
694+
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
694695
permissionHelper.onRequestPermissionsResult(requestCode, permissions, grantResults);
695696
}
696697

@@ -768,13 +769,11 @@ private void applyLanguage() {
768769
}
769770

770771
private void setupMobileDevice() {
771-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
772+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
772773
if (!PermissionsUtil.canAccessDeviceState(this))
773774
permissionHelper.request(PermissionsUtil.INITIAL_DEVICE_PERMS);
774775
else
775776
GetFirebaseToken();
776-
} else {
777-
GetFirebaseToken();
778777
}
779778
}
780779

0 commit comments

Comments
 (0)