diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..fbdee04
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,23 @@
+language: android
+jdk: oraclejdk8
+
+notifications:
+ email: false
+
+android:
+ components:
+ - tools
+ - build-tools-27.0.3
+ - android-28
+ - extra-android-support
+ - extra-android-m2repository
+ licenses:
+ - 'android-sdk-preview-license-.+'
+ - 'android-sdk-license-.+'
+ - 'google-gdk-license-.+'
+
+before_install:
+ - chmod +x gradlew
+ - yes | sdkmanager "platforms;android-28"
+
+script: ./gradlew clean assemble test
\ No newline at end of file
diff --git a/Gemfile b/Gemfile
new file mode 100644
index 0000000..adc90d9
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,3 @@
+source "https://rubygems.org"
+
+gem "fastlane"
\ No newline at end of file
diff --git a/README.md b/README.md
index bda4d90..b00b4c1 100755
--- a/README.md
+++ b/README.md
@@ -1,9 +1,15 @@
-
+
# Wakelock - Power Manager
+[](https://travis-ci.org/d4rken/wakelock-revamp)
+
Wake Lock gives you control over the Android Power- and WifiManager.
For example, you can force the PowerManager to keep the screen on or have the CPU still running in standby mode or make sure the Wifi connection keeps running at full performance.
+## Contributions
+* Are you multilingual? [Translate this app](https://crowdin.com/project/wakelock) to make it more accessible.
+* If you can code, maybe submit a PR fixing an [open issue](https://github.com/d4rken/wakelock-revamp/issues).
+
## Download
[Google Play](https://play.google.com/store/apps/details?id=eu.thedarken.wldonate)
diff --git a/app/build.gradle b/app/build.gradle
index cf32d5b..5b3c9b0 100755
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -14,9 +14,6 @@ bugsnag {
android {
def packageName = "eu.thedarken.wldonate"
- signingConfigs {
- release {}
- }
def signingPropFile = new File(System.properties['user.home'], ".appconfig/${packageName}/signing.properties")
if (signingPropFile.canRead()) {
Properties signingProps = new Properties()
@@ -61,7 +58,7 @@ android {
}
release {
- signingConfig signingConfigs.release
+ if (signingConfigs.hasProperty('release')) signingConfig signingConfigs.release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
manifestPlaceholders = [apikey_bugsnag: bugsnagProps.getProperty("bugsnag.apikey", "")]
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 366be13..9066a80 100755
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1,17 +1,15 @@
WakeLock v3
Settings
- Help
- Welcome
Start
Screen and Keyboard
- Keeps the display and keyboard at full brightness. If you press the power button, the lock will be implicitly released by the system.
+ Keep the display and keyboard at full brightness. If you press the power button, the lock will be implicitly released by the system.
Processor
- Keeps the CPU from going into a standby/low-power mode, even if the power button is pressed or the display times out. If your device has trouble waking up, this is the lock you want.
+ Keep the CPU from going into a standby/low-power mode, even if the power button is pressed or the display times out. If your device has trouble waking up, this is the lock you want.
Screen dimmed
- Keeps the screen on, but allow it to dim. If you press the power button, the lock will be implicitly released by the system.
+ Keep the screen on, but allow it to dim. If you press the power button, the lock will be implicitly released by the system.
Screen bright
- Keeps the screen at full brightness. If you press the power button, the lock will be implicitly released by the system.
+ Keep the screen at full brightness. If you press the power button, the lock will be implicitly released by the system.
Wi-Fi normal
Wi-Fi will stay active and behave normally, performance and loss will depend on other factors, e.g. whether the screen is off.
Wi-Fi high performance
diff --git a/build.gradle b/build.gradle
index df8a1ab..ae6b60e 100755
--- a/build.gradle
+++ b/build.gradle
@@ -33,7 +33,7 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.1.3'
+ classpath 'com.android.tools.build:gradle:3.1.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlin"
classpath 'com.bugsnag:bugsnag-android-gradle-plugin:3.2.5'
}
diff --git a/crowdin.sh b/crowdin.sh
new file mode 100644
index 0000000..c51d979
--- /dev/null
+++ b/crowdin.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+export CROWDIN_API_KEY=`cat ~/.appconfig/eu.thedarken.wldonate/crowdin.key`
+alias crowdin-cli='java -jar /usr/local/bin/crowdin-cli.jar'
+crowdin-cli "$@"
\ No newline at end of file
diff --git a/crowdin.yaml b/crowdin.yaml
new file mode 100644
index 0000000..af5e277
--- /dev/null
+++ b/crowdin.yaml
@@ -0,0 +1,183 @@
+"api_key_env": "CROWDIN_API_KEY"
+"project_identifier" : "wakelock"
+"preserve_hierarchy": true
+
+"files" : [
+ {
+ "source" : "/app/src/main/res/values/strings.xml",
+ "dest" : "/strings.xml",
+ "translation" : "/app/src/main/res/values-%android_code%/%original_file_name%",
+# "update_option" : "update_without_changes",
+ "languages_mapping" : &stringmapping {
+ "android_code" : {
+ "ar" : "ar",
+ "am" : "am",
+ "hy-AM" : "hy-rAM",
+ "az" : "az",
+ "be" : "be",
+ "bn" : "bn-rBD",
+ "bg" : "bg",
+ "ca" : "ca",
+ "cs" : "cs",
+ "da" : "da",
+ "de" : "de",
+ "el" : "el",
+ "es-ES" : "es",
+ "es-AR" : "es-rAR",
+ "es-MX" : "es-rMX",
+ "es-VE" : "es-rVE",
+ "et" : "et-rEE",
+ "eu" : "eu-rES",
+ "fa" : "fa",
+ "fil" : "fil",
+ "fi" : "fi",
+ "fr" : "fr",
+ "gl" : "gl-rES",
+ "hr" : "hr",
+ "hu" : "hu",
+ "hy-AM" : "hy-rAM",
+ "is" : "is",
+ "id" : "in",
+ "it" : "it",
+ "he" : "iw",
+ "ja" : "ja",
+ "ka" : "ka-rGE",
+ "km" : "km-rKH",
+ "kn" : "kn-rIN",
+ "ko" : "ko",
+ "ky" : "ky-rKG",
+ "lt" : "lt",
+ "lv" : "lv",
+ "lo" : "lo-rLA",
+ "ms" : "ms",
+ "ml-IN" : "ml-rIN",
+ "mn" : "mn-rMN",
+ "mr" : "mr-rIN",
+ "my" : "my-rMM",
+ "ne-NP" : "ne-rNP",
+ "nl" : "nl",
+ "no" : "no",
+ "pl" : "pl",
+ "pt-PT" : "pt",
+ "pt-BR" : "pt-rBR",
+ "ro" : "ro",
+ "ru" : "ru",
+ "rm-CH" : "rm",
+ "si-LK" : "si-rLK",
+ "sk" : "sk",
+ "sl" : "sl",
+ "sr" : "sr",
+ "sv-SE" : "sv",
+ "sw" : "sw",
+ "th" : "th",
+ "ta" : "ta-rIN",
+ "te" : "te-rIN",
+ "tr" : "tr",
+ "uk" : "uk",
+ "ur-IN" : "ur-rIN",
+ "uz" : "uz",
+ "vi" : "vi",
+ "zh-CN" : "zh-rCN",
+ "zh-HK" : "zh-rHK",
+ "zh-TW" : "zh-rTW",
+ "zu" : "zu"
+ }
+ }
+ }, {
+ "source" : "/fastlane/metadata/android/en-US/full_description.txt",
+ "dest" : "/description.txt",
+ "translation" : "/fastlane/metadata/android/%locale%/full_description.txt",
+# "update_option" : "update_without_changes",
+ "languages_mapping" : &playstoremapping {
+ "locale" : {
+ "af" : "af",
+ "ar" : "ar",
+ "am" : "am",
+ "hy-AM" : "hy-AM",
+ "az" : "az-AZ",
+ "be" : "be",
+ "bn" : "bn-BD",
+ "bg" : "bg",
+ "ca" : "ca",
+ "cs" : "cs-CZ",
+ "da" : "da-DK",
+ "de" : "de-DE",
+ "el" : "el-GR",
+ "es-ES" : "es-ES",
+ "es-AR" : "es-AR",
+ "es-MX" : "es-419",
+ "es-VE" : "es-VE",
+ "et" : "et",
+ "eu" : "eu-ES",
+ "fa" : "fa",
+ "fil" : "fil",
+ "fi" : "fi-FI",
+ "fr" : "fr-FR",
+ "fr-CA" : "fr-CA",
+ "gl" : "gl-ES",
+ "hr" : "hr",
+ "hu" : "hu-HU",
+ "hy-AM" : "hy-AM",
+ "is" : "is-IS",
+ "id" : "id",
+ "it" : "it-IT",
+ "he" : "iw-IL",
+ "hi" : "hi-IN",
+ "ja" : "ja-JP",
+ "ka" : "ka-GE",
+ "km" : "km-KH",
+ "kn" : "kn-IN",
+ "ko" : "ko-KR",
+ "ky" : "ky-KG",
+ "lt" : "lt",
+ "lv" : "lv",
+ "lo" : "lo-LA",
+ "mk" : "mk-MK",
+ "ms" : "ms",
+ "ml-IN" : "ml-IN",
+ "mn" : "mn-MN",
+ "mr" : "mr-IN",
+ "my" : "my-MM",
+ "ne-NP" : "ne-NP",
+ "nl" : "nl-NL",
+ "no" : "no-NO",
+ "pl" : "pl-PL",
+ "pt-PT" : "pt-PT",
+ "pt-BR" : "pt-BR",
+ "ro" : "ro",
+ "ru" : "ru-RU",
+ "rm-CH" : "rm",
+ "si-LK" : "si-LK",
+ "sk" : "sk",
+ "sl" : "sl",
+ "sr" : "sr",
+ "sv-SE" : "sv-SE",
+ "sw" : "sw",
+ "th" : "th",
+ "ta" : "ta-IN",
+ "te" : "te-IN",
+ "tr" : "tr-TR",
+ "uk" : "uk",
+ "ur-IN" : "ur-IN",
+ "uz" : "uz",
+ "vi" : "vi",
+ "zh-CN" : "zh-CN",
+ "zh-HK" : "zh-HK",
+ "zh-TW" : "zh-TW",
+ "zu" : "zu"
+ }
+ }
+ }, {
+ "source" : "/fastlane/metadata/android/en-US/title.txt",
+ "dest" : "/title.txt",
+ "translation" : "/fastlane/metadata/android/%locale%/title.txt",
+# "update_option" : "update_without_changes",
+ "languages_mapping" : *playstoremapping
+ }, {
+ "source" : "/fastlane/metadata/android/en-US/short_description.txt",
+ "dest" : "/short_description.txt",
+ "translation" : "/fastlane/metadata/android/%locale%/short_description.txt",
+# "update_option" : "update_without_changes",
+ "languages_mapping" : *playstoremapping
+ }
+]
\ No newline at end of file
diff --git a/crowdin.yml b/crowdin.yml
new file mode 100644
index 0000000..af5e277
--- /dev/null
+++ b/crowdin.yml
@@ -0,0 +1,183 @@
+"api_key_env": "CROWDIN_API_KEY"
+"project_identifier" : "wakelock"
+"preserve_hierarchy": true
+
+"files" : [
+ {
+ "source" : "/app/src/main/res/values/strings.xml",
+ "dest" : "/strings.xml",
+ "translation" : "/app/src/main/res/values-%android_code%/%original_file_name%",
+# "update_option" : "update_without_changes",
+ "languages_mapping" : &stringmapping {
+ "android_code" : {
+ "ar" : "ar",
+ "am" : "am",
+ "hy-AM" : "hy-rAM",
+ "az" : "az",
+ "be" : "be",
+ "bn" : "bn-rBD",
+ "bg" : "bg",
+ "ca" : "ca",
+ "cs" : "cs",
+ "da" : "da",
+ "de" : "de",
+ "el" : "el",
+ "es-ES" : "es",
+ "es-AR" : "es-rAR",
+ "es-MX" : "es-rMX",
+ "es-VE" : "es-rVE",
+ "et" : "et-rEE",
+ "eu" : "eu-rES",
+ "fa" : "fa",
+ "fil" : "fil",
+ "fi" : "fi",
+ "fr" : "fr",
+ "gl" : "gl-rES",
+ "hr" : "hr",
+ "hu" : "hu",
+ "hy-AM" : "hy-rAM",
+ "is" : "is",
+ "id" : "in",
+ "it" : "it",
+ "he" : "iw",
+ "ja" : "ja",
+ "ka" : "ka-rGE",
+ "km" : "km-rKH",
+ "kn" : "kn-rIN",
+ "ko" : "ko",
+ "ky" : "ky-rKG",
+ "lt" : "lt",
+ "lv" : "lv",
+ "lo" : "lo-rLA",
+ "ms" : "ms",
+ "ml-IN" : "ml-rIN",
+ "mn" : "mn-rMN",
+ "mr" : "mr-rIN",
+ "my" : "my-rMM",
+ "ne-NP" : "ne-rNP",
+ "nl" : "nl",
+ "no" : "no",
+ "pl" : "pl",
+ "pt-PT" : "pt",
+ "pt-BR" : "pt-rBR",
+ "ro" : "ro",
+ "ru" : "ru",
+ "rm-CH" : "rm",
+ "si-LK" : "si-rLK",
+ "sk" : "sk",
+ "sl" : "sl",
+ "sr" : "sr",
+ "sv-SE" : "sv",
+ "sw" : "sw",
+ "th" : "th",
+ "ta" : "ta-rIN",
+ "te" : "te-rIN",
+ "tr" : "tr",
+ "uk" : "uk",
+ "ur-IN" : "ur-rIN",
+ "uz" : "uz",
+ "vi" : "vi",
+ "zh-CN" : "zh-rCN",
+ "zh-HK" : "zh-rHK",
+ "zh-TW" : "zh-rTW",
+ "zu" : "zu"
+ }
+ }
+ }, {
+ "source" : "/fastlane/metadata/android/en-US/full_description.txt",
+ "dest" : "/description.txt",
+ "translation" : "/fastlane/metadata/android/%locale%/full_description.txt",
+# "update_option" : "update_without_changes",
+ "languages_mapping" : &playstoremapping {
+ "locale" : {
+ "af" : "af",
+ "ar" : "ar",
+ "am" : "am",
+ "hy-AM" : "hy-AM",
+ "az" : "az-AZ",
+ "be" : "be",
+ "bn" : "bn-BD",
+ "bg" : "bg",
+ "ca" : "ca",
+ "cs" : "cs-CZ",
+ "da" : "da-DK",
+ "de" : "de-DE",
+ "el" : "el-GR",
+ "es-ES" : "es-ES",
+ "es-AR" : "es-AR",
+ "es-MX" : "es-419",
+ "es-VE" : "es-VE",
+ "et" : "et",
+ "eu" : "eu-ES",
+ "fa" : "fa",
+ "fil" : "fil",
+ "fi" : "fi-FI",
+ "fr" : "fr-FR",
+ "fr-CA" : "fr-CA",
+ "gl" : "gl-ES",
+ "hr" : "hr",
+ "hu" : "hu-HU",
+ "hy-AM" : "hy-AM",
+ "is" : "is-IS",
+ "id" : "id",
+ "it" : "it-IT",
+ "he" : "iw-IL",
+ "hi" : "hi-IN",
+ "ja" : "ja-JP",
+ "ka" : "ka-GE",
+ "km" : "km-KH",
+ "kn" : "kn-IN",
+ "ko" : "ko-KR",
+ "ky" : "ky-KG",
+ "lt" : "lt",
+ "lv" : "lv",
+ "lo" : "lo-LA",
+ "mk" : "mk-MK",
+ "ms" : "ms",
+ "ml-IN" : "ml-IN",
+ "mn" : "mn-MN",
+ "mr" : "mr-IN",
+ "my" : "my-MM",
+ "ne-NP" : "ne-NP",
+ "nl" : "nl-NL",
+ "no" : "no-NO",
+ "pl" : "pl-PL",
+ "pt-PT" : "pt-PT",
+ "pt-BR" : "pt-BR",
+ "ro" : "ro",
+ "ru" : "ru-RU",
+ "rm-CH" : "rm",
+ "si-LK" : "si-LK",
+ "sk" : "sk",
+ "sl" : "sl",
+ "sr" : "sr",
+ "sv-SE" : "sv-SE",
+ "sw" : "sw",
+ "th" : "th",
+ "ta" : "ta-IN",
+ "te" : "te-IN",
+ "tr" : "tr-TR",
+ "uk" : "uk",
+ "ur-IN" : "ur-IN",
+ "uz" : "uz",
+ "vi" : "vi",
+ "zh-CN" : "zh-CN",
+ "zh-HK" : "zh-HK",
+ "zh-TW" : "zh-TW",
+ "zu" : "zu"
+ }
+ }
+ }, {
+ "source" : "/fastlane/metadata/android/en-US/title.txt",
+ "dest" : "/title.txt",
+ "translation" : "/fastlane/metadata/android/%locale%/title.txt",
+# "update_option" : "update_without_changes",
+ "languages_mapping" : *playstoremapping
+ }, {
+ "source" : "/fastlane/metadata/android/en-US/short_description.txt",
+ "dest" : "/short_description.txt",
+ "translation" : "/fastlane/metadata/android/%locale%/short_description.txt",
+# "update_option" : "update_without_changes",
+ "languages_mapping" : *playstoremapping
+ }
+]
\ No newline at end of file
diff --git a/fastlane/Appfile b/fastlane/Appfile
new file mode 100644
index 0000000..4bddb9c
--- /dev/null
+++ b/fastlane/Appfile
@@ -0,0 +1,2 @@
+json_key_file "~/.appconfig/eu.thedarken.wldonate/dev-console.properties"
+package_name "eu.thedarken.wldonate"
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
new file mode 100644
index 0000000..d13b6ee
--- /dev/null
+++ b/fastlane/Fastfile
@@ -0,0 +1,62 @@
+# Customise this file, documentation can be found here:
+# https://docs.fastlane.tools/actions/
+# All available actions: https://docs.fastlane.tools/actions
+# can also be listed using the `fastlane actions` command
+
+# Change the syntax highlighting to Ruby
+# All lines starting with a # are ignored when running `fastlane`
+
+# If you want to automatically update fastlane if a new version is available:
+# update_fastlane
+
+# This is the minimum version number required.
+# Update this, if you use features of a newer version
+fastlane_version "2.101.0"
+
+default_platform :android
+
+platform :android do
+ before_all do
+ #ensure_git_status_clean
+ end
+
+ lane :beta do
+ ensure_git_branch(branch: 'dev')
+ git_pull
+ gradle(task: 'clean assembleRelease')
+ supply(track: 'beta')
+ end
+
+ lane :production do
+ ensure_git_branch(branch: 'master')
+ git_pull
+ gradle(task: 'clean assembleRelease')
+ supply(track: 'rollout', rollout: '0.1')
+ end
+
+ lane :listing_only do
+ sh "bash ./remove_unsupported_languages.sh"
+ supply(
+ track: 'production',
+ skip_upload_apk: 'true',
+ skip_upload_images: 'true',
+ skip_upload_screenshots: 'true',
+ skip_upload_aab: 'true'
+ )
+ end
+
+ after_all do |lane|
+ # This block is called, only if the executed lane was successful
+
+ # slack(
+ # message: "Successfully deployed new App Update."
+ # )
+ end
+
+ error do |lane, exception|
+ # slack(
+ # message: exception.message,
+ # success: false
+ # )
+ end
+end
\ No newline at end of file
diff --git a/fastlane/metadata/android/en-US/full_description.txt b/fastlane/metadata/android/en-US/full_description.txt
new file mode 100644
index 0000000..cb49c80
--- /dev/null
+++ b/fastlane/metadata/android/en-US/full_description.txt
@@ -0,0 +1,17 @@
+Wake Lock gives you access to Android's Power- and WifiManager.
+You can use it on any Android phone or tablet.
+
+Examples of what it can do for you:
+• Force the PowerManager to keep the screen on
+• Have the CPU still running in standby mode
+• Ensure the Wifi connection keeps running at full performance
+• Keep the screen on in full brightness or dimmed mode during movies
+• Override power saving measures if they are causing issues
+
+This is the modernized version of my app "WakeLock - PowerManager".
+
+What the permissions are used for:
+• WAKE_LOCK, to obviously be allowed to aquire wakelocks.
+• RECEIVE_BOOT_COMPLETED, to start the app after device reboots.
+• READ_PHONE_STATE, to act on start/ending calls, allowing the app to aquire a lock just for the duration of the call.
+• INTERNET, for automatic crash tracking. There is an option to disable this, but why would you 🙁?
\ No newline at end of file
diff --git a/fastlane/metadata/android/en-US/short_description.txt b/fastlane/metadata/android/en-US/short_description.txt
new file mode 100644
index 0000000..9ed7b85
--- /dev/null
+++ b/fastlane/metadata/android/en-US/short_description.txt
@@ -0,0 +1 @@
+Easy control over Android's PowerManager.
\ No newline at end of file
diff --git a/fastlane/metadata/android/en-US/title.txt b/fastlane/metadata/android/en-US/title.txt
new file mode 100644
index 0000000..b41e45b
--- /dev/null
+++ b/fastlane/metadata/android/en-US/title.txt
@@ -0,0 +1 @@
+Wake Lock Revamp - PowerManager
\ No newline at end of file
diff --git a/fastlane/remove_unsupported_languages.sh b/fastlane/remove_unsupported_languages.sh
new file mode 100644
index 0000000..4032a9a
--- /dev/null
+++ b/fastlane/remove_unsupported_languages.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+echo "Removing unsupported languages..."
+echo `pwd`
+rm -rv ./metadata/android/es-AR
+rm -rv ./metadata/android/sc-IT
+rm -rv ./metadata/android/sq-AL
+rm -rv ./metadata/android/uz
+rm -rv ./metadata/android/pcm-NG
+rm -rv ./metadata/android/tl-PH
+find ./metadata/android -empty -type d -delete
+exit 0
\ No newline at end of file
diff --git a/local.properties b/local.properties
deleted file mode 100644
index 2e19dda..0000000
--- a/local.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-## This file must *NOT* be checked into Version Control Systems,
-# as it contains information specific to your local configuration.
-#
-# Location of the SDK. This is only used by Gradle.
-# For customization when using a Version Control System, please read the
-# header note.
-#Sun Jul 29 23:47:14 CEST 2018
-ndk.dir=C\:\\Users\\darken\\AppData\\Local\\Android\\sdk\\ndk-bundle
-sdk.dir=C\:\\Users\\darken\\AppData\\Local\\Android\\sdk