Сравнить коммиты
| Автор | SHA1 | Дата | |
|---|---|---|---|
|
|
e8a1e015d4 | ||
|
|
ceb15c1378 | ||
|
|
d25c745013 | ||
|
|
c24df5b246 | ||
|
|
283d0467b4 | ||
|
|
83bf1daa84 | ||
|
|
96d61c4c66 | ||
|
|
3978a3d8d6 | ||
|
|
78018c3038 | ||
|
|
19b7c4da21 |
@@ -0,0 +1 @@
|
||||
custom: https://www.traccar.org/donate/
|
||||
@@ -1,7 +0,0 @@
|
||||
<!--
|
||||
|
||||
Do you want to ask a question? Traccar official forum is the best place for getting support:
|
||||
|
||||
https://www.traccar.org/forums/
|
||||
|
||||
-->
|
||||
@@ -0,0 +1,38 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
- OS: [e.g. iOS]
|
||||
- Browser [e.g. chrome, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Smartphone (please complete the following information):**
|
||||
- Device: [e.g. iPhone6]
|
||||
- OS: [e.g. iOS8.1]
|
||||
- Browser [e.g. stock browser, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
+20
-9
@@ -8,8 +8,18 @@ android {
|
||||
buildConfigField 'boolean', 'HIDDEN_APP', 'false'
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 29
|
||||
versionCode 64
|
||||
versionName '6.3'
|
||||
versionCode 65
|
||||
versionName '6.4'
|
||||
multiDexEnabled true
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
exclude 'META-INF/DEPENDENCIES'
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
@@ -19,7 +29,7 @@ android {
|
||||
flavorDimensions 'default'
|
||||
productFlavors {
|
||||
regular {
|
||||
isDefault.set(true)
|
||||
isDefault = true
|
||||
}
|
||||
google
|
||||
hidden {
|
||||
@@ -36,14 +46,15 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.google.android.material:material:1.3.0-alpha01'
|
||||
implementation 'com.google.android.material:material:1.3.0-alpha02'
|
||||
implementation 'androidx.multidex:multidex:2.0.1'
|
||||
implementation 'androidx.preference:preference:1.1.1'
|
||||
testImplementation 'junit:junit:4.13'
|
||||
testImplementation 'org.robolectric:robolectric:4.1'
|
||||
googleImplementation 'com.google.firebase:firebase-core:17.4.3'
|
||||
googleImplementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
|
||||
googleImplementation 'com.google.firebase:firebase-analytics:17.4.3'
|
||||
googleImplementation 'com.google.android.gms:play-services-location:17.0.0'
|
||||
googleImplementation 'com.google.firebase:firebase-core:17.5.0'
|
||||
googleImplementation 'com.google.firebase:firebase-crashlytics-gradle:2.3.0'
|
||||
googleImplementation 'com.google.firebase:firebase-analytics:17.5.0'
|
||||
googleImplementation 'com.google.android.gms:play-services-location:17.1.0'
|
||||
}
|
||||
|
||||
if (getGradle().getStartParameter().getTaskRequests().toString().contains('Google')) {
|
||||
@@ -51,7 +62,7 @@ if (getGradle().getStartParameter().getTaskRequests().toString().contains('Googl
|
||||
apply plugin: 'com.google.firebase.crashlytics'
|
||||
|
||||
task copyJson(type: Copy) {
|
||||
from '../../traccar-shared/google-services'
|
||||
from '../../environment/google-services'
|
||||
into '.'
|
||||
include 'traccar-client-android.json'
|
||||
rename('traccar-client-android.json', 'google-services.json')
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2016 - 2017 Anton Tananaev (anton@traccar.org)
|
||||
* Copyright 2016 - 2020 Anton Tananaev (anton@traccar.org)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,7 +16,6 @@
|
||||
package org.traccar.client;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.Application;
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationManager;
|
||||
@@ -27,7 +26,9 @@ import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.preference.PreferenceManager;
|
||||
|
||||
public class MainApplication extends Application {
|
||||
import androidx.multidex.MultiDexApplication;
|
||||
|
||||
public class MainApplication extends MultiDexApplication {
|
||||
|
||||
public static final String PRIMARY_CHANNEL = "default";
|
||||
|
||||
@@ -46,7 +47,7 @@ public class MainApplication extends Application {
|
||||
@TargetApi(Build.VERSION_CODES.O)
|
||||
private void registerChannel() {
|
||||
NotificationChannel channel = new NotificationChannel(
|
||||
PRIMARY_CHANNEL, getString(R.string.channel_default), NotificationManager.IMPORTANCE_MIN);
|
||||
PRIMARY_CHANNEL, getString(R.string.channel_default), NotificationManager.IMPORTANCE_LOW);
|
||||
channel.setLightColor(Color.GREEN);
|
||||
channel.setLockscreenVisibility(Notification.VISIBILITY_SECRET);
|
||||
((NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE)).createNotificationChannel(channel);
|
||||
|
||||
@@ -66,6 +66,7 @@ public class MainFragment extends PreferenceFragmentCompat implements OnSharedPr
|
||||
public static final String KEY_ACCURACY = "accuracy";
|
||||
public static final String KEY_STATUS = "status";
|
||||
public static final String KEY_BUFFER = "buffer";
|
||||
public static final String KEY_WAKELOCK = "wakelock";
|
||||
|
||||
private static final int PERMISSIONS_REQUEST_LOCATION = 2;
|
||||
|
||||
@@ -83,7 +84,7 @@ public class MainFragment extends PreferenceFragmentCompat implements OnSharedPr
|
||||
setHasOptionsMenu(true);
|
||||
|
||||
sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
addPreferencesFromResource(R.xml.preferences);
|
||||
setPreferencesFromResource(R.xml.preferences, rootKey);
|
||||
initPreferences();
|
||||
|
||||
findPreference(KEY_DEVICE).setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
|
||||
@@ -206,6 +207,7 @@ public class MainFragment extends PreferenceFragmentCompat implements OnSharedPr
|
||||
findPreference(KEY_ANGLE).setEnabled(enabled);
|
||||
findPreference(KEY_ACCURACY).setEnabled(enabled);
|
||||
findPreference(KEY_BUFFER).setEnabled(enabled);
|
||||
findPreference(KEY_WAKELOCK).setEnabled(enabled);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -25,7 +25,6 @@ public class TrackingController implements PositionProvider.PositionListener, Ne
|
||||
|
||||
private static final String TAG = TrackingController.class.getSimpleName();
|
||||
private static final int RETRY_DELAY = 30 * 1000;
|
||||
private static final int WAKE_LOCK_TIMEOUT = 120 * 1000;
|
||||
|
||||
private boolean isOnline;
|
||||
private boolean isWaiting;
|
||||
|
||||
@@ -29,6 +29,7 @@ import androidx.core.app.NotificationCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import android.os.PowerManager;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
|
||||
public class TrackingService extends Service {
|
||||
@@ -87,9 +88,11 @@ public class TrackingService extends Service {
|
||||
|
||||
if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {
|
||||
|
||||
if (PreferenceManager.getDefaultSharedPreferences(this).getBoolean(MainFragment.KEY_WAKELOCK, true)) {
|
||||
PowerManager powerManager = (PowerManager) getSystemService(Context.POWER_SERVICE);
|
||||
wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, getClass().getName());
|
||||
wakeLock.acquire();
|
||||
}
|
||||
|
||||
trackingController = new TrackingController(this);
|
||||
trackingController.start();
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
<string name="settings_buffer">Offline buffering</string>
|
||||
<string name="settings_buffer_off_summary">Buffering off</string>
|
||||
<string name="settings_buffer_on_summary">Buffering on</string>
|
||||
<string name="settings_wakelock">Wake lock</string>
|
||||
<string name="settings_wakelock_off_summary">Wake lock off</string>
|
||||
<string name="settings_wakelock_on_summary">Wake lock on</string>
|
||||
<string name="settings_accuracy_title">Location accuracy</string>
|
||||
<string name="settings_accuracy_summary">Desired location accuracy</string>
|
||||
<string name="settings_accuracy_high">High</string>
|
||||
|
||||
@@ -56,4 +56,11 @@
|
||||
android:summaryOn="@string/settings_buffer_on_summary"
|
||||
android:title="@string/settings_buffer" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:key="wakelock"
|
||||
android:summaryOff="@string/settings_wakelock_off_summary"
|
||||
android:summaryOn="@string/settings_wakelock_on_summary"
|
||||
android:title="@string/settings_wakelock" />
|
||||
|
||||
</PreferenceScreen>
|
||||
|
||||
+2
-2
@@ -4,9 +4,9 @@ buildscript {
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.0.0'
|
||||
classpath 'com.android.tools.build:gradle:4.0.1'
|
||||
classpath 'com.google.gms:google-services:4.3.3'
|
||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.1.1'
|
||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.3.0'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user