diff --git a/.gitignore b/.gitignore index dcdc776b..d3062615 100644 --- a/.gitignore +++ b/.gitignore @@ -81,3 +81,4 @@ lint/generated/ lint/outputs/ lint/tmp/ # lint/reports/ +app/src/main/res/values/api_keys.xml diff --git a/.idea/misc.xml b/.idea/misc.xml index 8a8f75bf..703e5d4b 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -5,7 +5,7 @@ - + diff --git a/README.md b/README.md index f7e35d0b..26f2eb59 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,11 @@ This is being done as a hobby, and for experimenting, so probably there might be some flaws; As an example, the vendor ID of Arduino is hardcoded to only work with Arduino devices, but this is my use case and please feel free to change it to match your needs. + # Install + The app is available for free on Google Play Store (Arduino USB Terminal). + Otherwise, you can clone the project and run it locally. + Please read the **Sentry Reports** part on this page before running the project to avoid build failures. + ## Terminal A Simple terminal page which does what it is supposed to do interacting with an Arduino manually through the USB cable. @@ -14,9 +19,20 @@ ## Tests Under Construction + ## Sentry Reports + The project uses Sentry for the crash reports, if this is not needed, you can remove the following line in `AndroidManifest.xml`: + `` + But if it is needed, you need to [create a Sentry dsn value](https://docs.sentry.io/platforms/android/) to put under the following path: + `app/src/main/res/values/api_keys.xml` + The file contents might look like similar to this: + ` + + YOUR_SENTRY_SPECIFIC_VALUE + ` + + ### Knows Issues - _On Android 5.1.1, the Arduino serial output cannot be shown. (It is said that an Android internal bug is the issue!)_ This was hopefully solved using LiveData - The Arduino output characters might be shown a bit weird in the app while skipping some characters when the message is too long. This will be fixed as I figure out the reason! Any suggestions will be appreciated. :) + _Still unknown! :) Suggestions and PRs are welcome! :) diff --git a/app/build.gradle b/app/build.gradle index f7ab94c3..8b3a99de 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -3,9 +3,13 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'koin' +repositories { + jcenter() +} + android { compileSdkVersion 29 - buildToolsVersion "29.0.2" + buildToolsVersion "29.0.3" compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -39,6 +43,9 @@ dependencies { implementation 'androidx.core:core-ktx:1.2.0' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + // Sentry Tracking + implementation 'io.sentry:sentry-android-core:2.0.2' + // Koin for Android - ViewModel features implementation "org.koin:koin-android-viewmodel:$koin_version" diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index c201b95a..5a260235 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -3,6 +3,8 @@ package="org.kabiri.android.usbterminal"> + + + + + diff --git a/app/src/main/java/org/kabiri/android/usbterminal/MainActivity.kt b/app/src/main/java/org/kabiri/android/usbterminal/MainActivity.kt index 58aaa229..43f3a631 100644 --- a/app/src/main/java/org/kabiri/android/usbterminal/MainActivity.kt +++ b/app/src/main/java/org/kabiri/android/usbterminal/MainActivity.kt @@ -1,6 +1,5 @@ package org.kabiri.android.usbterminal -import android.content.Intent import android.os.Bundle import android.text.SpannableString import android.text.method.ScrollingMovementMethod @@ -10,10 +9,12 @@ import android.view.MenuInflater import android.view.MenuItem import androidx.appcompat.app.AppCompatActivity import androidx.lifecycle.Observer +import io.sentry.core.Sentry import kotlinx.android.synthetic.main.activity_main.* import org.kabiri.android.usbterminal.viewmodel.MainActivityViewModel import org.koin.android.viewmodel.ext.android.viewModel + class MainActivity : AppCompatActivity() { companion object { diff --git a/build.gradle b/build.gradle index 522521cc..c7f904f8 100644 --- a/build.gradle +++ b/build.gradle @@ -1,12 +1,11 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.3.71' + ext.kotlin_version = '1.3.72' ext.koin_version = '2.1.5' repositories { google() jcenter() - } dependencies { classpath 'com.android.tools.build:gradle:3.6.3'