Added Firebase analytics.
This commit is contained in:
parent
f8df79e7ff
commit
cb71b27243
4 changed files with 25 additions and 3 deletions
|
@ -1,6 +1,7 @@
|
|||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'com.google.gms.google-services'
|
||||
id 'io.fabric'
|
||||
id 'kotlin-android'
|
||||
id 'kotlin-android-extensions'
|
||||
id 'kotlin-kapt'
|
||||
|
@ -46,6 +47,7 @@ dependencies {
|
|||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
implementation 'com.google.firebase:firebase-analytics:17.2.0'
|
||||
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
|
||||
|
||||
implementation 'androidx.legacy:legacy-support-v13:1.0.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ProgrammingActivity"
|
||||
android:parentActivityName=".MainActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".StepsActivity"
|
||||
|
|
|
@ -20,10 +20,12 @@ package net.thauvin.erik.android.tesremoteprogrammer
|
|||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.appcompat.app.AppCompatDelegate
|
||||
import mehdi.sakout.aboutpage.AboutPage
|
||||
import mehdi.sakout.aboutpage.Element
|
||||
import net.thauvin.erik.android.tesremoteprogrammer.util.fromHtml
|
||||
import java.util.Calendar
|
||||
|
||||
/**
|
||||
|
@ -47,18 +49,33 @@ class AboutActivity : AppCompatActivity() {
|
|||
setImage(R.drawable.background_splash)
|
||||
val version = String.format(getString(R.string.about_version), BuildConfig.VERSION_NAME)
|
||||
setDescription(
|
||||
"${version}\n© ${Calendar.getInstance().get(Calendar.YEAR)} Erik C. Thauvin️"
|
||||
"<strong>$version</strong><br><small>© ${Calendar.getInstance().get(Calendar.YEAR)} Erik C. Thauvin</small>️".fromHtml()
|
||||
)
|
||||
addEmail("erik@thauvin.net")
|
||||
addGitHub("ethauvin/TESRemoteProgrammer")
|
||||
addWebsite("https://m.thauvin.net/android/TESRemoteProgrammer/licenses.shtml")
|
||||
addItem(getPrivacyPolicy())
|
||||
addTwitter("ethauvin")
|
||||
|
||||
if (BuildConfig.DEBUG) {
|
||||
addItem(getCrashTest())
|
||||
}
|
||||
}.create()
|
||||
|
||||
setContentView(aboutPage)
|
||||
}
|
||||
|
||||
private fun getCrashTest(): Element {
|
||||
return Element().apply {
|
||||
title = "Crash Test"
|
||||
iconDrawable = android.R.drawable.ic_dialog_alert
|
||||
iconTint = R.color.about_github_color
|
||||
onClickListener = View.OnClickListener {
|
||||
throw RuntimeException("This is a crash!")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun getPrivacyPolicy(): Element {
|
||||
return Element().apply {
|
||||
title = getString(R.string.about_privacy)
|
||||
|
@ -67,7 +84,7 @@ class AboutActivity : AppCompatActivity() {
|
|||
value = "privacy"
|
||||
intent = Intent(
|
||||
Intent.ACTION_VIEW,
|
||||
Uri.parse("https://m.thauvin.net/apps-privacy.shtml")
|
||||
Uri.parse("https://m.thauvin.net/android/TESRemoteProgrammer/privacy.shtml")
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,13 +5,15 @@ buildscript {
|
|||
repositories {
|
||||
jcenter()
|
||||
google()
|
||||
maven { url = uri("https://plugins.gradle.org/m2/") }
|
||||
maven { url 'https://plugins.gradle.org/m2/' }
|
||||
maven { url 'https://maven.fabric.io/public' }
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.5.0'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath 'org.jmailen.gradle:kotlinter-gradle:2.1.1'
|
||||
classpath 'com.google.gms:google-services:4.3.2'
|
||||
classpath 'io.fabric.tools:gradle:1.31.1'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue