Skip to content

Commit

Permalink
initial version
Browse files Browse the repository at this point in the history
  • Loading branch information
dkrutskikh committed Apr 5, 2021
1 parent 11dd10b commit e28d16c
Show file tree
Hide file tree
Showing 96 changed files with 2,526 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.DS_Store
.dart_tool/

.idea/*
!.idea/codeStyles
!.idea/inspectionProfiles
*.iml

.packages
.pub/

build/

Podfile.lock
pubspec.lock
130 changes: 130 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/inspectionProfiles/ktlint.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"default": true,
"//MD033": "inline HTML tags warning",
"MD033": false,
"//MD013": "line-length > 80 warning",
"MD013": false
}
10 changes: 10 additions & 0 deletions .metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.

version:
revision: 84f3d28555368a70270e9ac8390a9441df95e752
channel: unknown

project_type: plugin
14 changes: 14 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "telematics_sdk_example",
"cwd": "example",
"request": "launch",
"type": "dart",
},
]
}
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"cSpell.words": [
"telematics"
]
}
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 0.0.1

* TODO: Describe initial release.
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TODO: Add your license here.
90 changes: 89 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,89 @@
# telematicsSDK-demoapp-flutter-
# Telematics SDK

A flutter plugin for tracking the person's driving behavior such as speeding, turning, braking and several other things on iOS and Android.

__Disclaimer__: This project uses Telematics SDK which belongs to DATA MOTION PTE. LTD.
When using Telematics SDK refer to these [terms of use](https://docs.telematicssdk.com/license)

## Getting Started

### Initial app setup & credentials

For commercial use, you need create sandbox account [DataHub](https://userdatahub.com/user/registration) and get `InstanceId` auth keys to work with our API.

### Android

#### AndroidManifest.xml

add to file ./app/src/main/AndroidManifest.xml props:

1. 'xmlns:tools="http://schemas.android.com/tools"' into __manifest__ tag
2. 'tools:replace="android:label"' into __application tag

as shown below:

``` xml
<manifest
xmlns:tools="http://schemas.android.com/tools">
<application
tools:replace="android:label">
...
</application>
...
</manifest>

```

add network permissions

``` xml
<manifest>
...
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
...
```

#### Proguard

``` markdown
-keep public class com.raxeltelematics.** {*;}
```

### Android Advanced

#### SetTrackingSettings

1. Override application class extends __TelematicsSDKApp__

``` kotlin
import com.telematicssdk.TelematicsSDKApp

class App: TelematicsSDKApp() {
//...
}
```

2. add to tag __application__ of file ./app/src/main/AndroidManifest.xml this class __name__:

``` xml
<application
android:name=".App">
...
</application>

```

3. add Raxel repository into (module)/gradle.build

```groovy
dependencies {
//...
implementation "com.telematicssdk:tracking: 2.2.231"
}
```

## Links

[https://telematicssdk.com/](https://telematicssdk.com/)
8 changes: 8 additions & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
51 changes: 51 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
group 'com.telematicssdk'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.4.31'
ext.raxel_tracking = '2.2.248'
repositories {
google()
jcenter()
}

dependencies {
//noinspection GradleDependency
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

rootProject.allprojects {
repositories {
google()
jcenter()
maven {
url "https://s3.us-east-2.amazonaws.com/android.telematics.sdk.production/"
}
}
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 29

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
minSdkVersion 18
// javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true
}
lintOptions {
disable 'InvalidPackage'
}
}

dependencies {
//noinspection GradleDependency
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "com.telematicssdk:tracking:$raxel_tracking"
}
3 changes: 3 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
5 changes: 5 additions & 0 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
1 change: 1 addition & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = 'telematics_sdk'
Loading

0 comments on commit e28d16c

Please sign in to comment.