diff --git a/app/src/googlePlayFlavor/AndroidManifest.xml b/app/src/googlePlayFlavor/AndroidManifest.xml index 7a98c27..3c1360f 100644 --- a/app/src/googlePlayFlavor/AndroidManifest.xml +++ b/app/src/googlePlayFlavor/AndroidManifest.xml @@ -36,7 +36,6 @@ - diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 21ce1bf..952775b 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,195 +1,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/java/com/jens/automation2/ActivityDisplayLongMessage.java b/app/src/main/java/com/jens/automation2/ActivityDisplayLongMessage.java new file mode 100644 index 0000000..d895d0e --- /dev/null +++ b/app/src/main/java/com/jens/automation2/ActivityDisplayLongMessage.java @@ -0,0 +1,23 @@ +package com.jens.automation2; + +import android.app.Activity; +import android.os.Bundle; +import android.widget.TextView; + +import androidx.annotation.Nullable; + +public class ActivityDisplayLongMessage extends Activity +{ + TextView tvLongMessage; + + @Override + protected void onCreate(@Nullable Bundle savedInstanceState) + { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_display_long_message); + + tvLongMessage = (TextView)findViewById(R.id.tvLongMessage); + + tvLongMessage.setText(getIntent().getStringExtra("longMessage")); + } +} diff --git a/app/src/main/java/com/jens/automation2/AutomationService.java b/app/src/main/java/com/jens/automation2/AutomationService.java index 2852886..81222d3 100644 --- a/app/src/main/java/com/jens/automation2/AutomationService.java +++ b/app/src/main/java/com/jens/automation2/AutomationService.java @@ -154,7 +154,8 @@ public class AutomationService extends Service implements OnInitListener { Miscellaneous.logEvent("w", "AutoStart", "Service is started via boot. Settingsfile not available because storage is not mounted, yet. Waiting for 3 seconds.", 4); Thread.sleep(3000); - } catch (InterruptedException e) + } + catch (InterruptedException e) { e.printStackTrace(); } @@ -169,15 +170,13 @@ public class AutomationService extends Service implements OnInitListener } //if still no POIs... - if (//PointOfInterest.getPointOfInterestCollection() == null | PointOfInterest.getPointOfInterestCollection().size() == 0 - // && - Rule.getRuleCollection() == null | Rule.getRuleCollection().size() == 0 - ) + if (Rule.getRuleCollection() == null | Rule.getRuleCollection().size() == 0) { Miscellaneous.logEvent("w", "AutomationService", context.getResources().getString(R.string.serviceWontStart), 1); Toast.makeText(context, context.getResources().getString(R.string.serviceWontStart), Toast.LENGTH_LONG).show(); return false; - } else + } + else { return true; } @@ -318,6 +317,7 @@ public class AutomationService extends Service implements OnInitListener checkForTtsEngine(); checkForPermissions(); checkForRestrictedFeatures(); + checkForMissingBackgroundLocationPermission(); Actions.context = this; Actions.autoMationServerRef = this; @@ -390,6 +390,23 @@ public class AutomationService extends Service implements OnInitListener } } + protected void checkForMissingBackgroundLocationPermission() + { +// if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) +// { + if (BuildConfig.FLAVOR.equalsIgnoreCase("googlePlayFlavor")) + { + if (Rule.isAnyRuleUsing(Trigger_Enum.pointOfInterest)) + { + Intent intent = new Intent(AutomationService.this, ActivityDisplayLongMessage.class); + intent.putExtra("longMessage", getResources().getString(R.string.locationEngineDisabledLong)); + PendingIntent pi = PendingIntent.getActivity(AutomationService.this, 0, intent, 0); + Miscellaneous.createDismissableNotification(getResources().getString(R.string.locationEngineDisabledShort), notificationIdRestrictions, pi); + } + } +// } + } + public static void startAutomationService(Context context, boolean startAtBoot) { if(!(isMyServiceRunning(context))) diff --git a/app/src/main/res/layout/activity_display_long_message.xml b/app/src/main/res/layout/activity_display_long_message.xml new file mode 100644 index 0000000..e98e78f --- /dev/null +++ b/app/src/main/res/layout/activity_display_long_message.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 4ba27e0..2f38be0 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -595,4 +595,6 @@ Orte anlegen oder ändern veröffentlicht am Automation benutzt jetzt ein anderes Verzeichnis, um Ihre Daten zu speichern. Alle Ihre Automation-Dateien wurden hierhin verschoben: \"%s\". Die Berechtigung für den externen Speicher wird nun nicht mehr benötigt; Sie können Sie entfernen. In einer künftigen Version wird sie entfernt werden. + Die Position kann nicht mehr bestimmt werden. + Beginnend mit Android 10 wurde eine neue Berechtigung eingeführt, die benötigt wird, um als App die Position auch im Hintergrund bestimmen zu können, was, für eine App wie diese, natürlich notwendig ist.
Während ich das grundsätzlich für eine gute Idee halte, gilt das nicht für die Schikane, die damit verbunden ist.
Wenn man eine App entwickelt, kann man versuchen sich für diese Berechtigung zu qualifizieren, indem man einen Katalog von Bedingungen erfüllt. Leider wurden neue Versionen meiner Anwendung über einen Zeitraum von drei Monaten immer wieder abgelehnt.
Das lief auf die immer gleiche Art ab:
Ich habe eine neue Version eingereicht, die all diese Anforderungen erfüllt hat.
Googles miserabler Entwickler-Support behauptete ich würde sie nicht einhalten.
Ich habe Beweise geliefert, daß ich alles einhalte.
Ich bekam eine Antwort wie "Ich kann Ihnen nicht weiterhelfen.

Irgendwann habe ich aufgegeben.

Die Folge davon ist nun, daß die Google Play Version keine Positionsbestimmung mehr im Hintergrund durchführen kann. Die Alternative wäre es gewesen, daß die ganze Anwendung aus dem Store fliegt.

Das tut mir sehr leid, aber ich habe mein Bestes gegeben mit einem Kunden\"dienst\" zu diskutieren, der mehrfach beim Turing-Test durchgefallen ist.
Die gute Nachricht - die Anwendung kann es immer noch!
Automation ist nun Open Source Software und kann ab sofort bei F-Droid heruntergeladen werden. F-Droid ist ein freier Appstore, der Ihre Privatsphäre respektiert - statt nur so zu tun wie Google das macht.
Deinstallieren Sie dazu diese Anwendung und installieren Sie sich bei F-Droid neu. Klicken Sie hier, um mehr herauszufinden.]]>
\ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 78e0024..d2635a5 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -607,4 +607,6 @@ Announcements about this app only, we\'re probably talking about 1-2 per year, not more. Automation now uses another path to store your files. All your Automation-files have been moved here: \"%s\". The external storage permission is not required anymore; you can revoke it. It will be removed in a future version. Would you like to receive (only important) news about this app on the main screen? Those are downloaded from the developer\'s website. There will be no intrusive notification, just a text on the main screen when you open the app. + Location cannot be determined anymore. + Let me explain this further. Starting with Android 10 a new permission was introduced that is needed to determine your location in the background (which of course is required for an app like this). Whilst I consider that a good idea the chicanery it involves are not.
When developing an app you can try to qualify for this permission by abiding to a catalog of requirements. Unfortunately new versions of my app have been rejected over a period three months. I fulfilled all these requirements, Google\'s shitty development support claimed I would not. After giving them proof that I did after all - I got a response like \"I cannot help you anymore\". Eventually I gave up.
As a consequence the Google Play version can NOT use your location as a trigger anymore. The alternative would have been to have this application removed from the store entirely.
I\'m very sorry about that, but I've tried my best arguing with a \"support\" that repeatedly failed to pass the Turing test.
The good news - You can still have it all:
Automation is now open source and can be found in F-Droid. That is an app store that really cares about your privacy - rather than just acting like that. Simply uninstall this app and install it again from F-Droid. Click here to find out more.]]>
\ No newline at end of file