├── settings.gradle
├── .github
├── FUNDING.yml
├── ISSUE_TEMPLATE
│ ├── feature_request.md
│ └── bug_report.md
└── CONTRIBUTING.md
├── .gitignore
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── app
├── src
│ ├── main
│ │ ├── ic_launcher-playstore.png
│ │ ├── res
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_sos.png
│ │ │ │ ├── ic_start.png
│ │ │ │ ├── ic_stop.png
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_sos.png
│ │ │ │ ├── ic_start.png
│ │ │ │ ├── ic_stop.png
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_sos.png
│ │ │ │ ├── ic_stop.png
│ │ │ │ ├── ic_start.png
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_sos.png
│ │ │ │ ├── ic_start.png
│ │ │ │ ├── ic_stop.png
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_sos.png
│ │ │ │ ├── ic_stop.png
│ │ │ │ ├── ic_start.png
│ │ │ │ └── ic_launcher.png
│ │ │ ├── values
│ │ │ │ ├── dimens.xml
│ │ │ │ ├── colors.xml
│ │ │ │ ├── themes.xml
│ │ │ │ ├── values.xml
│ │ │ │ └── strings.xml
│ │ │ ├── layout
│ │ │ │ ├── list.xml
│ │ │ │ ├── status_widget.xml
│ │ │ │ └── main.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_sos.xml
│ │ │ │ ├── ic_stop.xml
│ │ │ │ ├── ic_start.xml
│ │ │ │ └── ic_launcher.xml
│ │ │ ├── menu
│ │ │ │ ├── status.xml
│ │ │ │ └── main.xml
│ │ │ ├── xml
│ │ │ │ ├── network_security_config.xml
│ │ │ │ ├── status_widget_info.xml
│ │ │ │ ├── shortcuts.xml
│ │ │ │ └── preferences.xml
│ │ │ ├── drawable
│ │ │ │ ├── ic_start_foreground.xml
│ │ │ │ ├── ic_stop_foreground.xml
│ │ │ │ ├── ic_sos_foreground.xml
│ │ │ │ ├── ic_stat_notify.xml
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ ├── values-lo
│ │ │ │ └── strings.xml
│ │ │ ├── values-km
│ │ │ │ └── strings.xml
│ │ │ ├── values-uk
│ │ │ │ └── strings.xml
│ │ │ ├── values-si
│ │ │ │ └── strings.xml
│ │ │ ├── values-bn
│ │ │ │ └── strings.xml
│ │ │ ├── values-vi
│ │ │ │ └── strings.xml
│ │ │ ├── values-zh
│ │ │ │ └── strings.xml
│ │ │ ├── values-ko
│ │ │ │ └── strings.xml
│ │ │ ├── values-he
│ │ │ │ └── strings.xml
│ │ │ ├── values-iw
│ │ │ │ └── strings.xml
│ │ │ ├── values-ja
│ │ │ │ └── strings.xml
│ │ │ ├── values-fa
│ │ │ │ └── strings.xml
│ │ │ ├── values-hi
│ │ │ │ └── strings.xml
│ │ │ ├── values-az
│ │ │ │ └── strings.xml
│ │ │ ├── values-id
│ │ │ │ └── strings.xml
│ │ │ ├── values-sk
│ │ │ │ └── strings.xml
│ │ │ ├── values-tr
│ │ │ │ └── strings.xml
│ │ │ ├── values-bg
│ │ │ │ └── strings.xml
│ │ │ ├── values-ro
│ │ │ │ └── strings.xml
│ │ │ ├── values-ta
│ │ │ │ └── strings.xml
│ │ │ ├── values-sl
│ │ │ │ └── strings.xml
│ │ │ ├── values-lt
│ │ │ │ └── strings.xml
│ │ │ ├── values-af
│ │ │ │ └── strings.xml
│ │ │ ├── values-de
│ │ │ │ └── strings.xml
│ │ │ ├── values-nn
│ │ │ │ └── strings.xml
│ │ │ ├── values-nb
│ │ │ │ └── strings.xml
│ │ │ ├── values-ar
│ │ │ │ └── strings.xml
│ │ │ ├── values-da
│ │ │ │ └── strings.xml
│ │ │ ├── values-ru
│ │ │ │ └── strings.xml
│ │ │ ├── values-fr
│ │ │ │ └── strings.xml
│ │ │ ├── values-pt
│ │ │ │ └── strings.xml
│ │ │ ├── values-hr
│ │ │ │ └── strings.xml
│ │ │ ├── values-ka
│ │ │ │ └── strings.xml
│ │ │ ├── values-lv
│ │ │ │ └── strings.xml
│ │ │ ├── values-th
│ │ │ │ └── strings.xml
│ │ │ ├── values-sv
│ │ │ │ └── strings.xml
│ │ │ ├── values-ca
│ │ │ │ └── strings.xml
│ │ │ ├── values-sr
│ │ │ │ └── strings.xml
│ │ │ ├── values-cs
│ │ │ │ └── strings.xml
│ │ │ ├── values-nl
│ │ │ │ └── strings.xml
│ │ │ ├── values-fi
│ │ │ │ └── strings.xml
│ │ │ ├── values-pl
│ │ │ │ └── strings.xml
│ │ │ ├── values-hu
│ │ │ │ └── strings.xml
│ │ │ ├── values-it
│ │ │ │ └── strings.xml
│ │ │ ├── values-pt-rBR
│ │ │ │ └── strings.xml
│ │ │ └── values-el
│ │ │ │ └── strings.xml
│ │ └── java
│ │ │ └── org
│ │ │ └── traccar
│ │ │ └── client
│ │ │ ├── BatteryStatus.kt
│ │ │ ├── MainActivity.kt
│ │ │ ├── AutostartReceiver.kt
│ │ │ ├── DialLaunchReceiver.kt
│ │ │ ├── MainApplication.kt
│ │ │ ├── ProtocolFormatter.kt
│ │ │ ├── NetworkManager.kt
│ │ │ ├── RequestManager.kt
│ │ │ ├── Position.kt
│ │ │ ├── WakefulBroadcastReceiver.kt
│ │ │ ├── StatusWidget.kt
│ │ │ ├── StatusActivity.kt
│ │ │ ├── AndroidPositionProvider.kt
│ │ │ └── PositionProvider.kt
│ ├── google
│ │ ├── AndroidManifest.xml
│ │ └── java
│ │ │ └── org
│ │ │ └── traccar
│ │ │ └── client
│ │ │ ├── PositionProviderFactory.kt
│ │ │ ├── ServiceReceiver.kt
│ │ │ ├── GooglePositionProvider.kt
│ │ │ └── GoogleMainApplication.kt
│ ├── test
│ │ └── java
│ │ │ └── org
│ │ │ └── traccar
│ │ │ └── client
│ │ │ ├── RequestManagerTest.kt
│ │ │ ├── DatabaseHelperTest.kt
│ │ │ └── ProtocolFormatterTest.kt
│ └── regular
│ │ └── java
│ │ └── org
│ │ └── traccar
│ │ └── client
│ │ └── PositionProviderFactory.kt
└── build.gradle
├── gradle.properties
├── README.md
├── translate.py
└── gradlew.bat
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | github: traccar
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | .idea/
3 | local.properties
4 | *.iml
5 | build/
6 | .DS_Store
7 | google-services.json
8 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traccar/traccar-client-android/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/app/src/main/ic_launcher-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traccar/traccar-client-android/HEAD/app/src/main/ic_launcher-playstore.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_sos.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traccar/traccar-client-android/HEAD/app/src/main/res/mipmap-hdpi/ic_sos.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_start.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traccar/traccar-client-android/HEAD/app/src/main/res/mipmap-hdpi/ic_start.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traccar/traccar-client-android/HEAD/app/src/main/res/mipmap-hdpi/ic_stop.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_sos.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traccar/traccar-client-android/HEAD/app/src/main/res/mipmap-mdpi/ic_sos.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_start.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traccar/traccar-client-android/HEAD/app/src/main/res/mipmap-mdpi/ic_start.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traccar/traccar-client-android/HEAD/app/src/main/res/mipmap-mdpi/ic_stop.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_sos.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traccar/traccar-client-android/HEAD/app/src/main/res/mipmap-xhdpi/ic_sos.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traccar/traccar-client-android/HEAD/app/src/main/res/mipmap-xhdpi/ic_stop.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_sos.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traccar/traccar-client-android/HEAD/app/src/main/res/mipmap-xxhdpi/ic_sos.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_start.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traccar/traccar-client-android/HEAD/app/src/main/res/mipmap-xhdpi/ic_start.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_start.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traccar/traccar-client-android/HEAD/app/src/main/res/mipmap-xxhdpi/ic_start.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traccar/traccar-client-android/HEAD/app/src/main/res/mipmap-xxhdpi/ic_stop.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_sos.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traccar/traccar-client-android/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_sos.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traccar/traccar-client-android/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_stop.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traccar/traccar-client-android/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traccar/traccar-client-android/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traccar/traccar-client-android/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traccar/traccar-client-android/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_start.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traccar/traccar-client-android/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_start.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traccar/traccar-client-android/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 |
5 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | android.defaults.buildfeatures.buildconfig=true
2 | android.nonFinalResIds=false
3 | android.nonTransitiveRClass=false
4 | android.useAndroidX=true
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | #2e7d32
5 | #005005
6 | #1a237e
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/list.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
4 | networkTimeout=10000
5 | validateDistributionUrl=true
6 | zipStoreBase=GRADLE_USER_HOME
7 | zipStorePath=wrapper/dists
8 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_sos.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/status.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_stop.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/network_security_config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_start.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/google/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # [Traccar Client for Android](https://www.traccar.org/client)
2 |
3 | **This repository contains the old version of the app.**
4 |
5 | Development has moved to a new repository, where you can find the latest version and ongoing updates:
6 |
7 | 👉 [https://github.com/traccar/traccar-client](https://github.com/traccar/traccar-client)
8 |
9 | No further development will take place here. Please use the new repository for issues, pull requests, and the latest code.
10 |
--------------------------------------------------------------------------------
/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/status_widget_info.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/status_widget.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_start_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
11 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_stop_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
11 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_sos_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
11 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/values/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | http://demo.traccar.org:5055
5 |
6 |
7 | - high
8 | - medium
9 | - low
10 |
11 |
12 |
13 | - @string/settings_accuracy_high
14 | - @string/settings_accuracy_medium
15 | - @string/settings_accuracy_low
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/test/java/org/traccar/client/RequestManagerTest.kt:
--------------------------------------------------------------------------------
1 | package org.traccar.client
2 |
3 | import android.os.Build
4 | import org.junit.Assert
5 | import org.junit.Ignore
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 | import org.robolectric.RobolectricTestRunner
9 | import org.robolectric.annotation.Config
10 | import org.traccar.client.RequestManager.sendRequest
11 |
12 | @Config(sdk = [Build.VERSION_CODES.P])
13 | @RunWith(RobolectricTestRunner::class)
14 | class RequestManagerTest {
15 |
16 | @Ignore("Not a real unit test")
17 | @Test
18 | fun testSendRequest() {
19 | Assert.assertTrue(sendRequest("http://www.google.com"))
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/app/src/main/java/org/traccar/client/BatteryStatus.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 Anton Tananaev (anton@traccar.org)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.traccar.client
17 |
18 | data class BatteryStatus(
19 | val level: Double = 0.0,
20 | val charging: Boolean = false,
21 | )
22 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug is.
12 |
13 | **To Reproduce**
14 | Steps to reproduce the behavior:
15 | 1. Go to '...'
16 | 2. Click on '....'
17 | 3. Scroll down to '....'
18 | 4. See error
19 |
20 | **Expected behavior**
21 | A clear and concise description of what you expected to happen.
22 |
23 | **Screenshots**
24 | If applicable, add screenshots to help explain your problem.
25 |
26 | **Desktop (please complete the following information):**
27 | - OS: [e.g. iOS]
28 | - Browser [e.g. chrome, safari]
29 | - Version [e.g. 22]
30 |
31 | **Smartphone (please complete the following information):**
32 | - Device: [e.g. iPhone6]
33 | - OS: [e.g. iOS8.1]
34 | - Browser [e.g. stock browser, safari]
35 | - Version [e.g. 22]
36 |
37 | **Additional context**
38 | Add any other context about the problem here.
39 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_stat_notify.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/java/org/traccar/client/MainActivity.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 - 2021 Anton Tananaev (anton@traccar.org)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.traccar.client
17 |
18 | import androidx.appcompat.app.AppCompatActivity
19 | import android.os.Bundle
20 |
21 | class MainActivity : AppCompatActivity() {
22 |
23 | override fun onCreate(savedInstanceState: Bundle?) {
24 | super.onCreate(savedInstanceState)
25 | setContentView(R.layout.main)
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/app/src/google/java/org/traccar/client/PositionProviderFactory.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 - 2021 Anton Tananaev (anton@traccar.org)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.traccar.client
17 |
18 | import android.content.Context
19 | import org.traccar.client.PositionProvider.PositionListener
20 |
21 | object PositionProviderFactory {
22 |
23 | fun create(context: Context, listener: PositionListener): PositionProvider {
24 | return GooglePositionProvider(context, listener)
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/regular/java/org/traccar/client/PositionProviderFactory.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 - 2021 Anton Tananaev (anton@traccar.org)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.traccar.client
17 |
18 | import android.content.Context
19 | import org.traccar.client.PositionProvider.PositionListener
20 |
21 | object PositionProviderFactory {
22 |
23 | fun create(context: Context, listener: PositionListener): PositionProvider {
24 | return AndroidPositionProvider(context, listener)
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/test/java/org/traccar/client/DatabaseHelperTest.kt:
--------------------------------------------------------------------------------
1 | package org.traccar.client
2 |
3 | import android.location.Location
4 | import android.os.Build
5 | import androidx.test.core.app.ApplicationProvider
6 | import org.junit.Assert
7 | import org.junit.Test
8 | import org.junit.runner.RunWith
9 | import org.robolectric.RobolectricTestRunner
10 | import org.robolectric.annotation.Config
11 |
12 | @Config(sdk = [Build.VERSION_CODES.P])
13 | @RunWith(RobolectricTestRunner::class)
14 | class DatabaseHelperTest {
15 | @Test
16 | fun test() {
17 |
18 | val databaseHelper = DatabaseHelper(ApplicationProvider.getApplicationContext())
19 |
20 | var position: Position? = Position("123456789012345", Location("gps"), BatteryStatus())
21 |
22 | Assert.assertNull(databaseHelper.selectPosition())
23 |
24 | databaseHelper.insertPosition(position!!)
25 |
26 | position = databaseHelper.selectPosition()
27 |
28 | Assert.assertNotNull(position)
29 |
30 | databaseHelper.deletePosition(position!!.id)
31 |
32 | Assert.assertNull(databaseHelper.selectPosition())
33 |
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/app/src/main/res/values-lo/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | ລາວຈີພີເອສ໌ຄາຣ໌
4 | ລາວຈີພີເອສ໌ຄາຣ໌
5 | ໝາຍເລກອຸປະກອນ
6 | ຄວາມຖີ່
7 | ສະຖານະໃຊ້ງານ
8 | ເລີ່ມໃຊ້ງານ
9 | ຢຸດໃຊ້ງານ
10 | ການໃຊ້ງານໄດ້ຢຸດລົງ
11 | ການໃຊ້ງານກຳລັງທຳງານຢູ່
12 | ເຊີວິດໂຟກຣາວດ໌
13 | ເພີ່ມເຊີວິດໄພອໍຣິດຕີ້
14 | ສະຖານະ
15 | ເພີ່ມຊອດຄັດ
16 | ລົບລ້າງ
17 | ມີຂໍ້ຜິດພາດໃນການສົ່ງຂໍ້ມູນ
18 | ສະຖານທີ່ພິກັດໄດ້ອັບເດດ
19 | ການຕັ້ງຄ່າອຸປະກອນ
20 | ແອັບໂຕນີ້ໄດ້ຖືກເຊື່ອງໄວ້. ຖ້າຢາກເປີດຂຶ້ນມາອີກຄັ້ງກະລຸນາກົດໝາຍເລກ 8722227 (TRACCAR).
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/values-km/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | ម៉ាស៊ីនភ្ញៀវ Traccar
4 | Traccar
5 | ឧបករណ៍សម្គាល់ឧបករណ៍
6 | ជាញឹកញាប់
7 | ស្ថានភាពសេវា
8 | ចាប់ផ្តើម
9 | បញ្ឈប់
10 | សេវាឈប់
11 | កំពុងរត់សេវា
12 | សេវាផ្ទៃខាងមុខ
13 | បង្កើនអាទិភាពសេវា
14 | ស្ថានភាព
15 | បន្ថែមផ្លូវកាត់
16 | ដើម្បីជម្រះ
17 | ផ្ញើដោយជោគជ័យ
18 | ការផ្ញើបានបរាជ័យ
19 | ធ្វើឱ្យទាន់សម័យទីតាំង
20 | ការកំណត់ឧបករណ៍
21 | កម្មវិធីនេះត្រូវបានលាក់។ ដើម្បីបើកវាម្តងទៀតសូមចុច 8722227 (TRACCAR) ។
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/java/org/traccar/client/AutostartReceiver.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 - 2021 Anton Tananaev (anton@traccar.org)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.traccar.client
17 |
18 | import android.content.Context
19 | import android.content.Intent
20 | import androidx.preference.PreferenceManager
21 |
22 | class AutostartReceiver : WakefulBroadcastReceiver() {
23 |
24 | @Suppress("UnsafeProtectedBroadcastReceiver")
25 | override fun onReceive(context: Context, intent: Intent) {
26 | val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context)
27 | if (sharedPreferences.getBoolean(MainFragment.KEY_STATUS, false)) {
28 | startWakefulForegroundService(context, Intent(context, TrackingService::class.java))
29 | }
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/app/src/main/res/values-uk/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar Клієнт
4 | Traccar
5 | Ідентифікатор пристрою
6 | Частота
7 | Стан сервісу
8 | Старт
9 | Стоп
10 | Сервіс зупинений
11 | Сервіс працює
12 | Служба переднього плану
13 | Збільшення пріоритету обслуговування
14 | Статус
15 | Додати ярлики
16 | Очистити
17 | Успішно відправлено
18 | Відправлення невдале
19 | Оновлення розташування
20 | Налаштування пристрою
21 | Додаток було приховано. Щоб відкрити його знову наберіть 8722227 (TRACCAR).
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
6 |
10 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/java/org/traccar/client/DialLaunchReceiver.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 - 2021 Anton Tananaev (anton@traccar.org)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.traccar.client
17 |
18 | import android.content.BroadcastReceiver
19 | import android.content.Context
20 | import android.content.Intent
21 |
22 | class DialLaunchReceiver : BroadcastReceiver() {
23 |
24 | override fun onReceive(context: Context, intent: Intent) {
25 | val phoneNumber = intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER)
26 | if (phoneNumber == LAUNCHER_NUMBER) {
27 | resultData = null
28 | val appIntent = Intent(context, MainActivity::class.java)
29 | appIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
30 | context.startActivity(appIntent)
31 | }
32 | }
33 |
34 | companion object {
35 | private const val LAUNCHER_NUMBER = "8722227" // TRACCAR
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/translate.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | import os
4 | import optparse
5 | import requests
6 | import shutil
7 | from transifex.api import transifex_api
8 |
9 | parser = optparse.OptionParser()
10 | parser.add_option("-t", "--token", dest="token", help="transifex token")
11 |
12 | (options, args) = parser.parse_args()
13 |
14 | if not options.token:
15 | parser.error('Token is required')
16 |
17 | os.chdir(os.path.dirname(os.path.abspath(__file__)))
18 |
19 | path = "./app/src/main/res/"
20 |
21 | transifex_api.setup(auth=options.token)
22 |
23 | organization = transifex_api.Organization.get(slug='traccar')
24 | project = organization.fetch('projects').get(slug='traccar')
25 | resource = project.fetch('resources').get(slug='client')
26 | languages = project.fetch('languages')
27 |
28 | for language in languages:
29 | print(language.code)
30 | url = transifex_api.ResourceTranslationsAsyncDownload.download(resource=resource, language=language)
31 | result = requests.get(url)
32 | if language.code == "en":
33 | filename = path + "values/strings.xml"
34 | else:
35 | filename = path + "values-" + language.code.replace("_", "-r") + "/strings.xml"
36 | if not os.path.exists(os.path.dirname(filename)):
37 | os.makedirs(os.path.dirname(filename))
38 | with open(filename, "w") as file:
39 | file.write(result.text)
40 |
41 | filename = path + "values-iw/strings.xml"
42 | if not os.path.exists(os.path.dirname(filename)):
43 | os.makedirs(os.path.dirname(filename))
44 | shutil.copyfile(path + "values-he/strings.xml", filename)
45 |
--------------------------------------------------------------------------------
/app/src/main/res/values-si/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | ට්රැකකාර් අනුග්රාහකය
4 | ට්රැකකාර්
5 | සේවාව නවතන්න
6 | සේවාව නවතන්න
7 | උපාංගයේ හඳුන්වනය
8 | සේවාදායකයේ ඒ.ස.නි.
9 | ලුහුබැඳීමේ සේවාදායකයේ ඒ.ස.නි.
10 | සංඛ්යාතය
11 | සේවාවේ තත්වය
12 | අරඹන්න
13 | නවත්වන්න
14 | සේවාව නවතා ඇත
15 | සේවාව ධාවනය වෙමින්
16 | පෙරබිම් සේවාව
17 | සේවාවේ ප්රමුඛත්වය වැඩිකරන්න
18 | තත්වය
19 | තොරතුරු
20 | කෙටිමං එකතු කරන්න
21 | හිස් කරන්න
22 | සේවාව ඇරඹිණි
23 | සේවාව නැවතිණි
24 | සාර්ථකව යැවිණි
25 | යැවීමට අසමත් විය
26 | ස්ථානය යාවත්කාලය
27 | උපකරණ සැකසුම්
28 |
29 |
--------------------------------------------------------------------------------
/app/src/test/java/org/traccar/client/ProtocolFormatterTest.kt:
--------------------------------------------------------------------------------
1 | package org.traccar.client
2 |
3 | import android.location.Location
4 | import android.os.Build
5 | import org.junit.Assert
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 | import org.robolectric.RobolectricTestRunner
9 | import org.robolectric.annotation.Config
10 | import org.traccar.client.ProtocolFormatter.formatRequest
11 |
12 | @Config(sdk = [Build.VERSION_CODES.P])
13 | @RunWith(RobolectricTestRunner::class)
14 | class ProtocolFormatterTest {
15 |
16 | @Test
17 | fun testFormatRequest() {
18 | val position = Position("123456789012345", Location("gps"), BatteryStatus())
19 | val url = formatRequest("http://localhost:5055", position)
20 | Assert.assertEquals("http://localhost:5055?id=123456789012345×tamp=619315200&lat=0.0&lon=0.0&speed=0.0&bearing=0.0&altitude=0.0&accuracy=0.0&batt=0.0", url)
21 | }
22 |
23 | @Test
24 | fun testFormatPathPortRequest() {
25 | val position = Position("123456789012345", Location("gps"), BatteryStatus())
26 | val url = formatRequest("http://localhost:8888/path", position)
27 | Assert.assertEquals("http://localhost:8888/path?id=123456789012345×tamp=619315200&lat=0.0&lon=0.0&speed=0.0&bearing=0.0&altitude=0.0&accuracy=0.0&batt=0.0", url)
28 | }
29 |
30 | @Test
31 | fun testFormatAlarmRequest() {
32 | val position = Position("123456789012345", Location("gps"), BatteryStatus())
33 | val url = formatRequest("http://localhost:5055/path", position, "alert message")
34 | Assert.assertEquals("http://localhost:5055/path?id=123456789012345×tamp=619315200&lat=0.0&lon=0.0&speed=0.0&bearing=0.0&altitude=0.0&accuracy=0.0&batt=0.0&alarm=alert%20message", url)
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/app/src/google/java/org/traccar/client/ServiceReceiver.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 - 2021 Anton Tananaev (anton@traccar.org)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.traccar.client
17 |
18 | import android.content.BroadcastReceiver
19 | import android.content.Context
20 | import android.content.Intent
21 | import androidx.preference.PreferenceManager
22 |
23 | class ServiceReceiver : BroadcastReceiver() {
24 |
25 | override fun onReceive(context: Context, intent: Intent) {
26 | if (TrackingService.ACTION_STARTED == intent.action) {
27 | startTime = System.currentTimeMillis()
28 | } else if (startTime > 0) {
29 | updateTime(context, System.currentTimeMillis() - startTime)
30 | startTime = 0
31 | }
32 | }
33 |
34 | private fun updateTime(context: Context, duration: Long) {
35 | val preferences = PreferenceManager.getDefaultSharedPreferences(context)
36 | val totalDuration = preferences.getLong(KEY_DURATION, 0)
37 | preferences.edit().putLong(KEY_DURATION, totalDuration + duration).apply()
38 | }
39 |
40 | companion object {
41 | const val KEY_DURATION = "serviceTime"
42 | private var startTime: Long = 0
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/app/src/main/res/values-bn/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar ক্লায়েন্ট
4 | Traccar
5 | ডিভাইস সনাক্তকারী
6 | সার্ভার URL
7 | ট্র্যাকিং সার্ভার URL
8 | ফ্রিকোয়েন্সি
9 | রিপোর্টিং বিরতি - সেকেন্ডে
10 | দূরত্ব
11 | রিপোর্টিং বিরতি - মিটারে
12 | অ্যাঙ্গেল
13 | রিপোর্টিং অ্যাঙ্গেল - ডিগ্রিতে
14 | সার্ভিসের অবস্থা
15 | চালু
16 | বন্ধ
17 | সার্ভিস বন্ধ হয়েছে
18 | সার্ভিস চলমান
19 | ফোরগ্রাউন্ড সার্ভিস
20 | সার্ভিসের পূর্ববর্তিতা বৃদ্ধি
21 | অবস্থা
22 | শর্টকাট যুক্ত করা
23 | পরিষ্কার
24 | সফলভাবে পাঠান হয়েছে
25 | পাঠান ব্যর্থ হয়েছে
26 | অবস্থান আপডেট
27 | ডিভাইস সেটিংস
28 | অ্যাপ্লিকেশনটি লুকানো আছে। আবার খুলতে ডায়াল করুন 8722227 (TRACCAR)।
29 | দয়া করে একটি ভ্যালিড http:// বা https:// URL লিখুন
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/res/values-vi/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Máy khách Traccar
4 | Traccar
5 | Định danh thiết bị
6 | Đường dẫn server
7 | Đường link server giám sát
8 | Tần suất
9 | Thời gian báo cáo định kỳ tính bằng giây
10 | Khoảng cách
11 | Khoảng cách đo theo mét
12 | Góc
13 | Đơn vị tính theo độ
14 | Trạng thái dịch vụ
15 | Bắt đầu
16 | Kết thúc
17 | Dịch vụ kết thúc
18 | Dịch vụ đang hoạt động
19 | Dịch vụ chạy nổi
20 | Tăng thứ tự ưu tiên dịch vụ
21 | Trạng thái
22 | Thêm phím tắt
23 | Xóa
24 | Gửi thành công
25 | Gửi lỗi
26 | Vị trí đã được cập nhật
27 | Cài đặt thiết bị
28 | Ứng dụng đã được ẩn. Để mở lại xin vui lòng gọi 8722227 (TRACCAR).
29 | Vui lòng nhập đường dẫn hợp lệ http:// hoặc https://
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/shortcuts.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
16 |
19 |
20 |
21 |
22 |
27 |
31 |
34 |
35 |
36 |
37 |
42 |
46 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/app/src/main/java/org/traccar/client/MainApplication.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 - 2021 Anton Tananaev (anton@traccar.org)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.traccar.client
17 |
18 | import androidx.multidex.MultiDexApplication
19 | import android.annotation.TargetApi
20 | import android.app.NotificationChannel
21 | import android.app.NotificationManager
22 | import android.app.Notification
23 | import android.graphics.Color
24 | import android.os.Build
25 | import android.app.Activity
26 |
27 | open class MainApplication : MultiDexApplication() {
28 |
29 | override fun onCreate() {
30 | super.onCreate()
31 | System.setProperty("http.keepAliveDuration", (30 * 60 * 1000).toString())
32 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
33 | registerChannel()
34 | }
35 | }
36 |
37 | @TargetApi(Build.VERSION_CODES.O)
38 | private fun registerChannel() {
39 | val channel = NotificationChannel(
40 | PRIMARY_CHANNEL, getString(R.string.channel_default), NotificationManager.IMPORTANCE_LOW
41 | )
42 | channel.lightColor = Color.GREEN
43 | channel.lockscreenVisibility = Notification.VISIBILITY_SECRET
44 | (getSystemService(NOTIFICATION_SERVICE) as NotificationManager).createNotificationChannel(channel)
45 | }
46 |
47 | open fun handleRatingFlow(activity: Activity) {}
48 |
49 | companion object {
50 | const val PRIMARY_CHANNEL = "default"
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/app/src/main/java/org/traccar/client/ProtocolFormatter.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012 - 2021 Anton Tananaev (anton@traccar.org)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.traccar.client
17 |
18 | import android.net.Uri
19 |
20 | object ProtocolFormatter {
21 |
22 | fun formatRequest(url: String, position: Position, alarm: String? = null): String {
23 | val serverUrl = Uri.parse(url)
24 | val builder = serverUrl.buildUpon()
25 | .appendQueryParameter("id", position.deviceId)
26 | .appendQueryParameter("timestamp", (position.time.time / 1000).toString())
27 | .appendQueryParameter("lat", position.latitude.toString())
28 | .appendQueryParameter("lon", position.longitude.toString())
29 | .appendQueryParameter("speed", position.speed.toString())
30 | .appendQueryParameter("bearing", position.course.toString())
31 | .appendQueryParameter("altitude", position.altitude.toString())
32 | .appendQueryParameter("accuracy", position.accuracy.toString())
33 | .appendQueryParameter("batt", position.battery.toString())
34 | if (position.charging) {
35 | builder.appendQueryParameter("charge", position.charging.toString())
36 | }
37 | if (position.mock) {
38 | builder.appendQueryParameter("mock", position.mock.toString())
39 | }
40 | if (alarm != null) {
41 | builder.appendQueryParameter("alarm", alarm)
42 | }
43 | return builder.build().toString()
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/app/src/main/res/values-zh/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar定位端
4 | Traccar
5 | 开始服务
6 | 停止服务
7 | 发送SOS
8 | 主通道
9 | 设备编码
10 | 服务器地址
11 | 服务地址
12 | 定位频率(秒)
13 | 报告间隔(秒)
14 | 距离
15 | 报告距离(米)
16 | 角度
17 | 报告角度(度)
18 | 定位
19 | 开始
20 | 停止
21 | 服务已停止
22 | 服务运行中
23 | 位置精度
24 | 期望位置精度
25 | 高
26 | 中
27 | 低
28 | 前台服务
29 | 提高服务优先级
30 | 定位状态
31 | 添加图标
32 | 清除
33 | 服务已开始
34 | 服务已停止
35 | 发送成功
36 | 发送失败
37 | 位置更新
38 | 网络在线
39 | 网络离线
40 | 设备设置
41 | APP已隐藏,请拨号8722227重新打开
42 | 请输入有效的地址,如http://或https://
43 |
44 |
--------------------------------------------------------------------------------
/app/src/main/java/org/traccar/client/NetworkManager.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 - 2021 Anton Tananaev (anton@traccar.org)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @file:Suppress("DEPRECATION")
17 | package org.traccar.client
18 |
19 | import android.content.BroadcastReceiver
20 | import android.content.Context
21 | import android.content.Intent
22 | import android.content.IntentFilter
23 | import android.net.ConnectivityManager
24 | import android.util.Log
25 |
26 | class NetworkManager(private val context: Context, private val handler: NetworkHandler?) : BroadcastReceiver() {
27 |
28 | private val connectivityManager = context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
29 |
30 | interface NetworkHandler {
31 | fun onNetworkUpdate(isOnline: Boolean)
32 | }
33 |
34 | val isOnline: Boolean
35 | get() {
36 | val activeNetwork = connectivityManager.activeNetworkInfo
37 | return activeNetwork != null && activeNetwork.isConnectedOrConnecting
38 | }
39 |
40 | fun start() {
41 | val filter = IntentFilter()
42 | filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION)
43 | context.registerReceiver(this, filter)
44 | }
45 |
46 | fun stop() {
47 | context.unregisterReceiver(this)
48 | }
49 |
50 | override fun onReceive(context: Context, intent: Intent) {
51 | if (intent.action == ConnectivityManager.CONNECTIVITY_ACTION && handler != null) {
52 | val isOnline = isOnline
53 | Log.i(TAG, "network " + if (isOnline) "on" else "off")
54 | handler.onNetworkUpdate(isOnline)
55 | }
56 | }
57 |
58 | companion object {
59 | private val TAG = NetworkManager::class.java.simpleName
60 | }
61 |
62 | }
63 |
--------------------------------------------------------------------------------
/app/src/main/res/values-ko/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar 클라이언트
4 | Traccar
5 | 서비스 시작
6 | 서비스 중지
7 | SOS 신호 보내기
8 | 기본 채널
9 | 장치 식별자
10 | 서버 URL
11 | 위치 수집 서버 URL
12 | 주기
13 | 위치 수집 주기 (초)
14 | 거리
15 | 최소 위치 수집 기준 거리 (m)
16 | 각도
17 | 최소 위치 수집 기준 회전 각도
18 | 서비스상태
19 | 시작
20 | 중지
21 | 서비스중지
22 | 서비스실행
23 | 위치 정확도
24 | 위치 수신 정확도
25 | 높음
26 | 중간
27 | 낮음
28 | 선처리 서비스
29 | 서비스우선순위증가
30 | 상태
31 | 바로가기 추가
32 | 지우기
33 | 서비스 시작됨
34 | 서비스 중지됨
35 | 위치 송신 성공
36 | 위치 송신 실패
37 | 위치 업데이트됨
38 | 네트워크 연결됨
39 | 네트워크 연결 불가
40 | 장치설정
41 | 앱이 숨겨져 있습니다. 다시 열려면 8722227 (TRACCAR)로 전화하십시오.
42 | 올바른 http:// 또는 https:// 형태의 URL 주소를 넣어주세요
43 |
44 |
--------------------------------------------------------------------------------
/.github/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Traccar
2 |
3 | Please make sure you read this guide before commenting on any issue or creating a new issue or pull request.
4 |
5 | Before asking anything, please search for an answer in:
6 |
7 | - [Traccar documentation](https://www.traccar.org/documentation/)
8 | - [Traccar forums](https://www.traccar.org/forums/)
9 | - Relevant repositories (see below)
10 | - [Google Search](https://www.google.com/)
11 |
12 | GitHub issues should be used ONLY for feature requests, code discussions and bug reports. For general discussions please use [Traccar forums](https://www.traccar.org/forums/).
13 |
14 | There are multiple Traccar projects. If you create a new issue you MUST do it in the relevant repository:
15 |
16 | - [Traccar Server](https://github.com/tananaev/traccar/issues)
17 | - [Traccar Web Interface](https://github.com/tananaev/traccar-web/issues)
18 | - [Traccar Client for Android](https://github.com/tananaev/traccar-client-android/issues)
19 | - [Traccar Client for iOS](https://github.com/tananaev/traccar-client-ios/issues)
20 | - [Traccar Manager for Android](https://github.com/tananaev/traccar-manager-android/issues)
21 | - [Traccar Manager for iOS](https://github.com/tananaev/traccar-manager-ios/issues)
22 |
23 | If you are not sure where your issue belongs to, please use Traccar Server main repository.
24 |
25 | If you want to discuss something that applies to both Android and iOS apps, please use Android repository.
26 |
27 | ## Bug Reports
28 |
29 | Before creating a bug report make sure that you have tested latest official release with default configuration.
30 |
31 | Only create a bug report issue if you are confident that there is a problem in Traccar software.
32 |
33 | Provide as much details as possible, including log fragments, operating system and hardware information.
34 |
35 | ## Feature Requests
36 |
37 | Before creating a feature request make sure that the feature or modification that you are requesting is not yet implemented.
38 |
39 | Search reposiroty to ensure that there is no existing issues for your request. If there is, add a new comment on that issue.
40 |
41 | Provide as much details as possible, including use case for your feature and any benefits that you can think of.
42 |
43 | ## Pull Requests
44 |
45 | If you want to contribute some code to Traccar, it is recommended to discuss your solution with maintainers before starting any work.
46 |
47 | Any code that you want to contribute must be of high quality and follow existing code patterns and styles.
48 |
--------------------------------------------------------------------------------
/app/src/main/java/org/traccar/client/RequestManager.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 - 2021 Anton Tananaev (anton@traccar.org)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @file:Suppress("DEPRECATION")
17 | package org.traccar.client
18 |
19 | import android.os.AsyncTask
20 | import android.util.Log
21 | import java.io.IOException
22 | import java.io.InputStream
23 | import java.net.HttpURLConnection
24 | import java.net.URL
25 |
26 | object RequestManager {
27 |
28 | private const val TIMEOUT = 15 * 1000
29 |
30 | fun sendRequest(request: String?): Boolean {
31 | var inputStream: InputStream? = null
32 | return try {
33 | val url = URL(request)
34 | val connection = url.openConnection() as HttpURLConnection
35 | connection.readTimeout = TIMEOUT
36 | connection.connectTimeout = TIMEOUT
37 | connection.requestMethod = "POST"
38 | connection.connect()
39 | inputStream = connection.inputStream
40 | while (inputStream.read() != -1) {}
41 | true
42 | } catch (error: IOException) {
43 | false
44 | } finally {
45 | try {
46 | inputStream?.close()
47 | } catch (secondError: IOException) {
48 | Log.w(RequestManager::class.java.simpleName, secondError)
49 | }
50 | }
51 | }
52 |
53 | fun sendRequestAsync(request: String, handler: RequestHandler) {
54 | RequestAsyncTask(handler).execute(request)
55 | }
56 |
57 | interface RequestHandler {
58 | fun onComplete(success: Boolean)
59 | }
60 |
61 | private class RequestAsyncTask(private val handler: RequestHandler) : AsyncTask() {
62 |
63 | override fun doInBackground(vararg request: String): Boolean {
64 | return sendRequest(request[0])
65 | }
66 |
67 | override fun onPostExecute(result: Boolean) {
68 | handler.onComplete(result)
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/app/src/main/java/org/traccar/client/Position.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 - 2022 Anton Tananaev (anton@traccar.org)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.traccar.client
17 |
18 | import android.location.Location
19 | import android.location.LocationManager
20 | import android.os.Build
21 | import java.util.*
22 |
23 | data class Position(
24 | val id: Long = 0,
25 | val deviceId: String,
26 | val time: Date,
27 | val latitude: Double = 0.0,
28 | val longitude: Double = 0.0,
29 | val altitude: Double = 0.0,
30 | val speed: Double = 0.0,
31 | val course: Double = 0.0,
32 | val accuracy: Double = 0.0,
33 | val battery: Double = 0.0,
34 | val charging: Boolean = false,
35 | val mock: Boolean = false,
36 | ) {
37 |
38 | constructor(deviceId: String, location: Location, battery: BatteryStatus) : this(
39 | deviceId = deviceId,
40 | time = Date(location.time.correctRollover()),
41 | latitude = location.latitude,
42 | longitude = location.longitude,
43 | altitude = location.altitude,
44 | speed = location.speed * 1.943844, // speed in knots
45 | course = location.bearing.toDouble(),
46 | accuracy = if (location.provider != null && location.provider != LocationManager.GPS_PROVIDER) {
47 | location.accuracy.toDouble()
48 | } else {
49 | 0.0
50 | },
51 | battery = battery.level,
52 | charging = battery.charging,
53 | mock = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
54 | location.isMock
55 | } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
56 | @Suppress("DEPRECATION")
57 | location.isFromMockProvider
58 | } else {
59 | false
60 | },
61 | )
62 | }
63 |
64 | private const val rolloverDate = 1554508800000L // April 6, 2019
65 | private const val rolloverOffset = 619315200000L // 1024 weeks
66 |
67 | private fun Long.correctRollover(): Long {
68 | return if (this < rolloverDate) this + rolloverOffset else this
69 | }
70 |
--------------------------------------------------------------------------------
/app/src/main/res/values-he/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar לאנדרויד
4 | Traccar
5 | הפעל שירות
6 | עצור תהליך
7 | שלח הודעת חירום
8 | ערוץ ראשי
9 | מזהה מכשיר
10 | כתובת שרת
11 | כתובת שרת איתור
12 | תדירות
13 | זמן דיווח בשניות
14 | מרחק
15 | דיווח מרחק במטרים
16 | זווית
17 | דיווח פניות בזווית
18 | מצב שירות
19 | הפעל
20 | עצור
21 | השירות הופסק
22 | השירות פועל
23 | דיוק מיקום
24 | דיוק מיקום מבוקש
25 | מדוייק
26 | בינוני
27 | נמוך - משתמש רק בGPS של המכשיר
28 | אפשר הפעלה ברקע
29 | הגדל את עדיפות התוכנה
30 | סטטוס
31 | הוסף קיצור דרך
32 | נקה
33 | אפליקציה הופעלה
34 | אפליקציה הופסקה
35 | נשלח בהצלחה
36 | שליחה נכשלה
37 | עדכון מיקום
38 | רשת באונליין
39 | רשת מנותקת
40 | הגדרות המכשיר
41 | האפליקציה הוסתרה. כדי לפתוח אותה שוב חייג בטלפון 8722227 (TRACCAR).
42 | הזן כתובת חוקית http:// או https:// URL
43 |
44 |
--------------------------------------------------------------------------------
/app/src/main/res/values-iw/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar לאנדרויד
4 | Traccar
5 | הפעל שירות
6 | עצור תהליך
7 | שלח הודעת חירום
8 | ערוץ ראשי
9 | מזהה מכשיר
10 | כתובת שרת
11 | כתובת שרת איתור
12 | תדירות
13 | זמן דיווח בשניות
14 | מרחק
15 | דיווח מרחק במטרים
16 | זווית
17 | דיווח פניות בזווית
18 | מצב שירות
19 | הפעל
20 | עצור
21 | השירות הופסק
22 | השירות פועל
23 | דיוק מיקום
24 | דיוק מיקום מבוקש
25 | מדוייק
26 | בינוני
27 | נמוך - משתמש רק בGPS של המכשיר
28 | אפשר הפעלה ברקע
29 | הגדל את עדיפות התוכנה
30 | סטטוס
31 | הוסף קיצור דרך
32 | נקה
33 | אפליקציה הופעלה
34 | אפליקציה הופסקה
35 | נשלח בהצלחה
36 | שליחה נכשלה
37 | עדכון מיקום
38 | רשת באונליין
39 | רשת מנותקת
40 | הגדרות המכשיר
41 | האפליקציה הוסתרה. כדי לפתוח אותה שוב חייג בטלפון 8722227 (TRACCAR).
42 | הזן כתובת חוקית http:// או https:// URL
43 |
44 |
--------------------------------------------------------------------------------
/app/src/main/res/values-ja/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar クライアント
4 | Traccar
5 | サービスを開始
6 | サービスを停止
7 | SOSを送信
8 | プライマリーチャンネル
9 | デバイス ID
10 | サーバー URL
11 | トラッキングサーバーの URL
12 | 周期
13 | 報告間隔(秒)
14 | 距離
15 | 報告距離(m)
16 | 角度
17 | 報告角度(度)
18 | サービスステータス
19 | 開始
20 | 停止
21 | サービス停止中
22 | サービス実行中
23 | オフラインバッファリング
24 | バッファリング オフ
25 | バッファリング オン
26 | 位置情報の精度
27 | 要求される位置情報の精度
28 | 高
29 | 中
30 | 低
31 | フォアグラウンドサービス
32 | サービス優先度を上げる
33 | ステータス
34 | ショートカットを追加
35 | クリア
36 | サービスを開始しました
37 | サービスを停止しました
38 | 送信に成功しました
39 | 送信に失敗しました
40 | 位置情報更新
41 | ネットワーク オンライン
42 | ネットワーク オフライン
43 | デバイス設定
44 | アプリは非表示になりました。 もう一度開くには 8722227 (TRACCAR) にダイヤルしてください。
45 | http:// または https:// から始まるURL を正しく入力してください。
46 |
47 |
--------------------------------------------------------------------------------
/app/src/main/res/values-fa/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | ردیاب Traccar
4 | ردیاب Traccar
5 | شروع کار
6 | توقف کار
7 | ارسال پیام اضطراری
8 | شبکه اولیه
9 | کد هویت دستگاه
10 | مسیر آدرس سرور
11 | مسیر آدرس سرور مسیریاب
12 | تاخیر ارسال
13 | فاصله گزارش دهی بر حسب ثانیه
14 | فاصله
15 | گزارش فاصله / متر
16 | زاویه
17 | گزارش زاویه / درجه
18 | وضعیت سرویس
19 | شروع
20 | توقف
21 | سرویس متوقف است
22 | سرویس در حال کار است
23 | دقت مکان
24 | دقت مکان دلخواه
25 | زیاد
26 | متوسط
27 | کم
28 | سرویس پیش زمینه
29 | افزایش اولویت سرویس
30 | وضعیت
31 | ایجاد میانبر
32 | پاک کردن
33 | کار شروع شد
34 | کار متوقف شد
35 | ارسال موفق
36 | ارسال ناموفق
37 | به روز رسانی مکان
38 | شبکه آنلاین
39 | شبکه آفلاین
40 | تنظیمات دستگاه
41 | نرم افزار مخفی است . جهت نمایش آن با این شماره تماس بگیرید.
42 | 8722227 (Traccar)
43 | لطفا آدرس معتبر که با http:// یا https:// شروع میشود را وارد نمایید
44 |
45 |
--------------------------------------------------------------------------------
/app/src/main/res/values-hi/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | ट्रैक्कार क्लाइंट
4 | ट्रैक्कार
5 | प्रारंभ
6 | रोक
7 | मुसीबत का इशारा
8 | डिफ़ॉल्ट
9 | उपकरण पहचानकर्ता
10 | यूआरएल शीर्षक
11 | यूआरएल सारांश
12 | फ्रीक्वेंसी / आवृत्ति
13 | अंतराल सारांश
14 | दूरी शीर्षक
15 | दूरी सारांश
16 | कोण शीर्षक
17 | कोण सारांश
18 | सेवा की स्थिति
19 | आरम्भ
20 | रोकें
21 | सेवा रुक गई है
22 | सेवा चल रही है
23 | सटीकता शीर्षक
24 | सटीकता सारांश
25 | सटीकता उच्च
26 | सटीकता माध्यम
27 | सटीकता कम
28 | अग्रभूमि शीर्षका
29 | अग्रभूमि सारांश
30 | स्थिति
31 | शॉर्टकट्स जोड़ें
32 | स्पष्ट / साफ़
33 | सेवा बनाएँ
34 | सेवा नष्ट
35 | सफलता भेजें
36 | भेजना विफल हो गया है
37 | जगह / स्थान / स्तिथि का अद्यतन / ताजी जानकारी
38 | नेटवर्क ऑनलाइन
39 | नेटवर्क ऑफ़लाइन
40 | उपकरण की सेटिंग्स
41 | एप्लिकेशन को छुपा दिया गया है l इसे फिर से खोलने के लिए डायल करें 8722227 ( TRACCAR ) l
42 | अवैध यूआरएल त्रुटि संदेश
43 |
44 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/preferences.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
13 |
16 |
17 |
22 |
23 |
30 |
31 |
37 |
38 |
44 |
45 |
51 |
52 |
58 |
59 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/app/src/main/res/values-az/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar müştəri
4 | Traccar
5 | xidmətə başla
6 | xidmət dayandırmaq
7 | sos göndərin
8 | əsas kanal
9 | Qurğu identifikatoru
10 | Server URL
11 | Tracking server URL
12 | Frequency
13 | Saniyə cədvəlləri bildirir
14 | Məsafə
15 | Metr ölçən məsafə
16 | Angle
17 | Dərəcə dərəcəsi hesabat
18 | Xidmət vəziyyəti
19 | Başlamaq
20 | Dur
21 | Xidmət dayandı
22 | Xidmət davam edir
23 | Yer dəqiqliyi
24 | İstədiyiniz yer dəqiqliyi
25 | Yüksək
26 | Orta
27 | Aşağı
28 | Ön xidməti
29 | Xidmət prioritetini artırın
30 | vəziyyət
31 | Qısa yollar əlavə edin
32 | Aydındır
33 | Xidmət başladı
34 | Xidmət dayandı
35 | Uğurla göndərin
36 | Göndərmə uğursuz oldu
37 | Yer yeniləmə
38 | Şəbəkə online
39 | Şəbəkə offline
40 | Qurğu Ayarları
41 | The app has been hidden. To open it again please dial 8722227 (TRACCAR).
42 | Please enter a valid http:// or https:// URL
43 |
44 |
--------------------------------------------------------------------------------
/app/src/main/res/values-id/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar Client
4 | Traccar
5 | Mulai Layanan
6 | Tutup Layanan
7 | Kirim SOS
8 | Jalur Utama
9 | Pengindentifikasi Perangkat
10 | URL Server
11 | URL Server Pelacak
12 | Frekuensi
13 | Selang Waktu Laporan Dalam Detik
14 | Jarak
15 | Pelaporan Jarak Dalam Meter
16 | Sudut
17 | Pelaporan Sudut Dalam Derajat
18 | Status Service
19 | Mulai
20 | Berhenti
21 | Service Berhenti
22 | Service Aktif
23 | Ketepatan Lokasi
24 | Ketepatan Lokasi Yg Dinginkan
25 | Tinggi
26 | Tengah
27 | Rendah
28 | Service Depan
29 | TIngkatkan Prioritas Service
30 | Status
31 | Tambah Jalan Pintas
32 | Bersihkan
33 | Layanan Dimulai
34 | Layanan Berhenti
35 | Sukses Terkirim
36 | Gagal Terkirim
37 | Lokasi Terbaru
38 | Jaringan Hidup
39 | Jaringan Mati
40 | Pengaturan Perangkat
41 | Aplikasi Telah Tersembunyi. Untuk Membuka Lagi Silahkan Tekan 8722227 (TRACCAR).
42 | Tolong Masukan http:// atau https:// URL Yang Benar
43 |
44 |
--------------------------------------------------------------------------------
/app/src/main/res/values-sk/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar Manager
4 | Traccar
5 | Spustiť službu
6 | Zastaviť službu
7 | Poslať SOS
8 | Primárny kanál
9 | Identifikátor zariadenia
10 | URL server
11 | Sledovanie URL serveru
12 | Frekvencia
13 | Interval odosielania v sekundách
14 | Vzdialenosť
15 | Interval vzdialenosti v metroch
16 | Uhol
17 | Interval natočenia v stupňoch
18 | Stav služby
19 | Štart
20 | Stop
21 | Služba sa zastavila
22 | Služba beží
23 | Presnosť lokalizácie
24 | Požadovaná presnosť lokalizácie
25 | Vysoká
26 | Stredná
27 | Nízka
28 | Služba v popredí
29 | Zvýšiť prioritu servis
30 | Status
31 | Pridanie skratiek
32 | Vyčistiť
33 | Služba spustená
34 | Služba zastavená
35 | Úspešne poslané
36 | Odoslanie zlyhalo
37 | Aktualizácia polohy
38 | Sieť online
39 | Sieť offline
40 | Nastavenie zariadenia
41 | Aplikácia bola skrytá. Pre opätovné otvorenie znova vytočte 8722227 (TRACCAR).
42 | Prosím zadajte validné http:// alebo https:// URL
43 |
44 |
--------------------------------------------------------------------------------
/app/src/main/res/values-tr/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar Yönetim
4 | Traccar
5 | Servisi Başlat
6 | Servisi Durdur
7 | Yardım Çağrısı Gönder
8 | Birincil Kanal
9 | Cihaz Kimliği
10 | Sunucu adresi
11 | Takip sunucusu adresi
12 | Sıklık
13 | Saniye cinsinden bildirim döngüsü
14 | Mesafe
15 | Metre cinsinden mesafe bildirimi
16 | Açı
17 | Derece cinsinden açı bildirimi
18 | Servis Durumu
19 | Başlat
20 | Durdur
21 | Servis Durdu
22 | Servis Çalışıyor
23 | Yer Doğruluğu
24 | İstenilen Yer Doğruluğu
25 | Yüksek
26 | Orta
27 | Alçak
28 | Önplan servisi
29 | Servis önceliği arttır
30 | Durum
31 | Kısayol ekle
32 | Temizle
33 | Servis Başlatıldı
34 | Servis Durduruldu
35 | Gönderme başarılı
36 | Gönderme başarısız
37 | Yer güncellendi
38 | Ağa Bağlandı
39 | Ağ Bağlantısı Kesildi
40 | Cihaz Ayarları
41 | Bu uygulama arkaplanda gizli olarak çalışmaktadır. Tekrar görmek için lütfen 8722227 tuşlayın. Arayın. (TRACCAR)
42 | Lütfen geçerli bir adres girin http:// veya https://
43 |
44 |
--------------------------------------------------------------------------------
/app/src/main/res/values-bg/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar клиент
4 | Traccar
5 | Стартирай услугата
6 | Спри услугата
7 | Изпрати SOS
8 | Основен канал
9 | Идентификатор
10 | Адрес на сървъра
11 | Адрес на проследяващият сървър
12 | Честота
13 | Докладван интервал в сек.
14 | Разстояние
15 | Докладвано разстояние в метри
16 | Ъгъл
17 | Докладван ъгъл в градуси
18 | Състояние на услугата
19 | Старт
20 | Стоп
21 | Услугата е спряна
22 | Услугата работи
23 | Точност на местоположението
24 | Желана точност на местоположението
25 | Висока
26 | Средна
27 | Ниска
28 | Foreground service
29 | Увеличаване на приоритета на услугата
30 | Състояние
31 | Добави пряк път
32 | Изтрий
33 | Услугата стартира
34 | Услугата спряна
35 | Успешно изпращане
36 | Грешка в изпращането
37 | Местоположението е обновено
38 | Има връзка с мрежата
39 | Няма връзка с мрежа
40 | Настройки
41 | Приложението е скрито. За да го отворите отново, моля наберете 8722227 (TRACCAR).
42 | Моля въведете валиден адрес
43 |
44 |
--------------------------------------------------------------------------------
/app/src/main/res/values-ro/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Client Traccar
4 | Traccar
5 | Porneste Serviciu
6 | Opreste serviciu
7 | Trimite SOS
8 | Canal Principal
9 | Identificare dispozitiv
10 | Adresa server
11 | Adresa serverului de localizare
12 | Frecvenţă
13 | Interval de raportare in secunde
14 | Distanta
15 | Distanta de raportare in metri
16 | Unghi
17 | Unghi de raportare in grade
18 | Status service
19 | Pornit
20 | Oprit
21 | Serviciu Oprit
22 | Serviciul rulează
23 | Acuratete localizare
24 | Acuratete dorita pentru localizare
25 | Inalt
26 | Mediu
27 | Jos
28 | Serviciul prim-plan
29 | Creştere prioritate serviciu
30 | Stare
31 | Adăugare scurtătură
32 | Golire
33 | Serviciu pornit
34 | Serviciu oprit
35 | Expediat
36 | Trimitere eşuată
37 | Actualizare locaţie
38 | Retea pornita
39 | Retea oprita
40 | Setări Dispozitiv
41 | Aplicaţia este ascunsă. Pentru deschidere vă rugam apelaţi numărul de telefon 8722227 (TRACCAR).
42 | Introduceti o adresa valida http:// sau https://
43 |
44 |
--------------------------------------------------------------------------------
/app/src/main/res/values-ta/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | ட்ரக்கர் பணி செயலி
4 | ட்ரக்கர்
5 | செயலை துவக்கு
6 | செயலை நிறுத்து
7 | அவசர உதவி
8 | முதன்மை அலைவரிசை
9 | சாதன அடையாளங்காட்டி
10 | கணனி பகிர்வான் முகவரி
11 | கண்காணிப்பு சர்வர் முகவரி
12 | இடைவெளி நொடிகள்
13 | கண்காணிப்பு இடைவெளி நொடிகளில்
14 | தூரம்
15 | மீட்டர் தொலைவில் அறிக்கை
16 | கோணம்
17 | டிகிரிகளில் கோண அறிக்கை
18 | சேவை நிலை
19 | துவக்கு
20 | நிறுத்து
21 | சேவை நிறுத்தப்பட்டது
22 | சேவை இயங்குகிறது
23 | இடம் துல்லியம்
24 | விரும்பிய இடம் துல்லியம்
25 | உயர்
26 | நடுத்தர
27 | குறைந்த
28 | பின்னணி சேவை
29 | சேவை முன்னுரிமை அதிகரிக்க
30 | நிலை
31 | குறுக்குவழி சேர்க்க
32 | அழிக்கவும்
33 | சேவை துவங்கியது
34 | சேவை நிறுத்தப்பட்டது
35 | வெற்றிகரமாக அனுப்பப்பட்டது
36 | தகவல் அனுப்புதல் தோல்வியுற்றது
37 | இடம் மேம்படுத்தல்
38 | வலைத்தொடர்பு உயிர்ப்பு
39 | வலைத்தொடர்பு துண்டிப்பு
40 | சாதன அமைப்புகள்
41 | செயலி மறைக்கப்பட்டுள்ளது. அதை காண பின்வரும் எண்ணை அழைக்கவும் 8722227 ( ட்ரக்கர் )
42 | சரியான http: // அல்லது https: // URL ஐ உள்ளிடுக
43 |
44 |
--------------------------------------------------------------------------------
/app/src/main/res/values-sl/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar klient
4 | Traccar
5 | Zaženi storitev
6 | Ustavi storitev
7 | Pošlji SOS
8 | Glavni kanal
9 | Identifikator naprave
10 | URL strežnika
11 | ULR naslov strežnika za sledenje
12 | Frekvenca
13 | Pogostost pošiljanja v sekundah
14 | Razdalja
15 | Razdalja med pošiljanji v metrih
16 | Kot
17 | Kot med pošiljanji v stopinjah
18 | Stanje storitve
19 | Zaženi
20 | Ustavi
21 | Storitev ustavljena
22 | Storitev zagnana
23 | Natančnost lokacije
24 | Željena natančnost lokacije
25 | Visoka
26 | Srednja
27 | Nizka
28 | Storitev v ospredju
29 | Povečaj prioriteto storitve
30 | Stanje
31 | Dodaj bližnjice
32 | Počisti
33 | Storitev zagnana
34 | Storitev ustavljena
35 | Pošiljanje uspelo
36 | Pošiljanje spodletelo
37 | Posodobitev lokacije
38 | Mrežna povezava vzpostavljena
39 | Ni mrežne povezave
40 | Nastavitve naprave
41 | Aplikacija je bila skrita. Za njen ponoven prikaz pokličite telefonsko številko 8722227 (TRACCAR).
42 | Prosim vpišite veljaven http:// ali https:// naslov
43 |
44 |
--------------------------------------------------------------------------------
/app/src/main/res/values-lt/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar programėlė
4 | Traccar
5 | Įjungti servisą
6 | Sustabdyti servisą
7 | Siųsti SOS
8 | Pirminis kanalas
9 | Įrenginio numeris
10 | Serverio URL
11 | Sekimo serverio URL
12 | Dažnumas
13 | Atnaujinimo intervalas sekundėmis
14 | Atstumas
15 | Atnaujinimo atstumas metrais
16 | Kampas
17 | Atnaujinimo kampas laipsniais
18 | Tarnybos būklė
19 | Pradėti
20 | Stabdyti
21 | Tarnyba sustabdyta
22 | Tarnyba veikia
23 | Pozicijos tikslumas
24 | Norimas pozicijos tikslumas
25 | Aukštas
26 | Vidutinis
27 | Žemas
28 | Žeminti tarnybos prioritetą
29 | Padidinti tarnybos prioritetą
30 | Būklė
31 | Pridėti nuorodas
32 | Valyti
33 | Servisas pradėtas
34 | Servisas sustabdytas
35 | Išsiųsta sėkmingai
36 | Klaida siunčiant
37 | Vietos nusatymo duomenų atnaujinimas
38 | Prisijungęs prie tinklo
39 | Atsijungęs nuo tinklo
40 | Įrenginio nustatymai
41 | Ši programėlė veikia paslėptu režimu. Norint ją atidaryti, prašau skambinti numeriu 8722227 (TRACCAR)
42 | Įveskite tinkamą http:// ar https:// URL
43 |
44 |
--------------------------------------------------------------------------------
/app/src/main/java/org/traccar/client/WakefulBroadcastReceiver.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Anton Tananaev (anton@traccar.org)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.traccar.client
17 |
18 | import android.content.BroadcastReceiver
19 | import android.content.Context
20 | import android.util.SparseArray
21 | import android.os.PowerManager.WakeLock
22 | import android.content.Intent
23 | import androidx.core.content.ContextCompat
24 | import android.os.PowerManager
25 |
26 | abstract class WakefulBroadcastReceiver : BroadcastReceiver() {
27 |
28 | companion object {
29 |
30 | private const val EXTRA_WAKE_LOCK_ID = "android.support.content.wakelockid"
31 | private val activeWakeLocks = SparseArray()
32 | private var nextId = 1
33 |
34 | fun startWakefulForegroundService(context: Context, intent: Intent) {
35 | synchronized(activeWakeLocks) {
36 | val id = nextId
37 | nextId += 1
38 | if (nextId <= 0) {
39 | nextId = 1
40 | }
41 | intent.putExtra(EXTRA_WAKE_LOCK_ID, id)
42 | ContextCompat.startForegroundService(context, intent)
43 | val powerManager = context.getSystemService(Context.POWER_SERVICE) as PowerManager
44 | val wakeLock = powerManager.newWakeLock(
45 | PowerManager.PARTIAL_WAKE_LOCK,
46 | WakefulBroadcastReceiver::class.java.simpleName
47 | )
48 | wakeLock.setReferenceCounted(false)
49 | wakeLock.acquire((60 * 1000).toLong())
50 | activeWakeLocks.put(id, wakeLock)
51 | }
52 | }
53 |
54 | fun completeWakefulIntent(intent: Intent?): Boolean {
55 | val id = intent?.getIntExtra(EXTRA_WAKE_LOCK_ID, 0) ?: 0
56 | if (id == 0) {
57 | return false
58 | }
59 | synchronized(activeWakeLocks) {
60 | val wakeLock = activeWakeLocks[id]
61 | if (wakeLock != null) {
62 | wakeLock.release()
63 | activeWakeLocks.remove(id)
64 | return true
65 | }
66 | return true
67 | }
68 | }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.android.application'
3 | id 'kotlin-android'
4 | id 'com.google.gms.google-services'
5 | id 'com.google.firebase.crashlytics'
6 | }
7 |
8 | android {
9 | compileSdk 35
10 | defaultConfig {
11 | applicationId 'org.traccar.client'
12 | minSdkVersion 21
13 | targetSdkVersion 35
14 | versionCode 90
15 | versionName '7.9'
16 | multiDexEnabled true
17 | }
18 | namespace 'org.traccar.client'
19 |
20 | packagingOptions {
21 | resources {
22 | excludes += ['META-INF/DEPENDENCIES']
23 | }
24 | }
25 |
26 | buildFeatures {
27 | flavorDimensions = ['default']
28 | }
29 | productFlavors {
30 | regular {
31 | isDefault = true
32 | ext.enableCrashlytics = false
33 | }
34 | google
35 | }
36 |
37 | testOptions {
38 | unitTests {
39 | includeAndroidResources = true
40 | }
41 | }
42 | lint {
43 | checkReleaseBuilds false
44 | }
45 |
46 | compileOptions {
47 | sourceCompatibility = JavaVersion.VERSION_17
48 | targetCompatibility = JavaVersion.VERSION_17
49 | }
50 |
51 | kotlinOptions {
52 | jvmTarget = JavaVersion.VERSION_17.toString()
53 | }
54 | }
55 |
56 | dependencies {
57 | implementation 'com.google.android.material:material:1.12.0'
58 | implementation 'androidx.multidex:multidex:2.0.1'
59 | implementation 'androidx.preference:preference-ktx:1.2.1'
60 | implementation 'androidx.core:core-ktx:1.16.0'
61 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
62 | implementation 'com.github.judemanutd:autostarter:1.1.0'
63 | implementation('dev.doubledot.doki:library:0.0.1@aar') {
64 | transitive = true
65 | }
66 | testImplementation 'androidx.test:core:1.6.1'
67 | testImplementation 'junit:junit:4.13.2'
68 | testImplementation 'org.robolectric:robolectric:4.7.3'
69 | googleImplementation platform('com.google.firebase:firebase-bom:33.12.0')
70 | googleImplementation 'com.google.firebase:firebase-analytics'
71 | googleImplementation 'com.google.firebase:firebase-crashlytics'
72 | googleImplementation 'com.google.android.gms:play-services-location:21.3.0'
73 | googleImplementation 'com.google.android.play:review:2.0.2'
74 | }
75 |
76 | tasks.register('copyFirebaseConfig', Copy) {
77 | from '../../environment/google-services'
78 | into '.'
79 | include 'traccar-client-android.json'
80 | rename('traccar-client-android.json', 'google-services.json')
81 | }
82 | afterEvaluate {
83 | tasks.matching { it.name.contains('Google') }.configureEach { task ->
84 | if (task.name.contains('Regular')) {
85 | task.enabled false
86 | } else {
87 | task.dependsOn copyFirebaseConfig
88 | }
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/app/src/main/res/values-af/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar-kliënt
4 | Traccar
5 | Begin diens
6 | Stop diens
7 | Stuur SOS
8 | Primêre Kanaal
9 | Toestel-identifiseerder
10 | Bediener-URL
11 | Volg bediener-URL
12 | Frekwensie
13 | Rapporteer interval in sekondes
14 | Afstand
15 | Rapporteer afstand in meter
16 | Hoek
17 | Rapporteringshoek in grade
18 | Diensstatus
19 | Begin
20 | Stop
21 | Diens gestop
22 | Diens loop
23 | Vanlyn buffer
24 | Buffer af
25 | Buffer aan
26 | Ligging akkuraatheid
27 | Verlangde ligging akkuraatheid
28 | Hoog
29 | Medium
30 | Laag
31 | Voorgrond diens
32 | Verhoog diensprioriteit
33 | Status
34 | Voeg kortpaaie by
35 | Skoonmaak
36 | Diens het begin
37 | Diens het gestop
38 | Stuur suksesvol
39 | Stuur misluk
40 | Ligging opdateer
41 | Netwerk aanlyn
42 | Netwerk vanlyn
43 | Toestelinstellings
44 | Die toep is versteek. Skakel 8722227 (TRACCAR) om dit weer oop te maak.
45 | Voer \'n geldige http: // of https: // URL in
46 |
47 |
--------------------------------------------------------------------------------
/app/src/google/java/org/traccar/client/GooglePositionProvider.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 - 2021 Anton Tananaev (anton@traccar.org)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.traccar.client
17 |
18 | import android.annotation.SuppressLint
19 | import android.content.Context
20 | import android.os.Looper
21 | import com.google.android.gms.location.LocationCallback
22 | import com.google.android.gms.location.LocationRequest
23 | import com.google.android.gms.location.LocationResult
24 | import com.google.android.gms.location.LocationServices
25 |
26 | class GooglePositionProvider(context: Context, listener: PositionListener) : PositionProvider(context, listener) {
27 |
28 | private val fusedLocationClient = LocationServices.getFusedLocationProviderClient(context)
29 |
30 | @Suppress("DEPRECATION", "MissingPermission")
31 | override fun startUpdates() {
32 | val locationRequest = LocationRequest()
33 | locationRequest.priority = getPriority(preferences.getString(MainFragment.KEY_ACCURACY, "medium"))
34 | locationRequest.interval = if (distance > 0 || angle > 0) MINIMUM_INTERVAL else interval
35 | fusedLocationClient.requestLocationUpdates(locationRequest, locationCallback, Looper.getMainLooper())
36 | }
37 |
38 | override fun stopUpdates() {
39 | fusedLocationClient.removeLocationUpdates(locationCallback)
40 | }
41 |
42 | @SuppressLint("MissingPermission")
43 | override fun requestSingleLocation() {
44 | fusedLocationClient.lastLocation.addOnSuccessListener { location ->
45 | if (location != null) {
46 | listener.onPositionUpdate(Position(deviceId, location, getBatteryStatus(context)))
47 | }
48 | }
49 | }
50 |
51 | private val locationCallback: LocationCallback = object : LocationCallback() {
52 | override fun onLocationResult(locationResult: LocationResult) {
53 | for (location in locationResult.locations) {
54 | processLocation(location)
55 | }
56 | }
57 | }
58 |
59 | private fun getPriority(accuracy: String?): Int {
60 | return when (accuracy) {
61 | "high" -> LocationRequest.PRIORITY_HIGH_ACCURACY
62 | "low" -> LocationRequest.PRIORITY_LOW_POWER
63 | else -> LocationRequest.PRIORITY_BALANCED_POWER_ACCURACY
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/app/src/main/java/org/traccar/client/StatusWidget.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2023 Anton-V-K
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.traccar.client
17 |
18 | import android.app.PendingIntent
19 | import android.appwidget.AppWidgetManager
20 | import android.appwidget.AppWidgetProvider
21 | import android.content.ComponentName
22 | import android.content.Context
23 | import android.content.Intent
24 | import android.widget.RemoteViews
25 |
26 | import androidx.preference.PreferenceManager
27 |
28 | class StatusWidget : AppWidgetProvider() {
29 |
30 | override fun onReceive(context: Context, intent: Intent) {
31 | if (TrackingService.ACTION_STARTED == intent.action)
32 | updateWidgets(context, true)
33 | else if (TrackingService.ACTION_STOPPED == intent.action)
34 | updateWidgets(context, false)
35 | else
36 | super.onReceive(context, intent)
37 | }
38 |
39 | override fun onUpdate(context: Context, appWidgetManager: AppWidgetManager, appWidgetIds: IntArray) {
40 | val prefs = PreferenceManager.getDefaultSharedPreferences(context)
41 | val enabled = prefs.getBoolean(MainFragment.KEY_STATUS, false)
42 | update(context, appWidgetManager, appWidgetIds, enabled)
43 | }
44 |
45 | fun updateWidgets(context: Context, enabled: Boolean) {
46 | val manager = AppWidgetManager.getInstance(context)
47 | val appWidgetIds = manager.getAppWidgetIds(ComponentName(context, StatusWidget::class.java.name))
48 | update(context, manager, appWidgetIds, enabled)
49 | }
50 |
51 | private fun update(context: Context, appWidgetManager: AppWidgetManager, appWidgetIds: IntArray, enabled: Boolean) {
52 | for (appWidgetId in appWidgetIds) {
53 | val views = RemoteViews(context.packageName, R.layout.status_widget)
54 | views.setImageViewResource(R.id.image_enabled, if (enabled) R.mipmap.ic_start else R.mipmap.ic_stop)
55 |
56 | val intent = Intent(context, MainActivity::class.java)
57 | val clickIntent = PendingIntent.getActivity(context, 0, intent,
58 | PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE)
59 | views.setOnClickPendingIntent(R.id.image_enabled, clickIntent)
60 |
61 | appWidgetManager.updateAppWidget(appWidgetId, views)
62 | }
63 | }
64 |
65 | }
66 |
--------------------------------------------------------------------------------
/app/src/main/res/values-de/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar Client
4 | Traccar
5 | Dienst starten
6 | Dienst stoppen
7 | SOS senden
8 | Primärkanal
9 | Gerätekennung
10 | Server URL
11 | Tracking Server URL
12 | Frequenz
13 | Meldung nach Zeit in Sekunden
14 | Entfernung
15 | Meldung nach Entfernung in Metern
16 | Winkel
17 | Meldung nach Winkel in Grad
18 | Dienststatus
19 | Start
20 | Stop
21 | Dienst inaktiv
22 | Dienst aktiv
23 | Offline puffern
24 | Puffern aus
25 | Puffern ein
26 | Positionsgenauigkeit
27 | Erwünschte Positionsgenauigkeit
28 | Hoch
29 | Mittel
30 | Niedrig
31 | Vordergrund Service
32 | Servicepriorität erhöhen
33 | Status
34 | Verknüpfung hinzufügen
35 | Leeren
36 | Dienst gestartet
37 | Dienst gestoppt
38 | Erfolgreich gesendet
39 | Übertragung fehlerhaft
40 | Positionsupdate
41 | Netzwerk online
42 | Netzwerk offline
43 | Geräteeinstellungen
44 | Die App wurde versteckt. Um sie wieder zu öffnen, wähle 8722227 (TRACCAR).
45 | Bitte eine gültige http:// oder https:// URL eingeben
46 |
47 |
--------------------------------------------------------------------------------
/app/src/main/res/values-nn/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar Client
4 | Traccar
5 | Start teneste
6 | Stopp teneste
7 | Send SOS
8 | Hovud kanal
9 | Einingsidentifikator
10 | Tenar-URL
11 | Sporingstenar-URL
12 | Frekvens
13 | Rapporteringsinterval i sekundar
14 | Avstand
15 | Rapporteringsavstand i meter
16 | Vinkel
17 | Rapporteringsvinkel i gradar
18 | Tenarstatus
19 | Start
20 | Stopp
21 | Teneste stoppa
22 | Tenar køyrer
23 | Fråkopla mellomlagring
24 | Mellomlagring deaktivert
25 | Mellomlagring på
26 | Lokasjonsnøyaktighet
27 | Ønska lokasjonsnøyaktighet
28 | Høg
29 | Medium
30 | Lav
31 | Forgrunnsteneste
32 | Auk teneste-prioritet
33 | Status
34 | Legg til snarveg
35 | Nullstill
36 | Teneste starta
37 | Teneste stoppa
38 | Send vellukka
39 | Sending feila
40 | Plassering oppdatert
41 | Nettverk tilkopla
42 | Nettverk fråkopla
43 | Einingsinnstillingar
44 | App\'en har blitt gøymt. For å åpne han igjen, ver venleg å tast (ring) 8722227 (TRACCAR).
45 | Ver venleg å taste gyldig http:// eller https:// URL
46 |
47 |
--------------------------------------------------------------------------------
/app/src/google/java/org/traccar/client/GoogleMainApplication.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 - 2024 Anton Tananaev (anton@traccar.org)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.traccar.client
17 |
18 | import android.app.Activity
19 | import android.content.IntentFilter
20 | import android.os.Build
21 | import androidx.annotation.RequiresApi
22 | import androidx.core.content.ContextCompat
23 | import androidx.preference.PreferenceManager
24 | import com.google.android.gms.tasks.Task
25 | import com.google.android.play.core.review.ReviewInfo
26 | import com.google.android.play.core.review.ReviewManagerFactory
27 | import com.google.firebase.analytics.FirebaseAnalytics
28 |
29 | class GoogleMainApplication : MainApplication() {
30 |
31 | private var firebaseAnalytics: FirebaseAnalytics? = null
32 |
33 | override fun onCreate() {
34 | super.onCreate()
35 | firebaseAnalytics = FirebaseAnalytics.getInstance(this)
36 | val filter = IntentFilter()
37 | filter.addAction(TrackingService.ACTION_STARTED)
38 | filter.addAction(TrackingService.ACTION_STOPPED)
39 | ContextCompat.registerReceiver(this, ServiceReceiver(), filter, ContextCompat.RECEIVER_EXPORTED)
40 | }
41 |
42 | @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP_MR1)
43 | override fun handleRatingFlow(activity: Activity) {
44 | val preferences = PreferenceManager.getDefaultSharedPreferences(this)
45 | val ratingShown = preferences.getBoolean(KEY_RATING_SHOWN, false)
46 | val totalDuration = preferences.getLong(ServiceReceiver.KEY_DURATION, 0)
47 | if (!ratingShown && totalDuration > RATING_THRESHOLD) {
48 | val reviewManager = ReviewManagerFactory.create(activity)
49 | reviewManager.requestReviewFlow().addOnCompleteListener { infoTask: Task ->
50 | if (infoTask.isSuccessful) {
51 | val reviewInfo = infoTask.result
52 | if (reviewInfo != null) {
53 | reviewManager.launchReviewFlow(activity, reviewInfo).addOnCompleteListener {
54 | preferences.edit().putBoolean(KEY_RATING_SHOWN, true).apply()
55 | }
56 | }
57 | }
58 | }
59 | }
60 | }
61 |
62 | companion object {
63 | private const val KEY_RATING_SHOWN = "ratingShown"
64 | private const val RATING_THRESHOLD = -24 * 60 * 60 * 1000L
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/app/src/main/res/values-nb/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar Klient
4 | Traccar
5 | Start tjeneste
6 | Stopp tjeneste
7 | Send SOS
8 | Primer Kanal
9 | Enhetsidentifikasjon
10 | Tjener-nettadresse
11 | Sproringstjener-nettadresse
12 | Frekvens
13 | Rapporteringsintervall i sekunder
14 | Avstand
15 | Rapporteringsdistanse i meter
16 | Vinkel
17 | Rapporteringsvinkel i grader
18 | Tjeneste-status
19 | Start
20 | Stopp
21 | Tjenesten stoppet
22 | Tjenesten kjører
23 | Frakoblet mellomlagring
24 | Mellomlagring deaktivert
25 | Mellomlagring på
26 | Posisjonsnøyaktighet
27 | Ønsket plasseringsnøyaktighet
28 | Høy
29 | Medium
30 | Lav
31 | Forgrunnen tjeneste
32 | Øk tjeneste-prioritet
33 | Status
34 | Legg til snarvei
35 | Tøm
36 | Tjeneste startet
37 | Tjeneste stoppet
38 | Sending vellykket
39 | Sending mislyktes
40 | Plassering oppdatert
41 | Nettverk Online
42 | Nettverk Offline
43 | Enhetsinnstillinger
44 | App\'en har blitt gjemt. For å åpne igjen, vennligst tast (ring) 8722227 (TRACCAR).
45 | Vennligst skriv korrekt nettadresse som http:// eller https://
46 |
47 |
--------------------------------------------------------------------------------
/app/src/main/res/values-ar/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | عميل Traccar
4 | Traccar
5 | بدء الخدمة
6 | توقف الخدمة
7 | ارسال استغاثة
8 | القناة الاساسية
9 | معرف الجهاز
10 | رابط الخادم
11 | رابط خادم التتبع
12 | تردد
13 | فترة التقرير بالثواني
14 | المسافة
15 | مسافة التقرير بالميتر
16 | الزاوية
17 | زاوية التقرير بالدرجات
18 | حالة الخدمة
19 | بدء
20 | إيقاف
21 | الخدمة توقفت
22 | الخدمة تعمل
23 | التخزين المؤقت دون اتصال
24 | التخزين المؤقت غير مفعل
25 | التخزين المؤقت مفعل
26 | قفل الإيقاظ
27 | قفل الإيقاظ غير مفعل
28 | قفل الإيقاظ مفعل
29 | دقة الموقع
30 | دقة الموقع المطلوبة
31 | مرتفع
32 | متوسط
33 | منخفض
34 | الخدمة الأمامية
35 | زيادة أولوية الخدمة
36 | الحالة
37 | إضافة اختصارات
38 | مسح
39 | بدأت الخدمة
40 | توقفت الخدمة
41 | تم الإرسال بنجاح
42 | فشل الإرسال
43 | تحديث الموقع
44 | متصل بالشبكة
45 | غير متصل بالشبكة
46 | إعدادات الجهاز
47 | تم إخفاء التطبيق. لفتحه مجددا رجاءا اتصل بـ8722227 (TRACCAR).
48 | الرجاء إدخال رابط صحيح http:// أو https://
49 |
50 |
--------------------------------------------------------------------------------
/app/src/main/java/org/traccar/client/StatusActivity.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012 - 2021 Anton Tananaev (anton@traccar.org)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.traccar.client
17 |
18 | import androidx.appcompat.app.AppCompatActivity
19 | import android.widget.ArrayAdapter
20 | import android.os.Bundle
21 | import android.view.Menu
22 | import android.view.MenuItem
23 | import android.widget.ListView
24 | import java.text.DateFormat
25 | import java.util.*
26 |
27 | class StatusActivity : AppCompatActivity() {
28 |
29 | private var adapter: ArrayAdapter? = null
30 |
31 | override fun onCreate(savedInstanceState: Bundle?) {
32 | super.onCreate(savedInstanceState)
33 | setContentView(R.layout.list)
34 | adapter = ArrayAdapter(this, android.R.layout.simple_list_item_1, android.R.id.text1, messages)
35 | val listView = findViewById(android.R.id.list)
36 | listView.adapter = adapter
37 | adapter?.let { adapters.add(it) }
38 | }
39 |
40 | override fun onDestroy() {
41 | adapters.remove(adapter)
42 | super.onDestroy()
43 | }
44 |
45 | override fun onCreateOptionsMenu(menu: Menu): Boolean {
46 | val inflater = menuInflater
47 | inflater.inflate(R.menu.status, menu)
48 | return super.onCreateOptionsMenu(menu)
49 | }
50 |
51 | override fun onOptionsItemSelected(item: MenuItem): Boolean {
52 | if (item.itemId == R.id.clear) {
53 | clearMessages()
54 | return true
55 | }
56 | return super.onOptionsItemSelected(item)
57 | }
58 |
59 | companion object {
60 | private const val LIMIT = 20
61 | private val messages = LinkedList()
62 | private val adapters: MutableSet> = HashSet()
63 |
64 | private fun notifyAdapters() {
65 | for (adapter in adapters) {
66 | adapter.notifyDataSetChanged()
67 | }
68 | }
69 |
70 | fun addMessage(originalMessage: String) {
71 | var message = originalMessage
72 | val format = DateFormat.getTimeInstance(DateFormat.MEDIUM)
73 | message = format.format(Date()) + " - " + message
74 | messages.add(message)
75 | while (messages.size > LIMIT) {
76 | messages.removeFirst()
77 | }
78 | notifyAdapters()
79 | }
80 |
81 | fun clearMessages() {
82 | messages.clear()
83 | notifyAdapters()
84 | }
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%"=="" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%"=="" set DIRNAME=.
29 | @rem This is normally unused
30 | set APP_BASE_NAME=%~n0
31 | set APP_HOME=%DIRNAME%
32 |
33 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
34 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
35 |
36 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
37 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
38 |
39 | @rem Find java.exe
40 | if defined JAVA_HOME goto findJavaFromJavaHome
41 |
42 | set JAVA_EXE=java.exe
43 | %JAVA_EXE% -version >NUL 2>&1
44 | if %ERRORLEVEL% equ 0 goto execute
45 |
46 | echo. 1>&2
47 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
48 | echo. 1>&2
49 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2
50 | echo location of your Java installation. 1>&2
51 |
52 | goto fail
53 |
54 | :findJavaFromJavaHome
55 | set JAVA_HOME=%JAVA_HOME:"=%
56 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
57 |
58 | if exist "%JAVA_EXE%" goto execute
59 |
60 | echo. 1>&2
61 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
62 | echo. 1>&2
63 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2
64 | echo location of your Java installation. 1>&2
65 |
66 | goto fail
67 |
68 | :execute
69 | @rem Setup the command line
70 |
71 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
72 |
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if %ERRORLEVEL% equ 0 goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | set EXIT_CODE=%ERRORLEVEL%
85 | if %EXIT_CODE% equ 0 set EXIT_CODE=1
86 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
87 | exit /b %EXIT_CODE%
88 |
89 | :mainEnd
90 | if "%OS%"=="Windows_NT" endlocal
91 |
92 | :omega
93 |
--------------------------------------------------------------------------------
/app/src/main/res/values-da/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar klient
4 | Traccar
5 | Start tjenesten
6 | Stop tjenesten
7 | Send SOS
8 | Primær kanal
9 | Enheds ID
10 | Server Adresse
11 | Tracking server adresse
12 | Periode mellem registreringer
13 | Angiv periode i sekunder
14 | Afstand mellem registreringer
15 | Angiv afstand i meter
16 | Retningsændring som udløser ny registrering
17 | Angiv retningsændring i grader
18 | Status af tjenesten
19 | Start
20 | Stop
21 | Tjenesten stoppet
22 | Tjenesten er aktiv
23 | Offline buffering
24 | buffering off
25 | buffering on
26 | Vågelås
27 | Vågelås off
28 | Vågelås on
29 | Placeringsnøjagtighed
30 | Ønsket placeringsnøjagtighed
31 | Høj
32 | Mellem
33 | Lav
34 | Forgrunds tjeneste
35 | Øg tjeneste prioritet
36 | Status
37 | Tilføj genveje
38 | Slet
39 | Tjenesten kører
40 | Tjenesten er stoppet
41 | Send succesfuld
42 | Send fejlede
43 | Placering opdateret
44 | Netværk online
45 | Netværk offline
46 | Enheds indstillinger
47 | Appen er skjult. For at åbne appen igen skal du ringe til 8722227 (TRACCAR)
48 | Indtast gyldig http:// eller https:// adresse
49 |
50 |
--------------------------------------------------------------------------------
/app/src/main/res/values-ru/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar Клиент
4 | Traccar
5 | Запуск сервиса
6 | Остановка сервиса
7 | Отправка SOS
8 | Первичный канал
9 | Идентификатор устройства
10 | URL сервера
11 | URL телематического сервера
12 | Частота
13 | Отчетный интервал в секундах
14 | Расстояние
15 | Отчетное расстояние в метрах
16 | Угол
17 | Отчетный угол в градусах
18 | Состояние сервиса
19 | Старт
20 | Стоп
21 | Сервис остановлен
22 | Сервис запущен
23 | Оффлайн буферизация
24 | Буферизация выключена
25 | Буферизация включена
26 | Блокировка пробуждения
27 | Блокировка выключена
28 | Блокировка включена
29 | Точность местоположения
30 | Точность местоположения
31 | Высокая
32 | Средняя
33 | Низкая
34 | Приоритетный сервис
35 | Увеличить приоритет сервиса
36 | Состояние
37 | Добавить ярлыки
38 | Очистить
39 | Сервис запущен
40 | Сервис остановлен
41 | Отправка успешна
42 | Ошибка отправки
43 | Обновление местоположения
44 | Сеть онлайн
45 | Сеть оффлайн
46 | Настройки устройства
47 | Приложение было спрятано. Чтобы открыть позвоните на номер 8722227 (TRACCAR).
48 | Пожалуйста, введите верный http:// или https:// URL
49 |
50 |
--------------------------------------------------------------------------------
/app/src/main/res/values-fr/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Client Traccar
4 | Traccar
5 | Démarrer le service
6 | Arrêter le service
7 | Envoyer un SOS
8 | Canal primaire
9 | Identifiant de l\'appareil
10 | URL du serveur
11 | URL du serveur de suivi
12 | Fréquence
13 | Intervalle de rapport en secondes
14 | Distance
15 | Distance de rapport en mètres
16 | Angle
17 | Angle de rapport en degrés
18 | Statut
19 | Démarrer
20 | Arrêter
21 | Arrêté
22 | En marche
23 | Mise en tampon hors ligne
24 | Mise en tampon désactivée
25 | Mise en tampon activée
26 | Wake lock
27 | Wake lock off
28 | Wake lock on
29 | Precision de la localisation
30 | Précision de localisation désirée
31 | Haut
32 | Moyen
33 | Bas
34 | Un service de premier plan
35 | Augmenter la priorité de service
36 | Etat
37 | Ajouter des raccourcis
38 | Effacer
39 | Service démarré
40 | Service arrêté
41 | Envoyé avec succès
42 | L’envoi a échoué
43 | Localisation mise à jour
44 | Réseau connecté
45 | Réseau déconnecté
46 | Paramètres de l\'appareil
47 | Cette application a été cachée. Pour l\'ouvrir à nouveau, composez le 8722227 (TRACCAR)
48 | S\'il vous plait, entrer un URL http:// ou https:// valide
49 |
50 |
--------------------------------------------------------------------------------
/app/src/main/res/values-pt/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Cliente Traccar
4 | Traccar
5 | Iniciar serviço
6 | Parar serviço
7 | Enviar SOS
8 | Canal Principal
9 | Identificador único
10 | URL do Servidor
11 | URL do servidor de rastreamento
12 | Invervalo
13 | Intervalo de relatórios em segundos
14 | Distância
15 | Distância de relatórios em metros
16 | Ângulo
17 | Ângulo de relatório em graus
18 | Status do Serviço
19 | Iniciar
20 | Parar
21 | Serviço Parado
22 | Serviço em execução
23 | Buffering Offline
24 | Buffering desligado
25 | Buffering ligado
26 | Bloqueio de Ativação
27 | Bloqueio de Ativação Desligado
28 | Bloqueio de Ativação Ligado
29 | Precisão de localização
30 | Precisão de localização desejada
31 | Alto
32 | Médio
33 | Baixo
34 | Serviço primeiro plano
35 | Aumentar a prioridade de serviço
36 | Estado
37 | Adicionar Atalhos
38 | Limpar
39 | Serviço Iniciado
40 | Serviço Parado
41 | Enviado com Sucesso
42 | Falha no envio
43 | Localização atualizada
44 | Rede online
45 | Rede offline
46 | Definições do Dispositivo
47 | A aplicação foi ocultada com sucesso. Para abrir novamente, por favor contacte 8722227 (TRACCAR).
48 | Digite um URL http: // ou https: // válido
49 |
50 |
--------------------------------------------------------------------------------
/app/src/main/res/values-hr/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar klijent
4 | Traccar
5 | Pokreni servis
6 | Zaustavi servis
7 | Pošalji SOS
8 | Primarni kanal
9 | Identifikator uređaja
10 | Adresa poslužitelja
11 | Adresa poslužitelja za praćenje
12 | Učestalost
13 | Interval izvješćivanja u sekundama
14 | Udaljenost
15 | Udaljenost izvješćivanja u metrima
16 | Kut
17 | Kut izvješćivanja u stupnjevima
18 | Status servisa
19 | Start
20 | Stop
21 | Servis zaustavljen
22 | Servis pokrenut
23 | Offline memoriranje
24 | Predmemoriranje isključeno
25 | Predmemoriranje uključeno
26 | Gašenje ekrana pri neaktivnosti
27 | Gasi ekran pri neaktivnosti
28 | Ne gasi ekran pri neaktivnosti
29 | Točnost lokacije
30 | Željena preciznost lokacije
31 | Visoki
32 | Srednji
33 | Niski
34 | Predhodna usluga
35 | Povećanje prioriteta usluge
36 | Status
37 | Dodaj prečace
38 | Očisti
39 | Servis pokrenut
40 | Servis zaustavljen
41 | Slanje uspješno
42 | Greška pri slanju
43 | Osvežavanje lokacije
44 | Mrežna dostupnost
45 | Mrežna nedostupnost
46 | Podešavanje uređaja
47 | Aplikacija je skrivena. Za ponovno otvaranje molim nazovite 8722227 (TRACCAR).
48 | Molimo unesite ispravnu http:// ili https:// adresu
49 |
50 |
--------------------------------------------------------------------------------
/app/src/main/res/values-ka/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar კლიენტი
4 | Traccar
5 | სერვისის სტარტი
6 | სერვისის დასტოპება
7 | SOS სიგნალის გაგზავნა
8 | ძირითადი არხი
9 | მოწყობილობის იდენტიფიკატორი
10 | სერვერის მისამართი URL
11 | ტრეკინგ სერვერის მისამართი URL
12 | სიხშირე
13 | რეპორტებს შორის ინტერვალი წამებში
14 | დისტანცია
15 | რეპორტებს შორის ინტერვალი მეტრებში
16 | მიმართულება
17 | მიმართულების რეპორტი გრადუსებში
18 | სერვისი სტატუსი
19 | სტარტი
20 | შეჩერება
21 | სერვისი შეჩერებულია
22 | სერვისი გაშვებულია
23 | ოფლაინ ბუფერიზაცია
24 | ბუფერიზაცია გამორთულია
25 | ბუფერიზაცია ჩართულია
26 | გაღვიძების ბლოკირება
27 | გაღვიძების ბლოკირება გამორთულია
28 | გაღვიძების ბლოკირება ჩართულია
29 | მდებარეობის სიზუსტე
30 | მდებარეობის სასურველი სიზუსტე
31 | მაღალი
32 | საშუალო
33 | დაბალი
34 | ფონური სერვისი
35 | სერვისის პრიორიტეტის გაზრდა
36 | სტატუსი
37 | შორტკატის დამატება
38 | გასუფთავება
39 | სერვისი გაშვებულია
40 | სერვისი შეჩერებულია
41 | წარმატებით გაიგზავნა
42 | გაგზავნა ვერ მოხერხდა
43 | მდებარეობა განახლდა
44 | ქსელი კავშირშია
45 | ქსელი გამორთულია
46 | მოწყობილობის პარამეტრები
47 | პროგრამა დამალულია. მის გასახსნელად გთხოვთ აკრიფოთ 8722227 (TRACCAR).
48 | გთხოვთ, შეიყვანოთ სწორი http: // ან https: // URL
49 |
50 |
--------------------------------------------------------------------------------
/app/src/main/res/values-lv/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar klients
4 | Traccar
5 | Sākt servisu
6 | Apstādināt servisu
7 | Sūtīt SOS
8 | Primārais kanāls
9 | Ierīces identifikators
10 | Servera URL
11 | Traccar servera URL
12 | Biežums
13 | Atskaites biežums sekundēs
14 | Distance
15 | Atskaites biežums metros
16 | Leņķis
17 | Atskaites leņķis grādos
18 | Servisa statuss
19 | Start
20 | Stop
21 | Serviss apturēts
22 | Serviss darbojas
23 | Bezsaistes buferizācija
24 | Buferizācija izslēgta
25 | Buferizācija ieslēgta
26 | Pretaizmigšanas funkcija
27 | Pretaizmigšanas funkcija izslēgta
28 | Pretaizmigšanas funkcija ieslēgta
29 | Vietas precizitāte
30 | Vēlamās vietas precizitāte
31 | Augsta
32 | Vidēja
33 | Zema
34 | Zināšanu servis
35 | Paaugstināt servisa prioritāti
36 | Statuss
37 | Informācija
38 | Pievienot saīsnes
39 | Notīrīt
40 | Serviss uzsākts
41 | Serviss apstādināts
42 | Sūtīšana veiksmīga
43 | Nosūtīt neizdevās
44 | Lokacijas atjaunināšana
45 | Tīkls tiešsaitē
46 | Tīkls bezsaitē
47 | Ierīces iestatījumi
48 | Lietotne ir paslēpta. Zvaniet 8722227 (TRACCAR), lai to atkal parādītu.
49 | Lūdzu ievadiet derīgu http:// vai https:// URL
50 | Visu laiku atļauts
51 |
52 |
--------------------------------------------------------------------------------
/app/src/main/res/values-th/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar Client
4 | Traccar
5 | เริ่มต้นบริการ
6 | หยุดบริการ
7 | ส่ง SOS
8 | ช่องหลัก
9 | หมายเลขอุปกรณ์
10 | URL เซิร์ฟเวอร์
11 | URL เซิร์ฟเวอร์ติดตาม
12 | ความถี่
13 | รายงานทุกช่วงเวลาวินาที
14 | ระยะทาง
15 | การรายงานระยะทางแบบเมตร
16 | มุม
17 | รายงานในมุมองศา
18 | สถานะเซอร์วิส
19 | เริ่มต้น
20 | สิ้นสุด
21 | เซอร์วิสหยุดทำงานแล้ว
22 | เซอร์วิสทำงานอยู่
23 | บัฟเฟอร์แบบออฟไลน์
24 | ปิดบัฟเฟอร์
25 | เปิดบัฟเฟอร์
26 | ล็อกการปลุก
27 | ปิดล็อกการปลุก
28 | เปิดล็อกการปลุก
29 | ความแม่นยำของตำแหน่ง
30 | ต้องการความแม่นยำของตำแหน่ง-
31 | สูง
32 | ปานกลาง
33 | ต่ำ
34 | ทำงานเบื้องหน้า
35 | เพิ่มความลำดับสำคัญการทำงาน
36 | สถานะ
37 | ข้อมูล
38 | เพิ่มชอร์ตคัท
39 | ล้างข้อมูล
40 | เซอร์วิสเริ่มทำงานแล้ว
41 | เซอร์วิสหยุดทำงานแล้ว
42 | ส่งข้อมูลเรียบร้อย
43 | ส่งข้อมูลล้มเหลว
44 | ปรับปรุงตำแหน่ง
45 | เครือข่ายออนไลน์
46 | เครือข่ายออฟไลน์
47 | ตั้งค่าอุปกรณ์
48 | แอพถูกซ่อน หากต้องการเปิดอีกครั้ง โปรดโทร 8722227 (TRACCAR)
49 | โปรดใส่ค่า http:// หรือ https:// URL ที่ถูกต้อง
50 | หากต้องการรวบรวมข้อมูลตำแหน่งอย่างต่อเนื่อง โปรดปิดการเพิ่มประสิทธิภาพแบตเตอรี่สำหรับแอป
51 | หากต้องการรวบรวมข้อมูลตำแหน่งอย่างต่อเนื่อง โปรดเปิดใช้การอนุญาต \"%s\"
52 | อนุญาตตลอดเวลา
53 |
54 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar Client
4 | Traccar
5 | Start service
6 | Stop service
7 | Send SOS
8 | Primary Channel
9 | Device identifier
10 | Server URL
11 | Tracking server URL
12 | Frequency
13 | Reporting interval in seconds
14 | Distance
15 | Reporting distance in meters
16 | Angle
17 | Reporting angle in degrees
18 | Service status
19 | Start
20 | Stop
21 | Service stopped
22 | Service running
23 | Offline buffering
24 | Buffering off
25 | Buffering on
26 | Wake lock
27 | Wake lock off
28 | Wake lock on
29 | Location accuracy
30 | Desired location accuracy
31 | High
32 | Medium
33 | Low
34 | Foreground service
35 | Increase service priority
36 | Status
37 | Info
38 | Add shortcuts
39 | Clear
40 | Service started
41 | Service stopped
42 | Send successfully
43 | Send failed
44 | Location update
45 | Network online
46 | Network offline
47 | The app has been hidden. To open it again please dial 8722227 (TRACCAR).
48 | Please enter a valid http:// or https:// URL
49 | To continuously collect location data please turn off battery optimization for the app.
50 | To continuously collect location data please enable \"%s\" permission.
51 | Allow all the time
52 | Shows the service status
53 | Status widget
54 |
55 |
--------------------------------------------------------------------------------
/app/src/main/res/values-sv/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccarklient
4 | Traccar
5 | Starta tjänsten
6 | Stoppa tjänsten
7 | Skicka SOS
8 | Primärkanal
9 | Enhets-ID
10 | URL till servern
11 | URL till trackservern
12 | Frekvens
13 | Uppdateringsintervall i sekunder
14 | Avstånd
15 | Uppdateringsavstånd i meter
16 | Vinkel
17 | Uppdateringsvinkel i grader
18 | Tjänstens status
19 | Starta
20 | Stoppa
21 | Tjänsten har stoppats
22 | Tjänsten är igång
23 | Buffring offline
24 | Buffring av
25 | Buffring på
26 | Förhindra viloläge
27 | Förhindra viloläge av
28 | Förhindra viloläge på
29 | Positionsnoggranhet
30 | Önskad positionsnoggrannhet
31 | Hög
32 | Medel
33 | Låg
34 | Tjänsten i förgrunden
35 | Öka tjänstens prioritet
36 | Status
37 | Info
38 | Lägg till länkar
39 | Rensa
40 | Tjänsten har startats
41 | Tjänsten har stoppats
42 | Skickat OK
43 | Sändning misslyckades
44 | Positionsuppdatering
45 | Nätverk online
46 | Nätverk offline
47 | Inställningar
48 | App:en är gömd. För att öppna den igen, vänligen ring 8722227 (TRACCAR).
49 | Vänligen fyll i en giltig http://- eller https://-URL
50 | För att kontinuerligt samla in platsdata, stäng av batterioptimeringen för appen.
51 | För att kontinuerligt samla in platsdata vänligen aktivera \"%s\" behörighet.
52 | Tillåt hela tiden
53 |
54 |
--------------------------------------------------------------------------------
/app/src/main/res/values-ca/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar Client
4 | Traccar
5 | Inicia servei
6 | Atura servei
7 | Envia SOS
8 | Canal principal
9 | Id dispositiu
10 | URL Servidor
11 | URL del servidor de seguiment
12 | Interval
13 | Interval d\'enviament en segons
14 | Distància
15 | Distància en metres per informar
16 | Angle
17 | Graus de diferència per informar
18 | Estat del servei
19 | Aturat
20 | Inciat
21 | Servei aturat
22 | Servei iniciat
23 | Buffer
24 | Buffer desactivat
25 | Buffer activat
26 | Bloca despertar
27 | Bloca despertar desactivat
28 | Bloca despertar activat
29 | Precisió
30 | Precisió
31 | Precisió alta
32 | Precisió mitjana
33 | Precisió baixa
34 | Primer pla
35 | En primer pla
36 | Estat
37 | Informació
38 | Dreceres
39 | Netejar
40 | Servei iniciat
41 | Servei aturat
42 | Enviat correctament
43 | Error a l\'enviar
44 | Actualització de localització
45 | Xarxa en línia
46 | Xarxa fora de línia
47 | Configuració del dispositiu
48 | Aplicació ocultada. Per obrir-la de nou escriviu 8722227 (TRACCAR).
49 | Adreça URL incorrecte
50 | Per obtenir contínuament les dades de localització, desactivi la optimització de la bateria per aquesta aplicació
51 | Per obtenir contínuament les dades de localització, activi el permís \"%s\".
52 | Permetre tot el temps
53 |
54 |
--------------------------------------------------------------------------------
/app/src/main/res/values-sr/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar klijent
4 | Traccar
5 | Pokreni servis
6 | Zaustavi servis
7 | Pošalji SOS
8 | Osnovni kanal
9 | Identifikator uređaja
10 | Server URL
11 | URL servera praćenja
12 | Učestalost
13 | Interval javljanja u sekundama
14 | Razdaljina
15 | Razdaljina u metrima
16 | Ugao
17 | Izveštaj ugla u stepenima
18 | Status servisa
19 | Start
20 | Stop
21 | Servis zaustavljen
22 | Servis pokrenut
23 | Offline buffering
24 | Buffering uključen
25 | Buffering isključen
26 | Zaključavanje budnosti
27 | Budnost isključena
28 | Budnost uključena
29 | Tačnost lokacije
30 | Željena tačnost lokacije
31 | Visoka
32 | Srednja
33 | Mala
34 | Prvi plan servis
35 | Povecanje usluga prioritet
36 | Status
37 | Info
38 | Dodaj prečice
39 | Očisti
40 | Servis pokrenut
41 | Servis zaustavljen
42 | Slanje uspešno
43 | Slanje neuspešno
44 | Ažuriranje lokacije
45 | Mreža dostupna
46 | Mreža nedostupna
47 | Podešavanja uređaja
48 | Aplikacija je skrivena. Da je otvorite kucajte 8722227 (TRACCAR).
49 | Molimo unesite pravilnu http:// ili https:// adresu
50 | Da biste kontinuirano prikupljali podatke o lokaciji, isključite optimizaciju baterije za aplikaciju.
51 | Da biste kontinuirano prikupljali podatke o lokaciji, omogućite %s dozvolu.
52 | Dozvoljeno svo vreme
53 |
54 |
--------------------------------------------------------------------------------
/app/src/main/res/values-cs/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar klient
4 | Traccar
5 | Spustit službu
6 | Zastavit službu
7 | Odeslat SOS
8 | Primární kanál
9 | Identifikátor zařízení
10 | URL serveru
11 | URL sledovacího serveru
12 | Frekvence
13 | Reportuji interval v sekundách
14 | Vzdálenost
15 | Reportuji vzdálenost v metrech
16 | Úhel
17 | Reportuji úhel ve stupních
18 | Stav služby
19 | Start
20 | Stop
21 | Zastaveno
22 | Spuštěno
23 | Ukládání do vyrovnávací paměti
24 | Vyrovnávací pamět vypnuta
25 | Vyrovnávací pamět zapnuta
26 | Zámek probuzení
27 | Zámek probuzení vypnut
28 | Zámek probuzení zapnut
29 | Přesnost umístění
30 | Požadovaná přesnost umístění
31 | Vysoká
32 | Střední
33 | Nízká
34 | Popředí služba
35 | Zvýšit prioritu služba
36 | Stav
37 | Informace
38 | Přidat zástupce
39 | Vyčistit
40 | Služba spuštěna
41 | Služba zastavena
42 | Úspěšně odesláno
43 | Odesílání selhalo
44 | Aktualizace pozice
45 | Síť online
46 | Síť offile
47 | Nastavení zařízení
48 | Aplikace byla skryta. Pro znovuotevření vytočte 8722227 (TRACCAR)
49 | Prosím vložte platnou http:// nebo https:// URL
50 | Chcete-li průběžně shromažďovat údaje o poloze, vypněte optimalizaci baterie pro aplikaci.
51 | Chcete-li průběžně shromažďovat údaje o poloze, zapněte \"%s\" oprávnění.
52 | Povolit po celou dobu
53 |
54 |
--------------------------------------------------------------------------------
/app/src/main/java/org/traccar/client/AndroidPositionProvider.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 - 2021 Anton Tananaev (anton@traccar.org)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.traccar.client
17 |
18 | import android.annotation.SuppressLint
19 | import android.content.Context
20 | import android.location.Location
21 | import android.location.LocationListener
22 | import android.location.LocationManager
23 | import android.os.Bundle
24 | import android.os.Looper
25 |
26 | class AndroidPositionProvider(context: Context, listener: PositionListener) : PositionProvider(context, listener), LocationListener {
27 |
28 | private val locationManager = context.getSystemService(Context.LOCATION_SERVICE) as LocationManager
29 | private val provider = getProvider(preferences.getString(MainFragment.KEY_ACCURACY, "medium"))
30 |
31 | @SuppressLint("MissingPermission")
32 | override fun startUpdates() {
33 | try {
34 | locationManager.requestLocationUpdates(
35 | provider, if (distance > 0 || angle > 0) MINIMUM_INTERVAL else interval, 0f, this)
36 | } catch (e: RuntimeException) {
37 | listener.onPositionError(e)
38 | }
39 | }
40 |
41 | override fun stopUpdates() {
42 | locationManager.removeUpdates(this)
43 | }
44 |
45 | @Suppress("DEPRECATION", "MissingPermission")
46 | override fun requestSingleLocation() {
47 | try {
48 | val location = locationManager.getLastKnownLocation(LocationManager.PASSIVE_PROVIDER)
49 | if (location != null) {
50 | listener.onPositionUpdate(Position(deviceId, location, getBatteryStatus(context)))
51 | } else {
52 | locationManager.requestSingleUpdate(provider, object : LocationListener {
53 | override fun onLocationChanged(location: Location) {
54 | listener.onPositionUpdate(Position(deviceId, location, getBatteryStatus(context)))
55 | }
56 |
57 | override fun onStatusChanged(provider: String, status: Int, extras: Bundle) {}
58 | override fun onProviderEnabled(provider: String) {}
59 | override fun onProviderDisabled(provider: String) {}
60 | }, Looper.myLooper())
61 | }
62 | } catch (e: RuntimeException) {
63 | listener.onPositionError(e)
64 | }
65 | }
66 |
67 | override fun onLocationChanged(location: Location) {
68 | processLocation(location)
69 | }
70 |
71 | override fun onStatusChanged(provider: String, status: Int, extras: Bundle) {}
72 | override fun onProviderEnabled(provider: String) {}
73 | override fun onProviderDisabled(provider: String) {}
74 |
75 | private fun getProvider(accuracy: String?): String {
76 | return when (accuracy) {
77 | "high" -> LocationManager.GPS_PROVIDER
78 | "low" -> LocationManager.PASSIVE_PROVIDER
79 | else -> LocationManager.NETWORK_PROVIDER
80 | }
81 | }
82 |
83 | }
84 |
--------------------------------------------------------------------------------
/app/src/main/res/values-nl/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar client
4 | Traccar
5 | Start service
6 | Stop service
7 | Stuur SOS
8 | Standaard kanaal
9 | Toestelidentificatie
10 | Server URL
11 | Tracking server URL
12 | Frequentie
13 | Rapportageinterval in seconden
14 | Afstand
15 | Rapportageafstand in meters
16 | Hoek
17 | Rapportagehoek in graden
18 | Server status
19 | Start
20 | Stop
21 | Service gestopt
22 | Service draait
23 | Offline bufferen
24 | Bufferen uit
25 | Bufferen aan
26 | Slaapstand blokkade
27 | Slaapstand blokkade uit
28 | Slaapstand blokkade aan
29 | Locatienauwkeurigheid
30 | Gewenste lokatienauwkeurigheid
31 | Hoog
32 | Gemiddeld
33 | Laag
34 | Voorgrond service
35 | Verhoog voorrang voor service
36 | Status
37 | Info
38 | Voeg snelkoppelingen toe
39 | Wis
40 | Service gestart
41 | Service gestopt
42 | Succesvol verstuurd
43 | Verzenden mislukt
44 | Locatie update
45 | Netwerk online
46 | Netwerk offline
47 | Toestel instellingen
48 | De app is verborgen. Om hem opnieuw te openen bel je naar 8722227 (TRACCAR).
49 | Voer alstublieft een geldige http:// of https:// URL in
50 | Om continu locatiegegevens te kunnen verzamelen is het noodzakelijk dat accuoptimalisatie voor deze app is uitgeschakeld.
51 | Geef de \"1%s\" permissie om continu locatieinformatie bij te houden.
52 | Altijd toestaan
53 |
54 |
--------------------------------------------------------------------------------
/app/src/main/res/values-fi/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar Client
4 | Traccar
5 | Käynnistä palvelu
6 | Pysäytä palvelu
7 | Lähetä SOS-viesti
8 | Ensisijainen kanava
9 | Laitteen ID
10 | Palvelimen URL
11 | Paikannuspalvelimen URL-osoite
12 | Taajuus
13 | Raportointiväli sekunneissa
14 | Matka
15 | Raportointimatka metreissä
16 | Kulma
17 | Raportointikulma asteissa
18 | Palvelun tila
19 | Aloita
20 | Pysäytä
21 | Palvelu pysäytetty
22 | Palvelu käynnissä
23 | Offline-puskurointi
24 | Puskurointi pois päältä
25 | Puskurointi päälle
26 | Lepotilalukko
27 | Lepotilalukko pois päältä
28 | Lepotilalukko päällä
29 | Sijainnin tarkkuus
30 | Haluttu sijainnin tarkkuus
31 | Korkea
32 | Keskitasoinen
33 | Matala
34 | Edustapalvelu
35 | Lisää palvelun prioriteettia
36 | Tila
37 | Tiedot
38 | Lisää pikakuvakkeet
39 | Tyhjennä
40 | Palvelu käynnistynyt
41 | Palvelu pysähtyi
42 | Lähetys onnistui
43 | Lähetys epäonnistui
44 | Sijainnin päivitys
45 | Yhdistetty verkkoon
46 | Verkkoyhteys katkennut
47 | Laitteen asetukset
48 | Sovellus on piilotettu. Näppäile 8722227 (TRACCAR) avataksesi sovelluksen uudelleen.
49 | Syötä kelvollinen http:// tai https:// URL-osoite
50 | Kerätäksesi jatkuvasti sijaintitietoa, poista akun optimointi käytöstä tältä sovellukselta.
51 | Kerätäksesi jatkuvasti sijaintitietoa, salli \"%s\" käyttöoikeus.
52 | Salli kokoajan
53 |
54 |
--------------------------------------------------------------------------------
/app/src/main/res/values-pl/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar Klient
4 | Traccar
5 | Uruchomienie usługi
6 | Zatrzymanie usługi
7 | Wyślij SOS
8 | Podstawowy kanał
9 | Identyfikator urządzenia
10 | URL Serwera
11 | URL serwera śledzącego
12 | Częstotliwość
13 | Interwał raportowania w sekundach
14 | Dystans
15 | Dystans raportowania w metrach
16 | Kąt
17 | Kąt raportowania w stopniach
18 | Status usługi
19 | Uruchom
20 | Zatrzymaj
21 | Usługa zatrzymana
22 | Usługa uruchomiona
23 | Buforowanie offline
24 | Buforowanie wyłączone
25 | Buforowanie włączone
26 | Wybudź blokadę
27 | Wybudzenie blokady wyłączone
28 | Wybudzenie blokady włączone
29 | Dokładność lokalizacji
30 | Żądana dokładność lokalizacji
31 | Wysoka
32 | Średnia
33 | Niska
34 | Usługa pierwszoplanowa
35 | Zwiększ priorytet usługi
36 | Status
37 | Info
38 | Dodaj skróty
39 | Wyczyść
40 | Usługa uruchomiona
41 | Usługa zatrzymana
42 | Wysłane poprawnie
43 | Wysłanie nieudane
44 | Aktualizacja lokalizacji
45 | Połączony z siecią
46 | Rozłączony z siecią
47 | Ustawienia urządzenia
48 | Aplikacja została ukryta. By ją otworzyć, zadzwoń pod 8722227 (TRACCAR).
49 | Wprowadź poprawny adres http:// lub https:// URL
50 | Do stałego zbierania danych o lokalizacji, należy wyłączyć optymalizację baterii w aplikacji.
51 | Włącz zezwolenie \"%s\", aby ciągle zbierać dane o lokalizacji.
52 | Pozwól cały czas
53 |
54 |
--------------------------------------------------------------------------------
/app/src/main/res/values-hu/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar Kliens
4 | Traccar
5 | Szolgáltatás indítása
6 | Szolgáltatás leállítása
7 | SOS küldése
8 | Elsődleges csatorna
9 | Eszközazonosító
10 | Szerver URL
11 | Nyomkövető szerver URL
12 | Frekvencia
13 | Jelentési időköz másodpercben
14 | Távolság
15 | Jelentés: távolság méterben
16 | Fok
17 | Jelentés: fok szögben
18 | Szolgáltatás státusza
19 | Indítás
20 | Megállítás
21 | Szolgáltatás megállítva
22 | Szolgáltatás elindítva
23 | Offline pufferelés
24 | Pufferelés ki
25 | Pufferelés be
26 | Ébresztési zár
27 | Ébresztési zár ki
28 | Ébresztési zár be
29 | Pozíció pontossága
30 | Kívánt pozíció pontosság
31 | Magas
32 | Közepes
33 | Alacsony
34 | Előtér szolgáltatás
35 | Szolgáltatás prioritásának emelése
36 | Státusz
37 | Infó
38 | Parancsikon hozzáadása
39 | Töröl
40 | Szolgáltatás elindítva
41 | Szolgáltatás leállítva
42 | Küldés sikeres
43 | Küldés sikertelen
44 | Pozíció frissítés
45 | Hálózat aktív
46 | Hálózat nem aktív
47 | Eszköz beállítások
48 | Ez az applikáció el lett rejtve. Megnyitásához kérjük hívja a 8722227 (TRACCAR) telefonszámot.
49 | Adjon meg egy érvényes URL-t (http:// vagy https://)
50 | A folyamatos helyadatok
51 | gyűjtéséhez kapcsolja ki
52 | az alkalmazás akkumulátor
53 | optimazilását.
54 | A folyamatos helyadat gyűjtéshez engedélyezze a \"%s\" jogosultságot.
55 | Mindig engedélyezve
56 |
57 |
--------------------------------------------------------------------------------
/app/src/main/res/values-it/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Traccar Client
4 | Traccar
5 | Avvia servizio
6 | Ferma servizio
7 | Invia SOS
8 | Canale primario
9 | Identificativo dispositivo
10 | Server URL
11 | Tracking server URL
12 | Frequenza
13 | Intervallo in secondi delle segnalazioni
14 | Distanza
15 | Segnalazione distanza in metri
16 | Angolo
17 | Segnalazione angolo in gradi
18 | Stato del servizio
19 | Start
20 | Stop
21 | Servizio arrestato
22 | Servizio avviato
23 | Buffering offline
24 | Buffering spento
25 | Buffering acceso
26 | Wake lock
27 | Wake lock spento
28 | Wake lock acceso
29 | Accuratezza posizione
30 | Precisione desiderata per la posizione
31 | Alta
32 | Media
33 | Bassa
34 | Servizio in primo piano
35 | Aumenta la priorità del servizio
36 | Stato
37 | Informazioni
38 | Aggiungi combinazione rapida
39 | Pulisci
40 | Servizio avviato
41 | Servizio fermato
42 | Invio riuscito
43 | Invio fallito
44 | Aggiornamento posizione
45 | Network online
46 | Network offline
47 | Impostazioni dispositivo
48 | La app è stata nascosta. Per aprirla nuovamente digita 8722227 (TRACCAR).
49 | Per favore inserisci un URL valido http:// o https://
50 | Per abilitare la raccolta continua delle posizioni, disabilita le ottimizzazioni batteria per questa applicazione
51 | Per abilitare la raccolta delle posizione, abilita il permesso \"%s\"
52 | Contenti per tutto il tempo
53 |
54 |
--------------------------------------------------------------------------------
/app/src/main/res/values-pt-rBR/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Cliente Traccar
4 | Traccar
5 | Iniciar serviço
6 | Parar serviço
7 | Enviar SOS
8 | Canal Principal
9 | Identificador do dispositivo
10 | URL do Servidor
11 | URL do servidor de rastreamento
12 | Invervalo
13 | Reportando intervalo em segundos
14 | Distância
15 | Reportando distância em metros
16 | Ângulo
17 | Reportando ângulo em graus
18 | Status do Serviço
19 | Iniciar
20 | Parar
21 | Serviço Parado
22 | Serviço em execução
23 | Offline buffering
24 | Buffering Desligado
25 | Buffering Ligado
26 | Bloqueio de Ativação
27 | Bloqueio de Ativação Desligado
28 | Bloqueio de Ativação Ligado
29 | Precisão de localização
30 | Precisão de localização desejada
31 | Alto
32 | Médio
33 | Baixo
34 | Serviço em primeiro plano
35 | Aumentar a prioridade do serviço
36 | Estado
37 | Informação
38 | Adicionar atalhos
39 | Limpar
40 | Serviço iniciado
41 | Serviço parado
42 | Enviado com Sucesso
43 | Falha no envio
44 | Localização atualizada
45 | Rede online
46 | Rede offline
47 | Configurações do Dispositivo
48 | O aplicativo foi escondido. Para abrir novamente por favor digite 8722227 (TRACCAR).
49 | Digite uma URL http: // ou https: // válida
50 | Para coletar dados de localização continuamente por favor desabilite a economia de bateria para o aplicativo.
51 | Para coletar dados de localização continuamente por favor habilite a permissão \"%s\".
52 | Permitir sempre
53 |
54 |
--------------------------------------------------------------------------------
/app/src/main/res/values-el/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Εφαρμογή Traccar
4 | Traccar
5 | Εκκίνηση υπηρεσίας
6 | Διακοπή υπηρεσίας
7 | Αποστολή SOS
8 | Κύριο κανάλι
9 | Αναγνωριστικό συσκευής
10 | Διεύθυνση διακομιστή
11 | Διεύθυνση διακομιστή παρακολούθησης
12 | Συχνότητα
13 | Διάστημα αναφορών σε δευτερόλεπτα
14 | Απόσταση
15 | Απόσταση αναφορών σε μέτρα
16 | Γωνία
17 | Γωνία αναφορών σε μοίρες
18 | Κατάσταση υπηρεσίας
19 | Εκκίνηση
20 | Παύση
21 | Η υπηρεσία σταμάτησε
22 | Η υπηρεσία εκτελείται
23 | Εκτός σύνδεσης ενδιάμεση αποθήκευση
24 | Ενδιάμεση αποθήκευση απενεργοποιημένη
25 | Ενδιάμεση αποθήκευση ενεργοποιημένη
26 | Κλείδωμα αφύπνισης
27 | Κλείδωμα αφύπνισης απενεργοποιημένο
28 | Κλείδωμα αφύπνισης ενεργοποιημένο
29 | Ακρίβεια θέσης
30 | Επιθυμητή ακρίβεια θέσης
31 | Υψηλή
32 | Μέση
33 | Χαμηλή
34 | Υπηρεσία προσκηνίου
35 | Αύξηση προτεραιότητας της υπηρεσίας
36 | Κατάσταση
37 | Πληροφορίες
38 | Προσθήκη συντόμευσης
39 | Καθαρισμός
40 | Η υπηρεσία εκκινήθηκε
41 | Η υπηρεσία διακόπηκε
42 | Απεστάλη επιτυχώς
43 | Η αποστολή απέτυχε
44 | Ενημέρωση τοποθεσίας
45 | Ενεργό δίκτυο
46 | Ανενεργό δίκτυο
47 | Ρυθμίσεις συσκευής
48 | Η εφαρμογή αποκρύφτηκε. Για να προβληθεί καλέστε 8722227 (TRACCAR)
49 | Παρακαλώ εισάγετε μία έγκυρη http:// ή https:// διεύθυνση
50 | Για να συλλέγετε συνεχώς δεδομένα τοποθεσίας απενεργοποιήστε την βελτιστοποίηση μπαταρίας για την εφαρμογή.
51 | Για να συλλέγετε συνεχώς δεδομένα τοποθεσίας ενεργοποιήστε την επιλογή \"%s\".
52 | Να επιτρέπεται όλη την ώρα
53 |
54 |
--------------------------------------------------------------------------------
/app/src/main/java/org/traccar/client/PositionProvider.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 - 2022 Anton Tananaev (anton@traccar.org)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.traccar.client
17 |
18 | import android.content.Context
19 | import android.content.Intent
20 | import android.content.IntentFilter
21 | import android.content.SharedPreferences
22 | import android.location.Location
23 | import android.os.BatteryManager
24 | import androidx.preference.PreferenceManager
25 | import android.util.Log
26 | import kotlin.math.abs
27 |
28 | abstract class PositionProvider(
29 | protected val context: Context,
30 | protected val listener: PositionListener,
31 | ) {
32 |
33 | interface PositionListener {
34 | fun onPositionUpdate(position: Position)
35 | fun onPositionError(error: Throwable)
36 | }
37 |
38 | protected var preferences: SharedPreferences = PreferenceManager.getDefaultSharedPreferences(context)
39 | protected var deviceId = preferences.getString(MainFragment.KEY_DEVICE, "undefined")!!
40 | protected var interval = preferences.getString(MainFragment.KEY_INTERVAL, "600")!!.toLong() * 1000
41 | protected var distance: Double = preferences.getString(MainFragment.KEY_DISTANCE, "0")!!.toInt().toDouble()
42 | protected var angle: Double = preferences.getString(MainFragment.KEY_ANGLE, "0")!!.toInt().toDouble()
43 | private var lastLocation: Location? = null
44 |
45 | abstract fun startUpdates()
46 | abstract fun stopUpdates()
47 | abstract fun requestSingleLocation()
48 |
49 | protected fun processLocation(location: Location?) {
50 | val lastLocation = this.lastLocation
51 | if (location != null &&
52 | (lastLocation == null || location.time - lastLocation.time >= interval || distance > 0
53 | && location.distanceTo(lastLocation) >= distance || angle > 0
54 | && abs(location.bearing - lastLocation.bearing) >= angle)
55 | ) {
56 | Log.i(TAG, "location new")
57 | this.lastLocation = location
58 | listener.onPositionUpdate(Position(deviceId, location, getBatteryStatus(context)))
59 | } else {
60 | Log.i(TAG, if (location != null) "location ignored" else "location nil")
61 | }
62 | }
63 |
64 | protected fun getBatteryStatus(context: Context): BatteryStatus {
65 | val batteryIntent = context.registerReceiver(null, IntentFilter(Intent.ACTION_BATTERY_CHANGED))
66 | if (batteryIntent != null) {
67 | val level = batteryIntent.getIntExtra(BatteryManager.EXTRA_LEVEL, 0)
68 | val scale = batteryIntent.getIntExtra(BatteryManager.EXTRA_SCALE, 1)
69 | val status = batteryIntent.getIntExtra(BatteryManager.EXTRA_STATUS, -1)
70 | return BatteryStatus(
71 | level = level * 100.0 / scale,
72 | charging = status == BatteryManager.BATTERY_STATUS_CHARGING || status == BatteryManager.BATTERY_STATUS_FULL,
73 | )
74 | }
75 | return BatteryStatus()
76 | }
77 |
78 | companion object {
79 | private val TAG = PositionProvider::class.java.simpleName
80 | const val MINIMUM_INTERVAL: Long = 1000
81 | }
82 |
83 | }
84 |
--------------------------------------------------------------------------------