aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/build.gradle6
-rw-r--r--app/src/main/AndroidManifest.xml4
-rw-r--r--app/src/main/ic_launcher-playstore.pngbin0 -> 18926 bytes
-rw-r--r--app/src/main/java/org/traccar/manager/MainActivity.kt8
-rw-r--r--app/src/main/res/drawable/ic_launcher_foreground.xml22
-rw-r--r--app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml4
-rw-r--r--app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml4
-rw-r--r--app/src/main/res/mipmap-hdpi/ic_launcher.pngbin4358 -> 0 bytes
-rw-r--r--app/src/main/res/mipmap-hdpi/ic_launcher_round.pngbin0 -> 3950 bytes
-rw-r--r--app/src/main/res/mipmap-mdpi/ic_launcher.pngbin2670 -> 0 bytes
-rw-r--r--app/src/main/res/mipmap-mdpi/ic_launcher_round.pngbin0 -> 2392 bytes
-rw-r--r--app/src/main/res/mipmap-xhdpi/ic_launcher.pngbin6130 -> 0 bytes
-rw-r--r--app/src/main/res/mipmap-xhdpi/ic_launcher_round.pngbin0 -> 5618 bytes
-rw-r--r--app/src/main/res/mipmap-xxhdpi/ic_launcher.pngbin9859 -> 0 bytes
-rw-r--r--app/src/main/res/mipmap-xxhdpi/ic_launcher_round.pngbin0 -> 8740 bytes
-rw-r--r--app/src/main/res/mipmap-xxxhdpi/ic_launcher.pngbin13638 -> 0 bytes
-rw-r--r--app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.pngbin0 -> 12694 bytes
-rw-r--r--app/src/main/res/values/ic_launcher_background.xml4
-rw-r--r--app/src/main/res/values/strings.xml3
-rw-r--r--build.gradle2
20 files changed, 43 insertions, 14 deletions
diff --git a/app/build.gradle b/app/build.gradle
index 5b4aeac..86c3cdd 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -2,12 +2,12 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
android {
- compileSdkVersion 30
+ compileSdkVersion 31
defaultConfig {
- applicationId 'org.traccar.manager'
+ applicationId 'net.etbsa.ETBSA'
minSdkVersion 19
- targetSdkVersion 30
+ targetSdkVersion 31
versionCode 28
versionName '2.17'
}
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 7931b2b..c3177f4 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -5,6 +5,7 @@
package="org.traccar.manager">
<uses-permission android:name="android.permission.INTERNET" />
+ <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
@@ -17,7 +18,8 @@
<activity
android:name=".MainActivity"
- android:configChanges="keyboardHidden|orientation|screenSize">
+ android:configChanges="keyboardHidden|orientation|screenSize"
+ android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
diff --git a/app/src/main/ic_launcher-playstore.png b/app/src/main/ic_launcher-playstore.png
new file mode 100644
index 0000000..dba61fd
--- /dev/null
+++ b/app/src/main/ic_launcher-playstore.png
Binary files differ
diff --git a/app/src/main/java/org/traccar/manager/MainActivity.kt b/app/src/main/java/org/traccar/manager/MainActivity.kt
index 945b108..ce56296 100644
--- a/app/src/main/java/org/traccar/manager/MainActivity.kt
+++ b/app/src/main/java/org/traccar/manager/MainActivity.kt
@@ -33,11 +33,11 @@ class MainActivity : AppCompatActivity() {
}
private fun initContent() {
- if (PreferenceManager.getDefaultSharedPreferences(this).contains(PREFERENCE_URL)) {
- fragmentManager.beginTransaction().add(android.R.id.content, MainFragment()).commit()
- } else {
- fragmentManager.beginTransaction().add(android.R.id.content, StartFragment()).commit()
+ if (!PreferenceManager.getDefaultSharedPreferences(this).contains(PREFERENCE_URL)) {
+ PreferenceManager.getDefaultSharedPreferences(this)
+ .edit().putString(PREFERENCE_URL, getString(R.string.server_url)).apply()
}
+ fragmentManager.beginTransaction().add(android.R.id.content, MainFragment()).commit()
}
@RequiresApi(api = Build.VERSION_CODES.M)
diff --git a/app/src/main/res/drawable/ic_launcher_foreground.xml b/app/src/main/res/drawable/ic_launcher_foreground.xml
new file mode 100644
index 0000000..ff2f44a
--- /dev/null
+++ b/app/src/main/res/drawable/ic_launcher_foreground.xml
@@ -0,0 +1,22 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="108dp"
+ android:height="108dp"
+ android:viewportWidth="108"
+ android:viewportHeight="108">
+ <group android:scaleX="0.969375"
+ android:scaleY="0.969375"
+ android:translateX="22.98"
+ android:translateY="22.98">
+ <path
+ android:pathData="m14.6418,2.7387l34.7175,0c6.5943,0 11.9031,5.3088 11.9031,11.9031l0,34.7175c0,6.5943 -5.3088,11.9031 -11.9031,11.9031L14.6418,61.2625c-6.5943,0 -11.9031,-5.3088 -11.9031,-11.9031L2.7386,14.6419c0,-6.5943 5.3088,-11.9031 11.9031,-11.9031z"
+ android:strokeWidth="5.6480827"
+ android:fillColor="#337729"/>
+ <path
+ android:pathData="m14.641,-0.086c-8.11,0 -14.7269,6.6169 -14.7269,14.7269l0,34.7181c0,8.11 6.6169,14.7269 14.7269,14.7269l34.7181,0c8.11,0 14.7269,-6.6169 14.7269,-14.7269L64.086,14.641c0,-8.11 -6.6169,-14.7269 -14.7269,-14.7269zM14.641,5.5621l34.7181,0c5.0787,0 9.0789,4.0002 9.0789,9.0789l0,34.7181c0,5.0787 -4.0002,9.0789 -9.0789,9.0789L14.641,58.4379c-5.0787,0 -9.0789,-4.0002 -9.0789,-9.0789L5.5621,14.641c0,-5.0787 4.0002,-9.0789 9.0789,-9.0789z"
+ android:fillColor="#efdb1e"/>
+ <path
+ android:pathData="m41.1022,53.3204c-0.3718,-0.1119 -0.8627,-0.3024 -1.0908,-0.4233 -0.2281,-0.1209 -2.3218,-1.457 -4.6526,-2.969l-4.2378,-2.7492 3.8048,-0.0235 3.8048,-0.0235 -5.141,-14.6894c-2.8275,-8.0792 -5.1523,-14.6781 -5.1661,-14.6643 -0.0138,0.0138 0.4524,3.115 1.036,6.8915l1.0611,6.8663 -2.2082,6.3116 -2.2082,6.3116h-5.1655c-2.841,0 -5.1655,-0.0304 -5.1656,-0.0676 -0.0001,-0.0372 2.4813,-6.9751 5.5141,-15.4175l5.5143,-15.3499 4.3785,0.0265 4.3785,0.0265 0.514,0.2524c0.6098,0.2995 1.2619,0.9866 1.4502,1.5283 0.0731,0.2104 2.7374,7.6837 5.9206,16.6074 3.1832,8.9236 5.865,16.5254 5.9596,16.8927 0.5067,1.9677 -0.1038,3.606 -1.6324,4.3806 -0.8291,0.4202 -1.3898,0.4926 -3.7842,0.4888 -2.0269,-0.0032 -2.264,-0.0202 -2.8844,-0.207zM15.7009,34.7399c0.001,-0.1487 0.0221,-0.1987 0.0449,-0.111 0.0228,0.0877 0.0214,0.2094 -0.004,0.2704 -0.0247,0.061 -0.0433,-0.0107 -0.0415,-0.1595zM15.6969,33.4329c0,-0.1239 0.0205,-0.1746 0.0455,-0.1127 0.025,0.062 0.025,0.1634 0,0.2253 -0.025,0.062 -0.0455,0.0112 -0.0455,-0.1127zM15.1695,22.9769c0,-0.2727 0.0169,-0.3842 0.0376,-0.2479 0.0206,0.1363 0.0206,0.3594 0,0.4958 -0.0206,0.1363 -0.0376,0.0248 -0.0376,-0.2479z"
+ android:strokeWidth="0.0901377"
+ android:fillColor="#efdb1e"/>
+ </group>
+</vector>
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
index 7335274..7353dbd 100644
--- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
- <background android:drawable="@color/primary"/>
- <foreground android:drawable="@mipmap/ic_launcher_foreground"/>
+ <background android:drawable="@color/ic_launcher_background"/>
+ <foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon> \ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
index 7335274..7353dbd 100644
--- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
- <background android:drawable="@color/primary"/>
- <foreground android:drawable="@mipmap/ic_launcher_foreground"/>
+ <background android:drawable="@color/ic_launcher_background"/>
+ <foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon> \ No newline at end of file
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png
deleted file mode 100644
index de3d20d..0000000
--- a/app/src/main/res/mipmap-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
new file mode 100644
index 0000000..a17aa21
--- /dev/null
+++ b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Binary files differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png
deleted file mode 100644
index 89d4668..0000000
--- a/app/src/main/res/mipmap-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
new file mode 100644
index 0000000..e9c7fbd
--- /dev/null
+++ b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Binary files differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png
deleted file mode 100644
index 21c0b1c..0000000
--- a/app/src/main/res/mipmap-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..5075812
--- /dev/null
+++ b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Binary files differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
deleted file mode 100644
index f9301a8..0000000
--- a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..a294a0e
--- /dev/null
+++ b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
Binary files differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
deleted file mode 100644
index 9903608..0000000
--- a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..c581a2e
--- /dev/null
+++ b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
Binary files differ
diff --git a/app/src/main/res/values/ic_launcher_background.xml b/app/src/main/res/values/ic_launcher_background.xml
new file mode 100644
index 0000000..276c9ab
--- /dev/null
+++ b/app/src/main/res/values/ic_launcher_background.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <color name="ic_launcher_background">#EFDB1E</color>
+</resources> \ 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 feea781..e13d3f4 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1,5 +1,6 @@
<resources>
- <string name="app_name">Traccar Manager</string>
+ <string name="app_name">ETBSA</string>
+ <string name="server_url">https://etbsa.net</string>
<string name="label_server">Server</string>
<string name="label_info">This screen will be shown only once. After you click the button, server address will be saved in preferences. To change it, clear app data from application manager.</string>
<string name="button_start">Start</string>
diff --git a/build.gradle b/build.gradle
index 54dd150..55d17e9 100644
--- a/build.gradle
+++ b/build.gradle
@@ -5,7 +5,7 @@ buildscript {
mavenCentral()
}
dependencies {
- classpath 'com.android.tools.build:gradle:7.0.0-beta05'
+ classpath 'com.android.tools.build:gradle:7.0.2'
classpath 'com.google.gms:google-services:4.3.8'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"