Compare commits
3 Commits
v1.6.21
...
d64f6e2c3b
Author | SHA1 | Date | |
---|---|---|---|
d64f6e2c3b | |||
8a5fa20cad | |||
5758e5ee2b |
@@ -11,8 +11,8 @@ android {
|
|||||||
compileSdkVersion 29
|
compileSdkVersion 29
|
||||||
buildToolsVersion '29.0.2'
|
buildToolsVersion '29.0.2'
|
||||||
useLibrary 'org.apache.http.legacy'
|
useLibrary 'org.apache.http.legacy'
|
||||||
versionCode 96
|
versionCode 97
|
||||||
versionName "1.6.21"
|
versionName "1.6.22"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
@@ -42,14 +42,14 @@ android {
|
|||||||
dimension "version"
|
dimension "version"
|
||||||
// applicationIdSuffix ".googlePlay"
|
// applicationIdSuffix ".googlePlay"
|
||||||
versionNameSuffix "-googlePlay"
|
versionNameSuffix "-googlePlay"
|
||||||
targetSdkVersion 29
|
targetSdkVersion 30
|
||||||
}
|
}
|
||||||
|
|
||||||
fdroidFlavor
|
fdroidFlavor
|
||||||
{
|
{
|
||||||
dimension "version"
|
dimension "version"
|
||||||
// applicationIdSuffix ".fdroid"
|
// applicationIdSuffix ".fdroid"
|
||||||
// versionNameSuffix "-fdroid"
|
versionNameSuffix "-fdroid"
|
||||||
targetSdkVersion 28
|
targetSdkVersion 28
|
||||||
}
|
}
|
||||||
|
|
||||||
|
18
app/googlePlayFlavor/release/output-metadata.json
Normal file
18
app/googlePlayFlavor/release/output-metadata.json
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"version": 2,
|
||||||
|
"artifactType": {
|
||||||
|
"type": "APK",
|
||||||
|
"kind": "Directory"
|
||||||
|
},
|
||||||
|
"applicationId": "com.jens.automation2",
|
||||||
|
"variantName": "processGooglePlayFlavorReleaseResources",
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"type": "SINGLE",
|
||||||
|
"filters": [],
|
||||||
|
"versionCode": 97,
|
||||||
|
"versionName": "1.6.22-googlePlay",
|
||||||
|
"outputFile": "app-googlePlayFlavor-release.apk"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@@ -33,6 +33,7 @@ public class ActivityPermissions extends Activity
|
|||||||
public static final int requestCodeForPermissions = 12042;
|
public static final int requestCodeForPermissions = 12042;
|
||||||
private static final int requestCodeForPermissionsWriteSettings = 12043;
|
private static final int requestCodeForPermissionsWriteSettings = 12043;
|
||||||
private static final int requestCodeForPermissionsNotificationPolicy = 12044;
|
private static final int requestCodeForPermissionsNotificationPolicy = 12044;
|
||||||
|
private static final int requestCodeForPermissionsBackgroundLocation = 12045;
|
||||||
protected String[] specificPermissionsToRequest = null;
|
protected String[] specificPermissionsToRequest = null;
|
||||||
|
|
||||||
public static String intentExtraName = "permissionsToBeRequested";
|
public static String intentExtraName = "permissionsToBeRequested";
|
||||||
@@ -768,6 +769,16 @@ public class ActivityPermissions extends Activity
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
|
||||||
|
{
|
||||||
|
if (requestCode == requestCodeForPermissionsBackgroundLocation)
|
||||||
|
{
|
||||||
|
NotificationManager mNotificationManager = (NotificationManager) ActivityPermissions.this.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||||
|
|
||||||
|
if (mNotificationManager.isNotificationPolicyAccessGranted())
|
||||||
|
requestPermissions(cachedPermissionsToRequest, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -827,6 +838,15 @@ public class ActivityPermissions extends Activity
|
|||||||
startActivityForResult(intent, requestCodeForPermissionsNotificationPolicy);
|
startActivityForResult(intent, requestCodeForPermissionsNotificationPolicy);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// else if (s.equalsIgnoreCase(permissionNameLocationBackground) && Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
|
||||||
|
// {
|
||||||
|
// requiredPermissions.remove(s);
|
||||||
|
// cachedPermissionsToRequest = requiredPermissions;
|
||||||
|
// Intent intent = new Intent(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
||||||
|
// intent.setData(Uri.parse("package:" + getPackageName()));
|
||||||
|
// startActivityForResult(intent, requestCodeForPermissionsBackgroundLocation);
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -10,10 +10,8 @@ import org.w3c.dom.Element;
|
|||||||
import org.w3c.dom.NamedNodeMap;
|
import org.w3c.dom.NamedNodeMap;
|
||||||
import org.w3c.dom.Node;
|
import org.w3c.dom.Node;
|
||||||
import org.w3c.dom.NodeList;
|
import org.w3c.dom.NodeList;
|
||||||
import org.xml.sax.SAXException;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.lang.reflect.Array;
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
@@ -72,7 +70,7 @@ public class News
|
|||||||
|
|
||||||
String filePath = context.getFilesDir() + "/appNews.xml";
|
String filePath = context.getFilesDir() + "/appNews.xml";
|
||||||
|
|
||||||
if (!(new File(filePath)).exists() || Settings.lastNewsPolltime == -1 || now.getTimeInMillis() >= Settings.lastNewsPolltime + (long)(Settings.pollNewsEveryXDays * 24 * 60 * 60 * 1000))
|
if (!(new File(filePath)).exists() || Settings.lastNewsPolltime == -1 || now.getTimeInMillis() >= Settings.lastNewsPolltime + (long)(Settings.newsDisplayForXDays * 24 * 60 * 60 * 1000))
|
||||||
{
|
{
|
||||||
String newsUrl = "https://server47.de/automation/appNews.php";
|
String newsUrl = "https://server47.de/automation/appNews.php";
|
||||||
newsContent = Miscellaneous.downloadURL(newsUrl, null, null);
|
newsContent = Miscellaneous.downloadURL(newsUrl, null, null);
|
||||||
@@ -245,7 +243,7 @@ public class News
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
Calendar limit = Calendar.getInstance();
|
Calendar limit = Calendar.getInstance();
|
||||||
limit.add(Calendar.DAY_OF_MONTH, -Settings.pollNewsEveryXDays);
|
limit.add(Calendar.DAY_OF_MONTH, -Settings.newsPollEveryXDays);
|
||||||
return downloadNews(contexts[0], limit);
|
return downloadNews(contexts[0], limit);
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
|
@@ -56,7 +56,7 @@ public class ReceiverCoordinator
|
|||||||
}
|
}
|
||||||
catch (ClassNotFoundException e)
|
catch (ClassNotFoundException e)
|
||||||
{
|
{
|
||||||
e.printStackTrace();
|
// e.printStackTrace();
|
||||||
|
|
||||||
allImplementers = new Class[] {
|
allImplementers = new Class[] {
|
||||||
AlarmListener.class,
|
AlarmListener.class,
|
||||||
|
@@ -12,7 +12,8 @@ public class Settings implements SharedPreferences
|
|||||||
{
|
{
|
||||||
public static final int rulesThatHaveBeenRanHistorySize = 10;
|
public static final int rulesThatHaveBeenRanHistorySize = 10;
|
||||||
public final static int lockSoundChangesInterval = 15;
|
public final static int lockSoundChangesInterval = 15;
|
||||||
public static final int pollNewsEveryXDays = 7;
|
public static final int newsPollEveryXDays = 3;
|
||||||
|
public static final int newsDisplayForXDays = 3;
|
||||||
public static final String folderName = "Automation";
|
public static final String folderName = "Automation";
|
||||||
|
|
||||||
public static long minimumDistanceChangeForGpsUpdate;
|
public static long minimumDistanceChangeForGpsUpdate;
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
Initial F-Droid version
|
|
@@ -1,38 +0,0 @@
|
|||||||
Create rules that are made of triggers and actions. A prominent example would be something like "Mute phone at work".
|
|
||||||
|
|
||||||
Here's a list of supported triggers and actions:
|
|
||||||
|
|
||||||
Supported triggers:
|
|
||||||
* Location
|
|
||||||
* Day/Time
|
|
||||||
* Charging state
|
|
||||||
* Battery level
|
|
||||||
* USB connection to computer established
|
|
||||||
* Your current speed
|
|
||||||
* Background noise (only until Android 7)
|
|
||||||
* Wifi connection
|
|
||||||
* Other applications running
|
|
||||||
* Airplane mode
|
|
||||||
* Roaming status
|
|
||||||
* NFC tags
|
|
||||||
* Bluetooth connection
|
|
||||||
* Headset connected
|
|
||||||
* Phone call running
|
|
||||||
|
|
||||||
Supported actions:
|
|
||||||
* Change wifi state
|
|
||||||
* Change bluetooth state
|
|
||||||
* Toggle USB tethering
|
|
||||||
* Toggle wifi tethering
|
|
||||||
* Toggle automatic screen rotation
|
|
||||||
* Make an HTTP request
|
|
||||||
* Change ringtone/sound setting
|
|
||||||
* Start another application
|
|
||||||
* Wait (in between other actions)
|
|
||||||
* Wakeup device's screen
|
|
||||||
* Toggle airplane mode
|
|
||||||
* Toggle mobile data connection
|
|
||||||
* Speak text
|
|
||||||
* Open music player
|
|
||||||
* Change screen brightness
|
|
||||||
* Send text message
|
|
Binary file not shown.
Before Width: | Height: | Size: 79 KiB |
Binary file not shown.
Before Width: | Height: | Size: 335 KiB |
Binary file not shown.
Before Width: | Height: | Size: 190 KiB |
Binary file not shown.
Before Width: | Height: | Size: 246 KiB |
Binary file not shown.
Before Width: | Height: | Size: 194 KiB |
@@ -1 +0,0 @@
|
|||||||
Automate stuff on your device by creating rules.
|
|
@@ -1 +0,0 @@
|
|||||||
Automation
|
|
Reference in New Issue
Block a user