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()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
dependencies {
|
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
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
@ -12,8 +12,8 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.application") version "7.3.1" apply false
|
id("com.android.application") version "7.4.2" apply false
|
||||||
id("com.android.library") version "7.3.1" apply false
|
id("com.android.library") version "7.4.2" apply false
|
||||||
id("org.jetbrains.kotlin.android") version "1.7.0" apply false
|
id("org.jetbrains.kotlin.android") version "1.7.0" apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ publishing {
|
|||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = "${group}.${artifact}"
|
namespace = "$group.$artifact"
|
||||||
compileSdk = 33
|
compileSdk = 33
|
||||||
buildToolsVersion = "33.0.0"
|
buildToolsVersion = "33.0.0"
|
||||||
|
|
||||||
@ -35,7 +35,6 @@ android {
|
|||||||
minCompileSdk = 21
|
minCompileSdk = 21
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
consumerProguardFiles("consumer-rules.pro")
|
consumerProguardFiles("consumer-rules.pro")
|
||||||
}
|
}
|
||||||
@ -77,5 +76,5 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// Necessary for the Activity (well to make it pretty :D)
|
// 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 {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
isMinifyEnabled = true
|
isMinifyEnabled = true
|
||||||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
proguardFiles(
|
||||||
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||||
|
"proguard-rules.pro"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,10 +45,10 @@ dependencies {
|
|||||||
implementation(project(":library"))
|
implementation(project(":library"))
|
||||||
|
|
||||||
// Material Design
|
// 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
|
// 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
|
// preferences
|
||||||
implementation("androidx.preference:preference-ktx:1.2.0")
|
implementation("androidx.preference:preference-ktx:1.2.0")
|
||||||
|
@ -19,8 +19,4 @@ class Application : android.app.Application() {
|
|||||||
.withSuffix("WHYYYYY")
|
.withSuffix("WHYYYYY")
|
||||||
.build().setup()
|
.build().setup()
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
|
||||||
const val TAG = "CrashHandlerTest"
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -9,16 +9,11 @@ import android.os.Process
|
|||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.core.view.WindowCompat
|
import androidx.core.view.WindowCompat
|
||||||
import com.dzeio.crashhandlertest.Application
|
|
||||||
import com.dzeio.crashhandlertest.databinding.ActivityErrorBinding
|
import com.dzeio.crashhandlertest.databinding.ActivityErrorBinding
|
||||||
import kotlin.system.exitProcess
|
import kotlin.system.exitProcess
|
||||||
|
|
||||||
class ErrorActivity : AppCompatActivity() {
|
class ErrorActivity : AppCompatActivity() {
|
||||||
|
|
||||||
companion object {
|
|
||||||
const val TAG = "${Application.TAG}/ErrorActivity"
|
|
||||||
}
|
|
||||||
|
|
||||||
private lateinit var binding: ActivityErrorBinding
|
private lateinit var binding: ActivityErrorBinding
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
@ -31,7 +26,12 @@ class ErrorActivity : AppCompatActivity() {
|
|||||||
val data = intent.getStringExtra("error")
|
val data = intent.getStringExtra("error")
|
||||||
|
|
||||||
// Get Application datas
|
// 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 = """
|
val reportText = """
|
||||||
Crash Report (Thread: ${intent?.getLongExtra("threadId", -1) ?: "unknown"})
|
Crash Report (Thread: ${intent?.getLongExtra("threadId", -1) ?: "unknown"})
|
||||||
@ -52,11 +52,9 @@ class ErrorActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
// Handle the Email Button
|
// Handle the Email Button
|
||||||
binding.errorSubmitEmail.setOnClickListener {
|
binding.errorSubmitEmail.setOnClickListener {
|
||||||
|
|
||||||
// Create Intent
|
// Create Intent
|
||||||
val intent = Intent(Intent.ACTION_SEND)
|
val intent = Intent(Intent.ACTION_SEND)
|
||||||
intent.data = Uri.parse("mailto:")
|
intent.setDataAndType(Uri.parse("mailto:"), "text/plain")
|
||||||
intent.type = "text/plain"
|
|
||||||
intent.putExtra(Intent.EXTRA_EMAIL, arrayOf("report.openhealth@dzeio.com"))
|
intent.putExtra(Intent.EXTRA_EMAIL, arrayOf("report.openhealth@dzeio.com"))
|
||||||
intent.putExtra(Intent.EXTRA_SUBJECT, "Error report for application crash")
|
intent.putExtra(Intent.EXTRA_SUBJECT, "Error report for application crash")
|
||||||
intent.putExtra(Intent.EXTRA_TEXT, "Send Report Email\n$reportText")
|
intent.putExtra(Intent.EXTRA_TEXT, "Send Report Email\n$reportText")
|
||||||
@ -70,7 +68,6 @@ class ErrorActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
// Handle the GitHub Button
|
// Handle the GitHub Button
|
||||||
binding.errorSubmitGithub.setOnClickListener {
|
binding.errorSubmitGithub.setOnClickListener {
|
||||||
|
|
||||||
// Build URL
|
// Build URL
|
||||||
val url = "https://github.com/dzeiocom/OpenHealth/issues/new?title=Application Error&body=$reportText"
|
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!!
|
private val binding get() = _binding!!
|
||||||
|
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
inflater: LayoutInflater, container: ViewGroup?,
|
inflater: LayoutInflater,
|
||||||
|
container: ViewGroup?,
|
||||||
savedInstanceState: Bundle?
|
savedInstanceState: Bundle?
|
||||||
): View? {
|
): View {
|
||||||
|
|
||||||
_binding = FragmentMainBinding.inflate(inflater, container, false)
|
_binding = FragmentMainBinding.inflate(inflater, container, false)
|
||||||
return binding.root
|
return binding.root
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user