mirror of
https://github.com/dzeiocom/crashhandler.git
synced 2025-04-22 10:52:16 +00:00
misc: update deps (#7)
This commit is contained in:
parent
09cb0abcb7
commit
7df7308b9d
@ -4,7 +4,7 @@ buildscript {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath("com.android.tools.build:gradle:7.3.1")
|
||||
classpath("com.android.tools.build:gradle:7.4.2")
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
@ -12,8 +12,8 @@ buildscript {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id("com.android.application") version "7.3.1" apply false
|
||||
id("com.android.library") version "7.3.1" apply false
|
||||
id("com.android.application") version "7.4.2" apply false
|
||||
id("com.android.library") version "7.4.2" apply false
|
||||
id("org.jetbrains.kotlin.android") version "1.7.0" apply false
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ publishing {
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "${group}.${artifact}"
|
||||
namespace = "$group.$artifact"
|
||||
compileSdk = 33
|
||||
buildToolsVersion = "33.0.0"
|
||||
|
||||
@ -35,7 +35,6 @@ android {
|
||||
minCompileSdk = 21
|
||||
}
|
||||
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles("consumer-rules.pro")
|
||||
}
|
||||
@ -77,5 +76,5 @@ android {
|
||||
|
||||
dependencies {
|
||||
// Necessary for the Activity (well to make it pretty :D)
|
||||
implementation("com.google.android.material:material:1.6.1")
|
||||
}
|
||||
implementation("com.google.android.material:material:1.8.0")
|
||||
}
|
||||
|
@ -20,7 +20,10 @@ android {
|
||||
buildTypes {
|
||||
release {
|
||||
isMinifyEnabled = true
|
||||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,7 +34,7 @@ android {
|
||||
kotlinOptions {
|
||||
jvmTarget = "11"
|
||||
}
|
||||
|
||||
|
||||
buildFeatures {
|
||||
viewBinding = true
|
||||
}
|
||||
@ -40,13 +43,13 @@ android {
|
||||
dependencies {
|
||||
|
||||
implementation(project(":library"))
|
||||
|
||||
|
||||
// Material Design
|
||||
implementation("com.google.android.material:material:1.6.1")
|
||||
implementation("com.google.android.material:material:1.8.0")
|
||||
|
||||
// Navigation because I don't want to maintain basic transactions and shit
|
||||
implementation("androidx.navigation:navigation-fragment-ktx:2.5.1")
|
||||
implementation("androidx.navigation:navigation-fragment-ktx:2.5.3")
|
||||
|
||||
// preferences
|
||||
implementation("androidx.preference:preference-ktx:1.2.0")
|
||||
}
|
||||
}
|
||||
|
@ -19,8 +19,4 @@ class Application : android.app.Application() {
|
||||
.withSuffix("WHYYYYY")
|
||||
.build().setup()
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val TAG = "CrashHandlerTest"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,16 +9,11 @@ import android.os.Process
|
||||
import android.widget.Toast
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.view.WindowCompat
|
||||
import com.dzeio.crashhandlertest.Application
|
||||
import com.dzeio.crashhandlertest.databinding.ActivityErrorBinding
|
||||
import kotlin.system.exitProcess
|
||||
|
||||
class ErrorActivity : AppCompatActivity() {
|
||||
|
||||
companion object {
|
||||
const val TAG = "${Application.TAG}/ErrorActivity"
|
||||
}
|
||||
|
||||
private lateinit var binding: ActivityErrorBinding
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
@ -31,7 +26,12 @@ class ErrorActivity : AppCompatActivity() {
|
||||
val data = intent.getStringExtra("error")
|
||||
|
||||
// Get Application datas
|
||||
val deviceToReport = if (Build.DEVICE.contains(Build.MANUFACTURER)) Build.DEVICE else "${Build.MANUFACTURER} ${Build.DEVICE}"
|
||||
val deviceToReport =
|
||||
if (Build.DEVICE.contains(Build.MANUFACTURER)) {
|
||||
Build.DEVICE
|
||||
} else {
|
||||
"${Build.MANUFACTURER} ${Build.DEVICE}"
|
||||
}
|
||||
|
||||
val reportText = """
|
||||
Crash Report (Thread: ${intent?.getLongExtra("threadId", -1) ?: "unknown"})
|
||||
@ -52,11 +52,9 @@ class ErrorActivity : AppCompatActivity() {
|
||||
|
||||
// Handle the Email Button
|
||||
binding.errorSubmitEmail.setOnClickListener {
|
||||
|
||||
// Create Intent
|
||||
val intent = Intent(Intent.ACTION_SEND)
|
||||
intent.data = Uri.parse("mailto:")
|
||||
intent.type = "text/plain"
|
||||
intent.setDataAndType(Uri.parse("mailto:"), "text/plain")
|
||||
intent.putExtra(Intent.EXTRA_EMAIL, arrayOf("report.openhealth@dzeio.com"))
|
||||
intent.putExtra(Intent.EXTRA_SUBJECT, "Error report for application crash")
|
||||
intent.putExtra(Intent.EXTRA_TEXT, "Send Report Email\n$reportText")
|
||||
@ -70,7 +68,6 @@ class ErrorActivity : AppCompatActivity() {
|
||||
|
||||
// Handle the GitHub Button
|
||||
binding.errorSubmitGithub.setOnClickListener {
|
||||
|
||||
// Build URL
|
||||
val url = "https://github.com/dzeiocom/OpenHealth/issues/new?title=Application Error&body=$reportText"
|
||||
|
||||
|
@ -19,13 +19,12 @@ class MainFragment : Fragment() {
|
||||
private val binding get() = _binding!!
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
|
||||
): View {
|
||||
_binding = FragmentMainBinding.inflate(inflater, container, false)
|
||||
return binding.root
|
||||
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
@ -41,4 +40,4 @@ class MainFragment : Fragment() {
|
||||
super.onDestroyView()
|
||||
_binding = null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user