startActivity package name fix
This commit is contained in:
@@ -1117,7 +1117,9 @@ public class Actions
|
|||||||
|
|
||||||
if (!packageName.equals(dummyPackageString))
|
if (!packageName.equals(dummyPackageString))
|
||||||
{
|
{
|
||||||
externalApplicationIntent.setPackage(packageName);
|
if(!packageName.isEmpty())
|
||||||
|
externalApplicationIntent.setPackage(packageName);
|
||||||
|
|
||||||
if (!StringUtils.isEmpty(className))
|
if (!StringUtils.isEmpty(className))
|
||||||
externalApplicationIntent.setClassName(packageName, className);
|
externalApplicationIntent.setClassName(packageName, className);
|
||||||
}
|
}
|
||||||
@@ -1138,8 +1140,8 @@ public class Actions
|
|||||||
{
|
{
|
||||||
if (Miscellaneous.isNumeric(startupType))
|
if (Miscellaneous.isNumeric(startupType))
|
||||||
externalApplicationIntent = packParametersIntoIntent(externalApplicationIntent, params, 4);
|
externalApplicationIntent = packParametersIntoIntent(externalApplicationIntent, params, 4);
|
||||||
else
|
// else
|
||||||
externalApplicationIntent = packParametersIntoIntent(externalApplicationIntent, params, 3);
|
// externalApplicationIntent = packParametersIntoIntent(externalApplicationIntent, params, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (startupType.equals(ActivityManageActionStartActivity.startByActivityString))
|
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);
|
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)));
|
intent.setData(Uri.parse(Miscellaneous.replaceVariablesInText(singleParam[2], context)));
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -128,9 +128,9 @@ public class ActivityMainScreen extends ActivityGeneric
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View v)
|
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);
|
startActivity(browserIntent);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -363,10 +363,10 @@ public class CellLocationChangedReceiver extends PhoneStateListener
|
|||||||
// Miscellaneous.logEvent("i", "cellReceiver", "Not starting cellLocationListener because we have no data connection.", 4);
|
// Miscellaneous.logEvent("i", "cellReceiver", "Not starting cellLocationListener because we have no data connection.", 4);
|
||||||
}
|
}
|
||||||
else
|
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
|
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)
|
catch(Exception ex)
|
||||||
|
|||||||
@@ -64,36 +64,36 @@ public class SensorActivity implements SensorEventListener
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onSensorChanged(SensorEvent event)
|
public void onSensorChanged(SensorEvent event)
|
||||||
{
|
{
|
||||||
// Device has been moved
|
// Device has been moved
|
||||||
|
|
||||||
float x = event.values[0];
|
float x = event.values[0];
|
||||||
float y = event.values[1];
|
float y = event.values[1];
|
||||||
float z = event.values[2];
|
float z = event.values[2];
|
||||||
|
|
||||||
if(mInitialized)
|
if(mInitialized)
|
||||||
{
|
{
|
||||||
deltaX = Math.abs(lastX-x);
|
deltaX = Math.abs(lastX-x);
|
||||||
deltaY = Math.abs(lastY-y);
|
deltaY = Math.abs(lastY-y);
|
||||||
deltaZ = Math.abs(lastZ-z);
|
deltaZ = Math.abs(lastZ-z);
|
||||||
//Wenn das jetzt einen gewissen Grenzwert übersteigt, müßten wir den CellListener wieder aktivieren
|
// If that exceeds a certain delta we need to start CellLocationListener again
|
||||||
if(deltaX > Settings.accelerometerMovementThreshold | deltaY > Settings.accelerometerMovementThreshold | deltaZ > Settings.accelerometerMovementThreshold)
|
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);
|
String text = "Device has been moved. " + String.valueOf(deltaX)+" / "+String.valueOf(deltaY)+" / "+String.valueOf(deltaZ);
|
||||||
Miscellaneous.logEvent("i", "Accelerometer", text, 5);
|
Miscellaneous.logEvent("i", "Accelerometer", text, 5);
|
||||||
CellLocationChangedReceiver.resetFollowUpdate();
|
CellLocationChangedReceiver.resetFollowUpdate();
|
||||||
CellLocationChangedReceiver.startCellLocationChangedReceiver();
|
CellLocationChangedReceiver.startCellLocationChangedReceiver();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lastX = x;
|
lastX = x;
|
||||||
lastY = y;
|
lastY = y;
|
||||||
lastZ = z;
|
lastZ = z;
|
||||||
mInitialized = true;
|
mInitialized = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static void startAccelerometerReceiver()
|
protected static void startAccelerometerReceiver()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -34,11 +34,11 @@ public class DeviceOrientationListener implements SensorEventListener, Automatio
|
|||||||
static int sensorValueCounter = 0;
|
static int sensorValueCounter = 0;
|
||||||
|
|
||||||
// Gravity rotational data
|
// Gravity rotational data
|
||||||
float gravity[];
|
float[] gravity;
|
||||||
// Magnetic rotational data
|
// Magnetic rotational data
|
||||||
float magnetic[]; //for magnetic rotational data
|
float[] magnetic; //for magnetic rotational data
|
||||||
float accels[] = new float[3];
|
float[] accels = new float[3];
|
||||||
float mags[] = new float[3];
|
float[] mags = new float[3];
|
||||||
float[] values = new float[3];
|
float[] values = new float[3];
|
||||||
boolean hasMagneticSensor=false;
|
boolean hasMagneticSensor=false;
|
||||||
|
|
||||||
|
|||||||
@@ -11,4 +11,5 @@
|
|||||||
* Fixed: Added waiting period for vibrations and separate thread for trying a sequence.
|
* Fixed: Added waiting period for vibrations and separate thread for trying a sequence.
|
||||||
* Fixed: Buttons in NFC screen weren't enabled.
|
* 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: 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
|
* Added Possibility to select UI theme, hence enabling modern UI designs
|
||||||
Reference in New Issue
Block a user