Compare commits
6 Commits
bbb477fc77
...
v1.8.4
| Author | SHA1 | Date | |
|---|---|---|---|
| fd90b14bdc | |||
| 91fdef99c3 | |||
| 63264fcf9b | |||
| 2758ef180d | |||
| 3d2b48706d | |||
| e52ce4cd30 |
@@ -11,8 +11,8 @@ android {
|
||||
compileSdkVersion 34
|
||||
buildToolsVersion '34.0.0'
|
||||
useLibrary 'org.apache.http.legacy'
|
||||
versionCode 144
|
||||
versionName "1.8.3"
|
||||
versionCode 145
|
||||
versionName "1.8.4"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
@@ -36,7 +36,7 @@ android {
|
||||
{
|
||||
dimension "version"
|
||||
versionNameSuffix "-googlePlay"
|
||||
targetSdkVersion 34
|
||||
targetSdkVersion 35
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -74,9 +74,7 @@
|
||||
<uses-permission android:name="android.permission.READ_CALL_LOG" />
|
||||
<uses-permission android:name="android.permission.READ_CALENDAR" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
||||
<uses-permission
|
||||
android:name="android.permission.WRITE_SECURE_SETTINGS"
|
||||
tools:ignore="ProtectedPermissions" />
|
||||
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" tools:ignore="ProtectedPermissions" />
|
||||
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"/>
|
||||
<!--android:maxSdkVersion="32" />
|
||||
<uses-permission android:name="android.permission.USE_EXACT_ALARM" />-->
|
||||
|
||||
@@ -72,9 +72,7 @@
|
||||
<uses-permission android:name="android.permission.READ_CALL_LOG" />
|
||||
<uses-permission android:name="android.permission.READ_CALENDAR" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
||||
<uses-permission
|
||||
android:name="android.permission.WRITE_SECURE_SETTINGS"
|
||||
tools:ignore="ProtectedPermissions" />
|
||||
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" tools:ignore="ProtectedPermissions" />
|
||||
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"/>
|
||||
<!--android:maxSdkVersion="32" />
|
||||
<uses-permission android:name="android.permission.USE_EXACT_ALARM" />-->
|
||||
|
||||
@@ -68,13 +68,11 @@
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
||||
<uses-permission android:name="android.hardware.sensor.proximity"/>
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
||||
<uses-permission
|
||||
android:name="android.permission.WRITE_SECURE_SETTINGS"
|
||||
tools:ignore="ProtectedPermissions" />
|
||||
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" tools:ignore="ProtectedPermissions" />
|
||||
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"/>
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
<!--android:maxSdkVersion="32" />
|
||||
<uses-permission android:name="android.permission.USE_EXACT_ALARM" />-->
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
<uses-permission android:name="com.termux.permission.RUN_COMMAND" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
|
||||
|
||||
|
||||
@@ -978,19 +978,19 @@ public class Actions
|
||||
{
|
||||
VibrationEffect ve = VibrationEffect.createOneShot(Long.parseLong(vibrateDuration), VibrationEffect.DEFAULT_AMPLITUDE);
|
||||
vibrator.vibrate(ve);
|
||||
|
||||
// For newer versions it seems we have to wait for the vibration to complete.
|
||||
try
|
||||
{
|
||||
Thread.sleep(Long.parseLong(vibrateDuration));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Miscellaneous.logEvent("e", "VibrateSleep", Log.getStackTraceString(e), 5);
|
||||
}
|
||||
}
|
||||
else
|
||||
vibrator.vibrate(Long.parseLong(vibrateDuration));
|
||||
|
||||
// Wait for the vibration to complete.
|
||||
try
|
||||
{
|
||||
Thread.sleep(Long.parseLong(vibrateDuration));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Miscellaneous.logEvent("e", "VibrateSleep", Log.getStackTraceString(e), 5);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1117,7 +1117,9 @@ public class Actions
|
||||
|
||||
if (!packageName.equals(dummyPackageString))
|
||||
{
|
||||
externalApplicationIntent.setPackage(packageName);
|
||||
if(!packageName.isEmpty())
|
||||
externalApplicationIntent.setPackage(packageName);
|
||||
|
||||
if (!StringUtils.isEmpty(className))
|
||||
externalApplicationIntent.setClassName(packageName, className);
|
||||
}
|
||||
@@ -1138,8 +1140,8 @@ public class Actions
|
||||
{
|
||||
if (Miscellaneous.isNumeric(startupType))
|
||||
externalApplicationIntent = packParametersIntoIntent(externalApplicationIntent, params, 4);
|
||||
else
|
||||
externalApplicationIntent = packParametersIntoIntent(externalApplicationIntent, params, 3);
|
||||
// else
|
||||
// externalApplicationIntent = packParametersIntoIntent(externalApplicationIntent, params, 3);
|
||||
}
|
||||
|
||||
if (startupType.equals(ActivityManageActionStartActivity.startByActivityString))
|
||||
@@ -1227,7 +1229,6 @@ public class Actions
|
||||
{
|
||||
Miscellaneous.logEvent("i", "StartOtherApp", "Adding parameter of type " + singleParam[0] + " with value " + singleParam[2] + " as standard data parameter.", 3);
|
||||
intent.setData(Uri.parse(Miscellaneous.replaceVariablesInText(singleParam[2], context)));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -128,9 +128,9 @@ public class ActivityMainScreen extends ActivityGeneric
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
String privacyPolicyUrl = "https://server47.de/donate";
|
||||
String donationUrl = "https://server47.de/donate";
|
||||
|
||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(privacyPolicyUrl));
|
||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(donationUrl));
|
||||
startActivity(browserIntent);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -2,10 +2,13 @@ package com.jens.automation2;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.Activity;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Looper;
|
||||
import android.os.VibrationEffect;
|
||||
import android.os.Vibrator;
|
||||
import android.view.View;
|
||||
@@ -22,6 +25,7 @@ public class ActivityManageActionVibrate extends Activity
|
||||
{
|
||||
TextView etVibratePattern;
|
||||
Button bTestVibratePattern, bSaveVibratePattern;
|
||||
ProgressDialog pdPleaseWait = null;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState)
|
||||
@@ -60,7 +64,20 @@ public class ActivityManageActionVibrate extends Activity
|
||||
if (ActivityPermissions.havePermission(Manifest.permission.VIBRATE, ActivityManageActionVibrate.this))
|
||||
{
|
||||
String pattern = etVibratePattern.getText().toString();
|
||||
Actions.vibrate(false, pattern);
|
||||
|
||||
String[] patternArray = pattern.split(",");
|
||||
long sum = 0;
|
||||
for(String element : patternArray)
|
||||
sum += Long.parseLong(element);
|
||||
|
||||
if(sum <= 2000)
|
||||
Actions.vibrate(false, pattern);
|
||||
else
|
||||
{
|
||||
pdPleaseWait = ProgressDialog.show(ActivityManageActionVibrate.this, null, getResources().getString(R.string.pleaseWait));
|
||||
VibrateTask vt = new VibrateTask();
|
||||
vt.execute(pattern);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -84,4 +101,22 @@ public class ActivityManageActionVibrate extends Activity
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
class VibrateTask extends AsyncTask<String, Void, Void>
|
||||
{
|
||||
@Override
|
||||
protected Void doInBackground(String... strings)
|
||||
{
|
||||
String pattern = (String)strings[0];
|
||||
Actions.vibrate(false, pattern);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(Void unused)
|
||||
{
|
||||
pdPleaseWait.dismiss();
|
||||
super.onPostExecute(unused);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -191,7 +191,7 @@ public class ActivityManageTriggerNfc extends Activity
|
||||
@Override
|
||||
protected void onPause()
|
||||
{
|
||||
/**
|
||||
/*
|
||||
* Call this before onPause, otherwise an IllegalArgumentException is thrown as well.
|
||||
*/
|
||||
disableForegroundDispatch(this);
|
||||
@@ -203,7 +203,7 @@ public class ActivityManageTriggerNfc extends Activity
|
||||
protected void onResume()
|
||||
{
|
||||
super.onResume();
|
||||
/**
|
||||
/*
|
||||
* It's important, that the activity is in the foreground (resumed). Otherwise
|
||||
* an IllegalStateException is thrown.
|
||||
*/
|
||||
@@ -237,10 +237,18 @@ public class ActivityManageTriggerNfc extends Activity
|
||||
if(currentStatus == 0)
|
||||
{
|
||||
generatedId = NfcReceiver.readTag(discoveredTag);
|
||||
if(generatedId != null && generatedId.length() > 0)
|
||||
tvCurrentNfcId.setText(generatedId);
|
||||
if(generatedId != null && generatedId.length() > 0)
|
||||
{
|
||||
tvCurrentNfcId.setText(generatedId);
|
||||
bReadNfcTag.setEnabled(true);
|
||||
bUseValueCurrentlyStored.setEnabled(true);
|
||||
}
|
||||
else
|
||||
tvCurrentNfcId.setText(getResources().getString(R.string.nfcTagDataNotUsable));
|
||||
{
|
||||
tvCurrentNfcId.setText(getResources().getString(R.string.nfcTagDataNotUsable));
|
||||
bReadNfcTag.setEnabled(false);
|
||||
bUseValueCurrentlyStored.setEnabled(false);
|
||||
}
|
||||
}
|
||||
else if(currentStatus == 1)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.jens.automation2;
|
||||
|
||||
import static android.app.PendingIntent.FLAG_IMMUTABLE;
|
||||
|
||||
import android.Manifest;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.ActivityManager;
|
||||
@@ -502,7 +504,12 @@ public class AutomationService extends Service implements OnInitListener
|
||||
if(Miscellaneous.googleToBlameForLocation(true))
|
||||
{
|
||||
Intent intent = new Intent(AutomationService.this, ActivityMainTabLayout.class);
|
||||
PendingIntent pi = PendingIntent.getActivity(AutomationService.this, 0, intent, 0);
|
||||
PendingIntent pi;
|
||||
|
||||
// if(Miscellaneous.getTargetSDK(AutomationService.this) >= Build.VERSION_CODES.S)
|
||||
pi = PendingIntent.getActivity(AutomationService.this, 0, intent, FLAG_IMMUTABLE);
|
||||
// else
|
||||
// pi = PendingIntent.getActivity(AutomationService.this, 0, intent, 0);
|
||||
|
||||
Miscellaneous.logEvent("w", "Features disabled", "Background location disabled because Google to blame.", 5);
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ public class Miscellaneous extends Service
|
||||
else if(method.equals(ActivityManageActionTriggerUrl.methodPost))
|
||||
connection.setRequestMethod("POST");
|
||||
|
||||
if(httpParams.size() > 0)
|
||||
if(httpParams.size() > 0)
|
||||
{
|
||||
connection.setRequestMethod("POST");
|
||||
connection.setDoInput(true);
|
||||
|
||||
@@ -544,56 +544,90 @@ public class Profile implements Comparable<Profile>
|
||||
AudioManager am = (AudioManager) Miscellaneous.getAnyContext().getSystemService(Context.AUDIO_SERVICE);
|
||||
|
||||
if(changeSoundMode)
|
||||
Actions.setSound(context, soundMode);
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Profile", "Setting sound mode to " + String.valueOf(soundMode), 4);
|
||||
Actions.setSound(context, soundMode);
|
||||
}
|
||||
|
||||
if(changeDndMode)
|
||||
Actions.setDoNotDisturb(context, dndMode);
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Profile", "Setting DND mode to " + String.valueOf(dndMode), 4);
|
||||
Actions.setDoNotDisturb(context, dndMode);
|
||||
}
|
||||
|
||||
if(changeVolumeMusicVideoGameMedia)
|
||||
am.setStreamVolume(AudioManager.STREAM_MUSIC, volumeMusic, AudioManager.FLAG_PLAY_SOUND);
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Profile", "Setting media volume to " + String.valueOf(volumeMusic), 4);
|
||||
am.setStreamVolume(AudioManager.STREAM_MUSIC, volumeMusic, AudioManager.FLAG_PLAY_SOUND);
|
||||
}
|
||||
|
||||
if(changeVolumeNotifications)
|
||||
am.setStreamVolume(AudioManager.STREAM_NOTIFICATION, volumeNotifications, AudioManager.FLAG_PLAY_SOUND);
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Profile", "Setting notification volume to " + String.valueOf(volumeNotifications), 4);
|
||||
am.setStreamVolume(AudioManager.STREAM_NOTIFICATION, volumeNotifications, AudioManager.FLAG_PLAY_SOUND);
|
||||
}
|
||||
|
||||
if(Build.VERSION.SDK_INT >= 34)
|
||||
{
|
||||
if (changeVolumeRingtones)
|
||||
am.setStreamVolume(AudioManager.STREAM_RING, volumeRingtones, AudioManager.FLAG_PLAY_SOUND);
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Profile", "Setting ring volume to " + String.valueOf(volumeRingtones), 4);
|
||||
am.setStreamVolume(AudioManager.STREAM_RING, volumeRingtones, AudioManager.FLAG_PLAY_SOUND);
|
||||
}
|
||||
}
|
||||
|
||||
if(changeVolumeAlarms)
|
||||
am.setStreamVolume(AudioManager.STREAM_ALARM, volumeAlarms, AudioManager.FLAG_PLAY_SOUND);
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Profile", "Setting alarm volume to " + String.valueOf(volumeAlarms), 4);
|
||||
am.setStreamVolume(AudioManager.STREAM_ALARM, volumeAlarms, AudioManager.FLAG_PLAY_SOUND);
|
||||
}
|
||||
|
||||
if(changeIncomingCallsRingtone)
|
||||
if(incomingCallsRingtone != null)
|
||||
applyRingTone(incomingCallsRingtone, RingtoneManager.TYPE_RINGTONE, context);
|
||||
|
||||
{
|
||||
if (incomingCallsRingtone != null)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Profile", "Setting ringtone " + incomingCallsRingtone, 4);
|
||||
applyRingTone(incomingCallsRingtone, RingtoneManager.TYPE_RINGTONE, context);
|
||||
}
|
||||
}
|
||||
|
||||
if(changeVibrateWhenRinging)
|
||||
{
|
||||
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Profile", "Setting vibrate when ringing to " + String.valueOf(vibrateWhenRinging?1:0), 4);
|
||||
android.provider.Settings.System.putInt(context.getContentResolver(), "vibrate_when_ringing", vibrateWhenRinging?1:0);
|
||||
}
|
||||
else
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Profile", "Setting vibrate when ringing to " + String.valueOf(vibrateWhenRinging), 4);
|
||||
|
||||
if (vibrateWhenRinging)
|
||||
am.setVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER, AudioManager.VIBRATE_SETTING_ON);
|
||||
am.setVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER, AudioManager.VIBRATE_SETTING_ON);
|
||||
else
|
||||
am.setVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER, AudioManager.VIBRATE_SETTING_OFF);
|
||||
}
|
||||
}
|
||||
|
||||
if(changeNotificationRingtone)
|
||||
if(notificationRingtone != null)
|
||||
applyRingTone(notificationRingtone, RingtoneManager.TYPE_NOTIFICATION, context);
|
||||
{
|
||||
if (notificationRingtone != null)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Profile", "Setting notification ringtone to " + String.valueOf(notificationRingtone), 4);
|
||||
applyRingTone(notificationRingtone, RingtoneManager.TYPE_NOTIFICATION, context);
|
||||
}
|
||||
}
|
||||
|
||||
if(changeScreenLockUnlockSound)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Profile", "Setting lockscreen sounds enabled to " + String.valueOf(screenLockUnlockSound ? 1 : 0), 4);
|
||||
android.provider.Settings.System.putInt(context.getContentResolver(), "lockscreen_sounds_enabled" , screenLockUnlockSound ? 1 : 0);
|
||||
}
|
||||
|
||||
if(changeAudibleSelection)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Profile", "Setting audible selection to " + String.valueOf(audibleSelection ? 1 : 0), 4);
|
||||
|
||||
if(audibleSelection)
|
||||
android.provider.Settings.System.putInt(context.getContentResolver(), android.provider.Settings.System.SOUND_EFFECTS_ENABLED, 1); // enable
|
||||
else
|
||||
@@ -602,7 +636,9 @@ public class Profile implements Comparable<Profile>
|
||||
|
||||
if(changeHapticFeedback)
|
||||
{
|
||||
if(hapticFeedback)
|
||||
Miscellaneous.logEvent("i", "Profile", "Setting haptic feedback to " + String.valueOf(hapticFeedback ? 1 : 0), 4);
|
||||
|
||||
if(hapticFeedback)
|
||||
android.provider.Settings.System.putInt(context.getContentResolver(), android.provider.Settings.System.HAPTIC_FEEDBACK_ENABLED, 1); // enable
|
||||
else
|
||||
android.provider.Settings.System.putInt(context.getContentResolver(), android.provider.Settings.System.HAPTIC_FEEDBACK_ENABLED, 0); // disable
|
||||
@@ -614,7 +650,8 @@ public class Profile implements Comparable<Profile>
|
||||
}
|
||||
finally
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Profile", "Checking for applicable rules after profile " + this.getName() + " has been activated.", 2);
|
||||
Miscellaneous.logEvent("i", "Profile", "Profile activation complete: " + this.getName(), 3);
|
||||
Miscellaneous.logEvent("i", "Profile", "Checking for applicable rules after profile " + this.getName() + " has been activated.", 3);
|
||||
List<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger.Trigger_Enum.profileActive);
|
||||
for(int i=0; i<ruleCandidates.size(); i++)
|
||||
{
|
||||
|
||||
@@ -1240,6 +1240,12 @@ public class Trigger
|
||||
|
||||
public boolean hasStateNotAppliedSinceLastRuleExecution()
|
||||
{
|
||||
/*
|
||||
There is no easy event to tell when a tag has been disconnected again.
|
||||
*/
|
||||
if(getTriggerType().equals(Trigger_Enum.nfcTag))
|
||||
return true;
|
||||
|
||||
if(getParentRule().getLastExecution() == null)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Trigger", "Trigger " + this.toString() + " of rule " + getParentRule().getName() + " has NOT applied since the parent rule\'s last activation.", 4);
|
||||
|
||||
@@ -363,10 +363,10 @@ public class CellLocationChangedReceiver extends PhoneStateListener
|
||||
// Miscellaneous.logEvent("i", "cellReceiver", "Not starting cellLocationListener because we have no data connection.", 4);
|
||||
}
|
||||
else
|
||||
Miscellaneous.logEvent("w", "cellReceiver", "Wanted to activate CellLocationChangedReceiver, but Wifi-Receiver says not to.", 4);
|
||||
Miscellaneous.logEvent("w", "cellReceiver", "Wanted to activate CellLocationChangedReceiver, but Wifi-Receiver says not to.", 5);
|
||||
}
|
||||
else
|
||||
Miscellaneous.logEvent("i", "cellReceiver", "Not starting cellLocationListener because Airplane mode is active or SIM_STATE is not ready.", 4);
|
||||
Miscellaneous.logEvent("i", "cellReceiver", "Not starting cellLocationListener because Airplane mode is active or SIM_STATE is not ready.", 5);
|
||||
}
|
||||
}
|
||||
catch(Exception ex)
|
||||
|
||||
@@ -64,36 +64,36 @@ public class SensorActivity implements SensorEventListener
|
||||
{
|
||||
}
|
||||
|
||||
public void onSensorChanged(SensorEvent event)
|
||||
{
|
||||
// Device has been moved
|
||||
public void onSensorChanged(SensorEvent event)
|
||||
{
|
||||
// Device has been moved
|
||||
|
||||
float x = event.values[0];
|
||||
float y = event.values[1];
|
||||
float z = event.values[2];
|
||||
float x = event.values[0];
|
||||
float y = event.values[1];
|
||||
float z = event.values[2];
|
||||
|
||||
if(mInitialized)
|
||||
{
|
||||
deltaX = Math.abs(lastX-x);
|
||||
deltaY = Math.abs(lastY-y);
|
||||
deltaZ = Math.abs(lastZ-z);
|
||||
//Wenn das jetzt einen gewissen Grenzwert übersteigt, müßten wir den CellListener wieder aktivieren
|
||||
if(deltaX > Settings.accelerometerMovementThreshold | deltaY > Settings.accelerometerMovementThreshold | deltaZ > Settings.accelerometerMovementThreshold)
|
||||
{
|
||||
String text = "Device has been moved. " + String.valueOf(deltaX)+" / "+String.valueOf(deltaY)+" / "+String.valueOf(deltaZ);
|
||||
Miscellaneous.logEvent("i", "Accelerometer", text, 5);
|
||||
CellLocationChangedReceiver.resetFollowUpdate();
|
||||
CellLocationChangedReceiver.startCellLocationChangedReceiver();
|
||||
if(mInitialized)
|
||||
{
|
||||
deltaX = Math.abs(lastX-x);
|
||||
deltaY = Math.abs(lastY-y);
|
||||
deltaZ = Math.abs(lastZ-z);
|
||||
// If that exceeds a certain delta we need to start CellLocationListener again
|
||||
if(deltaX > Settings.accelerometerMovementThreshold | deltaY > Settings.accelerometerMovementThreshold | deltaZ > Settings.accelerometerMovementThreshold)
|
||||
{
|
||||
String text = "Device has been moved. " + String.valueOf(deltaX)+" / "+String.valueOf(deltaY)+" / "+String.valueOf(deltaZ);
|
||||
Miscellaneous.logEvent("i", "Accelerometer", text, 5);
|
||||
CellLocationChangedReceiver.resetFollowUpdate();
|
||||
CellLocationChangedReceiver.startCellLocationChangedReceiver();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lastX = x;
|
||||
lastY = y;
|
||||
lastZ = z;
|
||||
mInitialized = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lastX = x;
|
||||
lastY = y;
|
||||
lastZ = z;
|
||||
mInitialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected static void startAccelerometerReceiver()
|
||||
{
|
||||
|
||||
@@ -34,11 +34,11 @@ public class DeviceOrientationListener implements SensorEventListener, Automatio
|
||||
static int sensorValueCounter = 0;
|
||||
|
||||
// Gravity rotational data
|
||||
float gravity[];
|
||||
float[] gravity;
|
||||
// Magnetic rotational data
|
||||
float magnetic[]; //for magnetic rotational data
|
||||
float accels[] = new float[3];
|
||||
float mags[] = new float[3];
|
||||
float[] magnetic; //for magnetic rotational data
|
||||
float[] accels = new float[3];
|
||||
float[] mags = new float[3];
|
||||
float[] values = new float[3];
|
||||
boolean hasMagneticSensor=false;
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ import android.nfc.NdefMessage;
|
||||
import android.nfc.NdefRecord;
|
||||
import android.nfc.NfcAdapter;
|
||||
import android.nfc.Tag;
|
||||
import android.nfc.tech.IsoDep;
|
||||
import android.nfc.tech.Ndef;
|
||||
import android.nfc.tech.NdefFormatable;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
@@ -56,9 +56,9 @@ public class NfcReceiver
|
||||
if(action == null)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "NFC", "action=null", 5);
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if(action.equals(NfcAdapter.ACTION_NDEF_DISCOVERED))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "NFC", "ACTION_NDEF_DISCOVERED", 4);
|
||||
@@ -275,7 +275,7 @@ public class NfcReceiver
|
||||
{
|
||||
format.connect();
|
||||
format.format(completeMessageToWrite);
|
||||
Miscellaneous.logEvent("i", "NFC", "Done writing tag.", 2);
|
||||
Miscellaneous.logEvent("i", "NFC", "Done writing tag.", 2);
|
||||
return true;
|
||||
}
|
||||
catch(IOException e)
|
||||
@@ -290,7 +290,7 @@ public class NfcReceiver
|
||||
Miscellaneous.logEvent("e", "NFC", "Error writing tag: " + Log.getStackTraceString(e), 2);
|
||||
}
|
||||
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean checkNfcRequirements(Context context, boolean showErrorMessage)
|
||||
|
||||
@@ -969,4 +969,5 @@
|
||||
<string name="close">close</string>
|
||||
<string name="far">far</string>
|
||||
<string name="proximityText">proximity is between \"%1$s\" and \"%2$s\"</string>
|
||||
<string name="pleaseWait">Please wait.</string>
|
||||
</resources>
|
||||
15
fastlane/metadata/android/de-DE/changelogs/145.txt
Normal file
15
fastlane/metadata/android/de-DE/changelogs/145.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
* Fixed: Crash in Play Store version when starting the service
|
||||
* Fixed: trigger url result was not stored correctly in a variable
|
||||
* Fixed: In case of HTTP errors during trigger url actions, the return value in the variable was not set according to documentation.
|
||||
* Fixed: Crash when clicking +/- when creating/editing TimeFrame trigger
|
||||
* Fixed: Permission BLUETOOTH_CONNECT requested for Bluetooth trigger editor in Google Play version
|
||||
* Fixed: Airplane mode trigger didn't work if no locations where defined.
|
||||
* Fixed: Vibrate action didn't work on some devices
|
||||
* Fixed: Variable trigger didn't always compare correctly.
|
||||
* Fixed: Permission check for ability to schedule exact timers
|
||||
* Fixed: Crash in Google Play version
|
||||
* Fixed: Added waiting period for vibrations and separate thread for trying a sequence.
|
||||
* Fixed: Buttons in NFC screen weren't enabled.
|
||||
* Fixed: NFC tag triggers didn't cause a second execution if a tag was removed and presented again.
|
||||
* Fixed: Package name in startActivity action was incorrectly set to an empty String instead of leaving it as null. That sometimes caused startActivity to have no effect.
|
||||
* Added Possibility to select UI theme, hence enabling modern UI designs
|
||||
@@ -7,4 +7,9 @@
|
||||
* Fixed: Vibrate action didn't work on some devices
|
||||
* Fixed: Variable trigger didn't always compare correctly.
|
||||
* Fixed: Permission check for ability to schedule exact timers
|
||||
* Fixed: Crash in Google Play version
|
||||
* Fixed: Added waiting period for vibrations and separate thread for trying a sequence.
|
||||
* Fixed: Buttons in NFC screen weren't enabled.
|
||||
* Fixed: NFC tag triggers didn't cause a second execution if a tag was removed and presented again.
|
||||
* Fixed: Package name in startActivity action was incorrectly set to an empty String instead of leaving it as null. That sometimes caused startActivity to have no effect.
|
||||
* Added Possibility to select UI theme, hence enabling modern UI designs
|
||||
15
fastlane/metadata/android/es-ES/changelogs/145.txt
Normal file
15
fastlane/metadata/android/es-ES/changelogs/145.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
* Corregido: Fallo en la versión de Play Store al iniciar el servicio
|
||||
* Corregido: el resultado de la URL de disparo no se almacenó correctamente en una variable
|
||||
* Corregido: En caso de errores HTTP durante las acciones de la URL de disparo, el valor de retorno en la variable no se estableció según la documentación.
|
||||
* Corregido: Se cierra al hacer clic +/- al crear/editar el disparador TimeFrame
|
||||
* Corregido: Se solicita permiso BLUETOOTH_CONNECT para el editor de disparos Bluetooth en la versión de Google Play
|
||||
* Corregido: El disparador en modo avión no funcionaba si no se definían ubicaciones.
|
||||
* Corregido: La acción vibratoria no funcionó en algunos dispositivos
|
||||
* Corregido: El disparador variable no siempre se comparaba correctamente.
|
||||
* Corregido: Comprobación de permisos para la capacidad de programar temporizadores exactos
|
||||
* Corregido: Bloqueo en la versión de Google Play
|
||||
* Corregido: Se añadió el periodo de espera para vibraciones y un hilo separado para probar una secuencia.
|
||||
* Corregido: Los botones en la pantalla NFC no estaban activados.
|
||||
* Corregido: Los disparadores de etiquetas NFC no provocaban una segunda ejecución si una etiqueta se eliminaba y se mostraba de nuevo.
|
||||
* Corregido: El nombre del paquete en la acción startActivity se estableció incorrectamente como una cadena vacía en lugar de dejarla como nula. Eso a veces hacía que startActivity no tuviera ningún efecto.
|
||||
* Se añadió la posibilidad de seleccionar el tema de la interfaz, permitiendo así diseños modernos de interfazes
|
||||
15
fastlane/metadata/android/fr-FR/changelogs/145.txt
Normal file
15
fastlane/metadata/android/fr-FR/changelogs/145.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
* Corrigé : plantage dans la version Play Store lors du lancement du service
|
||||
* Corrigé : le résultat de l'URL de déclenchement n'a pas été correctement stocké dans une variable
|
||||
* Corrigé : En cas d'erreurs HTTP lors des actions d'URL de déclenchement, la valeur de retour dans la variable n'a pas été définie selon la documentation.
|
||||
* Corrigé : Plantage lors du clic +/- lors de la création/modification du déclencheur TimeFrame
|
||||
* Corrigé : Permission BLUETOOTH_CONNECT demandée pour l'éditeur de déclencheurs Bluetooth dans la version Google Play
|
||||
* Corrigé : Le déclencheur en mode avion ne fonctionnait pas si aucun emplacement n'était défini.
|
||||
* Corrigé : L'action vibrante ne fonctionnait pas sur certains appareils
|
||||
* Corrigé : Le déclencheur variable ne correspondait pas toujours correctement.
|
||||
* Corrigé : Vérification des permissions pour la possibilité de programmer des minuteurs exacts
|
||||
* Corrigé : plantage dans la version Google Play
|
||||
* Corrigé : Délai d'attente ajouté pour les vibrations et fil séparé pour essayer une séquence.
|
||||
* Corrigé : Les boutons de l'écran NFC n'étaient pas activés.
|
||||
* Corrigé : Les déclencheurs de balises NFC ne provoquaient pas une seconde exécution si une balise était retirée et présentée à nouveau.
|
||||
* Corrigé : Le nom du paquet dans l'action startActivity a été incorrectement défini sur une chaîne vide au lieu de la laisser nulle. Cela empêchait parfois startActivity d'avoir aucun effet.
|
||||
* Possibilité supplémentaire de sélectionner le thème de l'interface utilisateur, permettant ainsi des conceptions modernes d'interfaces utilisateur
|
||||
15
fastlane/metadata/android/it-IT/changelogs/145.txt
Normal file
15
fastlane/metadata/android/it-IT/changelogs/145.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
* Corretto: crash nella versione Play Store all'avvio del servizio
|
||||
* Corretto: il risultato dell'URL di trigger non è stato memorizzato correttamente in una variabile
|
||||
* Corretto: In caso di errori HTTP durante le azioni dell'URL di trigger, il valore di ritorno nella variabile non è stato impostato secondo la documentazione.
|
||||
* Corretto: crash quando clicca +/- quando si crea/modifica il trigger TimeFrame
|
||||
* Corretto: Richiesta BLUETOOTH_CONNECT permesso per l'editor di trigger Bluetooth nella versione di Google Play
|
||||
* Corretto: il trigger della modalità aereo non funzionava se non erano definite le località.
|
||||
* Corretto: l'azione vibratoria non funzionava su alcuni dispositivi
|
||||
* Corretto: Il grilletto variabile non sempre si confrontava correttamente.
|
||||
* Corretto: Controllo dei permessi per la possibilità di programmare timer esatti
|
||||
* Corretto: crash nella versione Google Play
|
||||
* Corretto: Periodo di attesa aggiunto per le vibrazioni e thread separato per provare una sequenza.
|
||||
* Corretto: I pulsanti nello schermo NFC non erano attivati.
|
||||
* Corretto: i trigger dei tag NFC non causavano una seconda esecuzione se un tag veniva rimosso e presentato di nuovo.
|
||||
* Correto: Il nome del pacchetto nell'azione startActivity era impostato erroneamente come una stringa vuota invece di lasciarla come null. Questo a volte causava che startActivity non avesse alcun effetto.
|
||||
* Aggiunta la possibilità di selezionare il tema UI, permettendo così design moderni di UI
|
||||
15
fastlane/metadata/android/nl-NL/changelogs/145.txt
Normal file
15
fastlane/metadata/android/nl-NL/changelogs/145.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
* Opgelost: Crash in Play Store-versie bij het starten van de dienst
|
||||
* Opgelost: trigger-urlresultaat werd niet correct opgeslagen in een variabele
|
||||
* Opgelost: In geval van HTTP-fouten tijdens trigger-url-acties werd de returnwaarde in de variabele niet ingesteld volgens de documentatie.
|
||||
* Opgelost: Crash bij het klikken op +/- bij het maken/bewerken van de TimeFrame-trigger
|
||||
* Opgelost: Toestemming BLUETOOTH_CONNECT gevraagd voor Bluetooth trigger-editor in de Google Play-versie
|
||||
* Opgelost: De vliegtuigmodus-trigger werkte niet als er geen locaties werden gedefinieerd.
|
||||
* Vast: Vibratieactie werkte niet op sommige apparaten
|
||||
* Opgelost: Variabele trigger vergeleken niet altijd correct.
|
||||
* Opgelost: Toestemmingscontrole voor de mogelijkheid om exacte timers te plannen
|
||||
* Opgelost: Crash in de Google Play-versie
|
||||
* Opgelost: Wachttijd toegevoegd voor trillingen en aparte draad voor het proberen van een sequentie.
|
||||
* Opgelost: Knoppen in het NFC-scherm waren niet ingeschakeld.
|
||||
* Opgelost: NFC-tag-triggers veroorzaakten geen tweede uitvoering als een tag werd verwijderd en opnieuw werd weergegeven.
|
||||
* Opgelost: Pakketnaam in de startActivity-actie werd verkeerd ingesteld op een lege string in plaats van deze als null te laten. Dat zorgde er soms voor dat startActivity geen effect had.
|
||||
* Mogelijkheid toegevoegd om UI-thema te selecteren, waardoor moderne UI-ontwerpen mogelijk zijn
|
||||
15
fastlane/metadata/android/pl-PL/changelogs/145.txt
Normal file
15
fastlane/metadata/android/pl-PL/changelogs/145.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
* Naprawiono: Awaria w wersji ze sklepu Play podczas uruchamiania usługi
|
||||
* Naprawione: wynik URL wyzwalacza nie został poprawnie zapisany w zmiennej
|
||||
* Naprawione: W przypadku błędów HTTP podczas akcji trigger url, wartość zwrotu w zmiennej nie była ustalana zgodnie z dokumentacją.
|
||||
* Naprawione: Crash po kliknięciu +/- podczas tworzenia/edytowania wyzwalacza TimeFrame
|
||||
* Naprawiono: Wymagano BLUETOOTH_CONNECT zgody na edytor wyzwalaczy Bluetooth w wersji Google Play
|
||||
* Naprawione: Wyzwalacz trybu samolotowego nie działał, jeśli nie były zdefiniowane żadne lokalizacje.
|
||||
* Naprawione: Wibracja nie działała na niektórych urządzeniach
|
||||
* Naprawione: Zmienny spust nie zawsze się poprawnie porównywał.
|
||||
* Naprawione: Sprawdzenie zgody na możliwość dokładnego harmonogramowania timerów
|
||||
* Naprawiono: Awaria w wersji Google Play
|
||||
* Naprawione: Dodano okres oczekiwania na wibracje i osobny wątek do próby sekwencji.
|
||||
* Naprawione: Przyciski na ekranie NFC nie były włączone.
|
||||
* Naprawiono: wyzwalacze tagów NFC nie powodowały drugiego uruchomienia, jeśli tag został usunięty i ponownie wyświetlony.
|
||||
* Naprawione: Nazwa pakietu w akcji startActivity została błędnie ustawiona na pusty ciąg znaków zamiast pozostawić go jako null. Czasami powodowało to, że startActivity nie miało żadnego wpływu.
|
||||
* Dodana możliwość wyboru motywu UI, co umożliwia nowoczesne projekty UI
|
||||
15
fastlane/metadata/android/ru-RU/changelogs/145.txt
Normal file
15
fastlane/metadata/android/ru-RU/changelogs/145.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
* Исправлено: вылеты в версии Play Store при запуске сервиса
|
||||
* Исправлено: результат URL-триггера был некорректно сохранён в переменной
|
||||
* Исправлено: в случае ошибок HTTP во время действий триггера URL возвратное значение в переменной не было установлено согласно документации.
|
||||
* Исправлено: вылеты при нажатии +/- при создании/редактировании триггера TimeFrame
|
||||
* Исправлено: запро BLUETOOTH_CONNECT шено разрешение на редактор триггеров Bluetooth в версии Google Play
|
||||
* Исправлено: триггер режима самолёта не работал, если локации не были определены.
|
||||
* Исправлено: вибрация не работала на некоторых устройствах
|
||||
* Исправлено: Переменный триггер не всегда совпадал правильно.
|
||||
* Исправлено: проверка разрешения на возможность распланировать точные таймеры
|
||||
* Исправлено: сбой в версии Google Play
|
||||
* Исправлено: добавлен период ожидания вибраций и отдельная резьба для пробы последовательности.
|
||||
* Исправлено: кнопки на экране NFC не были включены.
|
||||
* Исправлено: триггеры NFC-тегов не вызывали второе выполнение при удалении и повторном представлении тега.
|
||||
* Исправлено: имя пакета в действии startActivity было неправильно установлено на пустую строку вместо того, чтобы оставить её как null. Иногда это не приводило к тому, что startActivity не действовала.
|
||||
* Добавлена возможность выбора темы интерфейса, что позволило создать современные дизайны интерфейса
|
||||
15
fastlane/metadata/android/zh-CN/changelogs/145.txt
Normal file
15
fastlane/metadata/android/zh-CN/changelogs/145.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
* 已修复:启动服务时 Play 商店版本崩溃
|
||||
* 已修复:触发URL结果未正确存储在变量中
|
||||
* 已修复:在触发 URL作中出现 HTTP 错误时,文档中未设置变量的返回值。
|
||||
* 已修复:创建/编辑时间框架触发器时点击 +/- 时会崩溃
|
||||
* 已修复:BLUETOOTH_CONNECT请求在 Google Play 版本中使用蓝牙触发编辑器的权限
|
||||
* 已修复:如果没有指定位置,飞行模式触发器无法使用。
|
||||
* 已修复:振动动作在某些设备上无法使用
|
||||
* 修正:可变触发器并不总是能正确比较。
|
||||
* 已修复:权限检查以确定准确定时器
|
||||
* 已修复:Google Play版本崩溃
|
||||
* 修正:增加了振动等待时间,并有单独的线程用于尝试序列。
|
||||
* 已修复:NFC屏幕中的按钮未被启用。
|
||||
* 修正:如果标签被移除并再次呈现,NFC标签触发不会导致第二次执行。
|
||||
* 已修复:startActivity 动作中的包名错误地设置为空字符串,而不是保持空。这有时会导致startActivity没有效果。
|
||||
* 增加了选择UI主题的功能,从而实现了现代UI设计
|
||||
Reference in New Issue
Block a user