Upgrade to the Firebase Crashlytics SDK.
This commit is contained in:
parent
ba6b9ab642
commit
255821238a
22 changed files with 84 additions and 77 deletions
|
@ -3,8 +3,8 @@ apply plugin: 'kotlin-android'
|
|||
apply plugin: 'kotlin-android-extensions'
|
||||
apply plugin: 'kotlin-kapt'
|
||||
apply plugin: "androidx.navigation.safeargs.kotlin"
|
||||
apply plugin: 'io.fabric'
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
apply plugin: 'com.google.firebase.crashlytics'
|
||||
|
||||
// Needed for Kotlin's @Parcelize annotation
|
||||
androidExtensions {
|
||||
|
@ -32,17 +32,14 @@ android {
|
|||
}
|
||||
}
|
||||
buildTypes {
|
||||
debug {
|
||||
minifyEnabled false
|
||||
resValue("string", "PORT_NUMBER", "8082")
|
||||
}
|
||||
release {
|
||||
minifyEnabled true
|
||||
shrinkResources true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
// enable crashlytics
|
||||
ext.enableCrashlytics = true
|
||||
}
|
||||
debug {
|
||||
resValue("string", "PORT_NUMBER", "8082")
|
||||
// disable crashlytics
|
||||
ext.enableCrashlytics = false
|
||||
}
|
||||
}
|
||||
android.packagingOptions {
|
||||
|
@ -109,8 +106,8 @@ dependencies {
|
|||
implementation 'com.squareup.okhttp3:logging-interceptor:4.2.0'
|
||||
implementation 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
|
||||
//Firebase
|
||||
implementation 'com.google.firebase:firebase-core:17.2.1'
|
||||
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
|
||||
implementation 'com.google.firebase:firebase-analytics:18.0.0'
|
||||
implementation 'com.google.firebase:firebase-crashlytics:17.3.0'
|
||||
// CSV generation
|
||||
implementation 'com.opencsv:opencsv:3.7'
|
||||
// Others
|
||||
|
|
5
app/proguard-rules.pro
vendored
5
app/proguard-rules.pro
vendored
|
@ -132,9 +132,8 @@
|
|||
|
||||
##--------------- proguard configuration for Crashlytics ----------
|
||||
# source https://firebase.google.com/docs/crashlytics/get-deobfuscated-reports?platform=android
|
||||
-keepattributes *Annotation* # Keep Crashlytics annotations
|
||||
-keepattributes SourceFile,LineNumberTable # Keep file names/line numbers
|
||||
-keep public class * extends java.lang.Exception # Keep custom exceptions (opt)
|
||||
-keepattributes SourceFile,LineNumberTable # Keep file names and line numbers.
|
||||
-keep public class * extends java.lang.Exception # Optional: Keep custom exceptions.
|
||||
|
||||
|
||||
##--------------- proguard configuration for Coroutines ----------
|
||||
|
|
|
@ -11,9 +11,7 @@ import androidx.appcompat.app.AppCompatActivity
|
|||
import androidx.core.content.pm.PackageInfoCompat
|
||||
import androidx.lifecycle.Observer
|
||||
import androidx.lifecycle.ViewModelProviders
|
||||
import com.crashlytics.android.Crashlytics
|
||||
import com.crashlytics.android.core.CrashlyticsCore
|
||||
import cy.agorise.bitsybitshareswallet.BuildConfig
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||
import cy.agorise.bitsybitshareswallet.database.entities.Balance
|
||||
import cy.agorise.bitsybitshareswallet.database.entities.Transfer
|
||||
import cy.agorise.bitsybitshareswallet.processors.TransfersLoader
|
||||
|
@ -26,6 +24,7 @@ import cy.agorise.bitsybitshareswallet.viewmodels.TransferViewModel
|
|||
import cy.agorise.bitsybitshareswallet.viewmodels.UserAccountViewModel
|
||||
import cy.agorise.graphenej.Asset
|
||||
import cy.agorise.graphenej.AssetAmount
|
||||
import cy.agorise.graphenej.BuildConfig
|
||||
import cy.agorise.graphenej.UserAccount
|
||||
import cy.agorise.graphenej.api.ApiAccess
|
||||
import cy.agorise.graphenej.api.ConnectionStatusUpdate
|
||||
|
@ -34,7 +33,6 @@ import cy.agorise.graphenej.api.android.RxBus
|
|||
import cy.agorise.graphenej.api.calls.*
|
||||
import cy.agorise.graphenej.models.*
|
||||
import cy.agorise.graphenej.network.FullNode
|
||||
import io.fabric.sdk.android.Fabric
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.disposables.CompositeDisposable
|
||||
|
@ -109,10 +107,7 @@ abstract class ConnectedActivity : AppCompatActivity() {
|
|||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
val crashlytics = Crashlytics.Builder()
|
||||
.core(CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build())
|
||||
.build()
|
||||
Fabric.with(this, crashlytics)
|
||||
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(!BuildConfig.DEBUG)
|
||||
|
||||
getUserAccount()
|
||||
|
||||
|
@ -198,7 +193,8 @@ abstract class ConnectedActivity : AppCompatActivity() {
|
|||
mCurrentAccount = UserAccount(userId)
|
||||
|
||||
// Make sure crashlytics reports contains the account ID
|
||||
Crashlytics.setString(Constants.CRASHLYTICS_KEY_ACCOUNT_ID, userId)
|
||||
val crashlytics = FirebaseCrashlytics.getInstance()
|
||||
crashlytics.setCustomKey(Constants.CRASHLYTICS_KEY_ACCOUNT_ID, userId)
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -211,7 +207,8 @@ abstract class ConnectedActivity : AppCompatActivity() {
|
|||
for (e in stack) {
|
||||
Log.e(TAG, String.format("%s#%s:%d", e.className, e.methodName, e.lineNumber))
|
||||
}
|
||||
Crashlytics.log(Log.ERROR, TAG, "ConnectedActivity reporting error. Msg: ${throwable.message}")
|
||||
val crashlytics = FirebaseCrashlytics.getInstance()
|
||||
crashlytics.log("E/$TAG: ConnectedActivity reporting error. Msg: ${throwable.message}")
|
||||
}
|
||||
|
||||
private fun handleIncomingMessage(message: Any?) {
|
||||
|
@ -253,8 +250,9 @@ abstract class ConnectedActivity : AppCompatActivity() {
|
|||
} else if (message is ConnectionStatusUpdate) {
|
||||
if (message.updateCode == ConnectionStatusUpdate.CONNECTED) {
|
||||
// Make sure the Crashlytics report contains the currently selected node
|
||||
val selectedNode = mNetworkService?.selectedNode
|
||||
Crashlytics.log(selectedNode?.url)
|
||||
val selectedNodeUrl = mNetworkService?.selectedNode?.url ?: ""
|
||||
val crashlytics = FirebaseCrashlytics.getInstance()
|
||||
crashlytics.setCustomKey(Constants.CRASHLYTICS_KEY_CURRENT_NODE, selectedNodeUrl)
|
||||
} else if (message.updateCode == ConnectionStatusUpdate.DISCONNECTED) {
|
||||
// If we got a disconnection notification, we should clear our response map, since
|
||||
// all its stored request ids will now be reset
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package cy.agorise.bitsybitshareswallet.fragments
|
||||
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import androidx.core.os.ConfigurationCompat
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.crashlytics.android.Crashlytics
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||
import cy.agorise.bitsybitshareswallet.utils.Constants
|
||||
import cy.agorise.graphenej.api.ConnectionStatusUpdate
|
||||
import cy.agorise.graphenej.api.android.NetworkService
|
||||
|
@ -34,7 +33,8 @@ abstract class ConnectedFragment : Fragment() {
|
|||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
val locale = ConfigurationCompat.getLocales(resources.configuration)[0]
|
||||
Crashlytics.setString(Constants.CRASHLYTICS_KEY_LANGUAGE, locale.displayName)
|
||||
val crashlytics = FirebaseCrashlytics.getInstance()
|
||||
crashlytics.setCustomKey(Constants.CRASHLYTICS_KEY_LANGUAGE, locale.displayName)
|
||||
|
||||
// Connect to the RxBus, which receives events from the NetworkService
|
||||
mDisposables.add(
|
||||
|
@ -43,7 +43,7 @@ abstract class ConnectedFragment : Fragment() {
|
|||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(
|
||||
{ handleIncomingMessage(it) } ,
|
||||
{ Crashlytics.log(Log.DEBUG, TAG, it.message) }
|
||||
{ crashlytics.log("D/$TAG: ${it.message}") }
|
||||
)
|
||||
)
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ import java.io.IOException
|
|||
import java.io.InputStreamReader
|
||||
import java.util.concurrent.TimeUnit
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.crashlytics.android.Crashlytics
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||
import cy.agorise.bitsybitshareswallet.models.FaucetRequest
|
||||
import cy.agorise.bitsybitshareswallet.models.FaucetResponse
|
||||
import cy.agorise.bitsybitshareswallet.network.ServiceGenerator
|
||||
|
@ -72,7 +72,8 @@ class CreateAccountFragment : BaseAccountFragment() {
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
Crashlytics.setString(Constants.CRASHLYTICS_KEY_LAST_SCREEN, TAG)
|
||||
val crashlytics = FirebaseCrashlytics.getInstance()
|
||||
crashlytics.setCustomKey(Constants.CRASHLYTICS_KEY_LAST_SCREEN, TAG)
|
||||
|
||||
// Use RxJava Debounce to check the validity and availability of the user's proposed account name
|
||||
mDisposables.add(
|
||||
|
@ -82,7 +83,7 @@ class CreateAccountFragment : BaseAccountFragment() {
|
|||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(
|
||||
{ validateAccountName(it.toString()) },
|
||||
{ Crashlytics.log(Log.DEBUG, TAG, it.message) }
|
||||
{ crashlytics.log("D/$TAG: ${it.message}") }
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -94,7 +95,7 @@ class CreateAccountFragment : BaseAccountFragment() {
|
|||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(
|
||||
{ validatePIN() },
|
||||
{ Crashlytics.log(Log.DEBUG, TAG, it.message) }
|
||||
{ crashlytics.log("D/$TAG: ${it.message}") }
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -106,7 +107,7 @@ class CreateAccountFragment : BaseAccountFragment() {
|
|||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(
|
||||
{ validatePINConfirmation() },
|
||||
{ Crashlytics.log(Log.DEBUG, TAG, it.message) }
|
||||
{ crashlytics.log("D/$TAG: ${it.message}") }
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -353,7 +354,8 @@ class CreateAccountFragment : BaseAccountFragment() {
|
|||
context?.toast(getString(R.string.error__read_dict_file))
|
||||
findNavController().navigateUp()
|
||||
} catch (e: IllegalArgumentException) {
|
||||
Crashlytics.logException(e)
|
||||
val crashlytics = FirebaseCrashlytics.getInstance()
|
||||
crashlytics.recordException(e)
|
||||
// TODO if this does happen to real devices, use a proper error message
|
||||
context?.toast(getString(R.string.error__try_again))
|
||||
findNavController().navigateUp()
|
||||
|
|
|
@ -15,7 +15,7 @@ import androidx.fragment.app.Fragment
|
|||
import androidx.lifecycle.Observer
|
||||
import androidx.lifecycle.ViewModelProviders
|
||||
import androidx.navigation.fragment.navArgs
|
||||
import com.crashlytics.android.Crashlytics
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||
|
||||
import cy.agorise.bitsybitshareswallet.R
|
||||
import cy.agorise.bitsybitshareswallet.database.joins.TransferDetail
|
||||
|
@ -53,7 +53,8 @@ class EReceiptFragment : Fragment() {
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
Crashlytics.setString(Constants.CRASHLYTICS_KEY_LAST_SCREEN, TAG)
|
||||
val crashlytics = FirebaseCrashlytics.getInstance()
|
||||
crashlytics.setCustomKey(Constants.CRASHLYTICS_KEY_LAST_SCREEN, TAG)
|
||||
|
||||
mLocale = ConfigurationCompat.getLocales(resources.configuration)[0]
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import androidx.core.os.ConfigurationCompat
|
|||
import androidx.fragment.app.Fragment
|
||||
import androidx.lifecycle.ViewModelProviders
|
||||
import androidx.lifecycle.Observer
|
||||
import com.crashlytics.android.Crashlytics
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||
import cy.agorise.bitsybitshareswallet.R
|
||||
import cy.agorise.bitsybitshareswallet.adapters.BalancesDetailsAdapter
|
||||
import cy.agorise.bitsybitshareswallet.database.joins.BalanceDetail
|
||||
|
@ -105,7 +105,8 @@ class FilterOptionsDialog : DialogFragment(), DatePickerFragment.OnDateSetListen
|
|||
|
||||
onAttachToParentFragment(parentFragment!!)
|
||||
|
||||
Crashlytics.setString(Constants.CRASHLYTICS_KEY_LAST_SCREEN, TAG)
|
||||
val crashlytics = FirebaseCrashlytics.getInstance()
|
||||
crashlytics.setCustomKey(Constants.CRASHLYTICS_KEY_LAST_SCREEN, TAG)
|
||||
|
||||
mFilterOptions = arguments?.getParcelable(KEY_FILTER_OPTIONS)!!
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ import cy.agorise.bitsybitshareswallet.utils.Constants
|
|||
import cy.agorise.bitsybitshareswallet.viewmodels.UserAccountViewModel
|
||||
import kotlinx.android.synthetic.main.fragment_home.*
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.crashlytics.android.Crashlytics
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||
|
||||
|
||||
class HomeFragment : Fragment() {
|
||||
|
@ -64,7 +64,8 @@ class HomeFragment : Fragment() {
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
Crashlytics.setString(Constants.CRASHLYTICS_KEY_LAST_SCREEN, TAG)
|
||||
val crashlytics = FirebaseCrashlytics.getInstance()
|
||||
crashlytics.setCustomKey(Constants.CRASHLYTICS_KEY_LAST_SCREEN, TAG)
|
||||
|
||||
// Get version number of the last agreed license version
|
||||
val agreedLicenseVersion = PreferenceManager.getDefaultSharedPreferences(context)
|
||||
|
|
|
@ -14,7 +14,7 @@ import com.afollestad.materialdialogs.callbacks.onDismiss
|
|||
import com.afollestad.materialdialogs.list.customListAdapter
|
||||
import com.afollestad.materialdialogs.list.getRecyclerView
|
||||
import com.afollestad.materialdialogs.list.listItemsSingleChoice
|
||||
import com.crashlytics.android.Crashlytics
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||
import com.jakewharton.rxbinding3.widget.textChanges
|
||||
import cy.agorise.bitsybitshareswallet.BuildConfig
|
||||
import cy.agorise.bitsybitshareswallet.R
|
||||
|
@ -83,7 +83,8 @@ class ImportBrainkeyFragment : BaseAccountFragment() {
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
Crashlytics.setString(Constants.CRASHLYTICS_KEY_LAST_SCREEN, TAG)
|
||||
val crashlytics = FirebaseCrashlytics.getInstance()
|
||||
crashlytics.setCustomKey(Constants.CRASHLYTICS_KEY_LAST_SCREEN, TAG)
|
||||
|
||||
// Use RxJava Debounce to update the PIN error only after the user stops writing for > 500 ms
|
||||
mDisposables.add(
|
||||
|
@ -93,7 +94,7 @@ class ImportBrainkeyFragment : BaseAccountFragment() {
|
|||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(
|
||||
{ validatePIN() },
|
||||
{ Crashlytics.log(Log.DEBUG, TAG, it.message) }
|
||||
{ crashlytics.log("D/$TAG: ${it.message}") }
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -105,7 +106,7 @@ class ImportBrainkeyFragment : BaseAccountFragment() {
|
|||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(
|
||||
{ validatePINConfirmation() },
|
||||
{ Crashlytics.log(Log.DEBUG, TAG, it.message) }
|
||||
{ crashlytics.log("D/$TAG: ${it.message}") }
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -118,7 +119,7 @@ class ImportBrainkeyFragment : BaseAccountFragment() {
|
|||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(
|
||||
{ validateBrainKey(it) },
|
||||
{ Crashlytics.log(Log.DEBUG, TAG, it.message) }
|
||||
{ crashlytics.log("D/$TAG: ${it.message}") }
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import android.view.ViewGroup
|
|||
import androidx.appcompat.widget.Toolbar
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.navigation.fragment.findNavController
|
||||
import com.crashlytics.android.Crashlytics
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||
import cy.agorise.bitsybitshareswallet.R
|
||||
import cy.agorise.bitsybitshareswallet.utils.Constants
|
||||
import kotlinx.android.synthetic.main.fragment_license.*
|
||||
|
@ -30,7 +30,8 @@ class LicenseFragment : Fragment() {
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
Crashlytics.setString(Constants.CRASHLYTICS_KEY_LAST_SCREEN, TAG)
|
||||
val crashlytics = FirebaseCrashlytics.getInstance()
|
||||
crashlytics.setCustomKey(Constants.CRASHLYTICS_KEY_LAST_SCREEN, TAG)
|
||||
|
||||
// Get version number of the last agreed license version
|
||||
val agreedLicenseVersion = PreferenceManager.getDefaultSharedPreferences(context)
|
||||
|
|
|
@ -22,7 +22,6 @@ import androidx.lifecycle.Observer
|
|||
import androidx.lifecycle.ViewModelProviders
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.afollestad.materialdialogs.customview.customView
|
||||
import com.crashlytics.android.Crashlytics
|
||||
import com.google.android.gms.maps.CameraUpdateFactory
|
||||
import com.google.android.gms.maps.GoogleMap
|
||||
import com.google.android.gms.maps.OnMapReadyCallback
|
||||
|
@ -31,6 +30,7 @@ import com.google.android.gms.maps.model.LatLng
|
|||
import com.google.android.gms.maps.model.LatLngBounds
|
||||
import com.google.android.gms.maps.model.MapStyleOptions
|
||||
import com.google.android.gms.maps.model.Marker
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||
import com.google.maps.android.MarkerManager
|
||||
import com.google.maps.android.clustering.Cluster
|
||||
import com.google.maps.android.clustering.ClusterItem
|
||||
|
@ -124,7 +124,8 @@ class MerchantsFragment : Fragment(), OnMapReadyCallback, SearchView.OnSuggestio
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
Crashlytics.setString(Constants.CRASHLYTICS_KEY_LAST_SCREEN, TAG)
|
||||
val crashlytics = FirebaseCrashlytics.getInstance()
|
||||
crashlytics.setCustomKey(Constants.CRASHLYTICS_KEY_LAST_SCREEN, TAG)
|
||||
|
||||
// Dynamically obtain status bar and navigation bar heights, and account for the status bar height to add
|
||||
// the correct top margin to the Toolbar and place it just below the status bar
|
||||
|
|
|
@ -7,7 +7,7 @@ import android.view.View
|
|||
import android.view.ViewGroup
|
||||
import android.view.WindowManager
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import com.crashlytics.android.Crashlytics
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||
import com.jakewharton.rxbinding3.widget.textChanges
|
||||
import cy.agorise.bitsybitshareswallet.R
|
||||
import cy.agorise.bitsybitshareswallet.utils.Constants
|
||||
|
@ -35,7 +35,8 @@ class PINSecurityLockDialog : BaseSecurityLockDialog() {
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
Crashlytics.setString(Constants.CRASHLYTICS_KEY_LAST_SCREEN, TAG)
|
||||
val crashlytics = FirebaseCrashlytics.getInstance()
|
||||
crashlytics.setCustomKey(Constants.CRASHLYTICS_KEY_LAST_SCREEN, TAG)
|
||||
|
||||
// Request focus to the PIN EditText and automatically show the keyboard when the dialog appears.
|
||||
tietPIN.requestFocus()
|
||||
|
|
|
@ -9,7 +9,7 @@ import cy.agorise.bitsybitshareswallet.R
|
|||
import kotlinx.android.synthetic.main.dialog_pattern_security_lock.*
|
||||
import com.andrognito.patternlockview.PatternLockView
|
||||
import com.andrognito.patternlockview.listener.PatternLockViewListener
|
||||
import com.crashlytics.android.Crashlytics
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||
import cy.agorise.bitsybitshareswallet.utils.Constants
|
||||
import cy.agorise.bitsybitshareswallet.utils.CryptoUtils
|
||||
|
||||
|
@ -33,7 +33,8 @@ class PatternSecurityLockDialog : BaseSecurityLockDialog() {
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
Crashlytics.setString(Constants.CRASHLYTICS_KEY_LAST_SCREEN, TAG)
|
||||
val crashlytics = FirebaseCrashlytics.getInstance()
|
||||
crashlytics.setCustomKey(Constants.CRASHLYTICS_KEY_LAST_SCREEN, TAG)
|
||||
|
||||
setupScreen()
|
||||
|
||||
|
|
|
@ -13,8 +13,8 @@ import androidx.collection.LongSparseArray
|
|||
import androidx.core.content.ContextCompat
|
||||
import androidx.lifecycle.Observer
|
||||
import androidx.lifecycle.ViewModelProviders
|
||||
import com.crashlytics.android.Crashlytics
|
||||
import com.google.common.primitives.UnsignedLong
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||
import com.jakewharton.rxbinding3.widget.textChanges
|
||||
import cy.agorise.bitsybitshareswallet.R
|
||||
import cy.agorise.bitsybitshareswallet.adapters.AssetsAdapter
|
||||
|
@ -100,7 +100,8 @@ class ReceiveTransactionFragment : ConnectedFragment() {
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
Crashlytics.setString(Constants.CRASHLYTICS_KEY_LAST_SCREEN, TAG)
|
||||
val crashlytics = FirebaseCrashlytics.getInstance()
|
||||
crashlytics.setCustomKey(Constants.CRASHLYTICS_KEY_LAST_SCREEN, TAG)
|
||||
|
||||
// Configure ViewModel
|
||||
mViewModel = ViewModelProviders.of(this).get(ReceiveTransactionViewModel::class.java)
|
||||
|
@ -286,7 +287,7 @@ class ReceiveTransactionFragment : ConnectedFragment() {
|
|||
updateAmountAddressUI(amount, asset.symbol, asset.precision, mUserAccount!!.name)
|
||||
} catch (e: NullPointerException) {
|
||||
Log.e(TAG, "NullPointerException. Msg: " + e.message)
|
||||
Crashlytics.logException(e)
|
||||
FirebaseCrashlytics.getInstance().recordException(e)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -18,9 +18,9 @@ import androidx.navigation.fragment.findNavController
|
|||
import androidx.navigation.fragment.navArgs
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.afollestad.materialdialogs.customview.customView
|
||||
import com.crashlytics.android.Crashlytics
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import com.google.common.primitives.UnsignedLong
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||
import com.google.zxing.BarcodeFormat
|
||||
import com.google.zxing.Result
|
||||
import com.jakewharton.rxbinding3.widget.textChanges
|
||||
|
@ -137,7 +137,8 @@ class SendTransactionFragment : ConnectedFragment(), ZXingScannerView.ResultHand
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
Crashlytics.setString(Constants.CRASHLYTICS_KEY_LAST_SCREEN, TAG)
|
||||
val crashlytics = FirebaseCrashlytics.getInstance()
|
||||
crashlytics.setCustomKey(Constants.CRASHLYTICS_KEY_LAST_SCREEN, TAG)
|
||||
|
||||
val userId = PreferenceManager.getDefaultSharedPreferences(context)
|
||||
.getString(Constants.KEY_CURRENT_ACCOUNT_ID, "") ?: ""
|
||||
|
@ -154,7 +155,7 @@ class SendTransactionFragment : ConnectedFragment(), ZXingScannerView.ResultHand
|
|||
try {
|
||||
wifKey = CryptoUtils.decrypt(it, encryptedWIF)
|
||||
} catch (e: Exception) {
|
||||
Crashlytics.logException(e)
|
||||
crashlytics.recordException(e)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -17,8 +17,8 @@ import com.afollestad.materialdialogs.callbacks.onDismiss
|
|||
import com.afollestad.materialdialogs.customview.customView
|
||||
import com.afollestad.materialdialogs.list.customListAdapter
|
||||
import com.afollestad.materialdialogs.list.listItemsSingleChoice
|
||||
import com.crashlytics.android.Crashlytics
|
||||
import com.google.common.primitives.UnsignedLong
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||
import cy.agorise.bitsybitshareswallet.BuildConfig
|
||||
import cy.agorise.bitsybitshareswallet.R
|
||||
import cy.agorise.bitsybitshareswallet.adapters.FullNodesAdapter
|
||||
|
@ -98,7 +98,8 @@ class SettingsFragment : ConnectedFragment(), BaseSecurityLockDialog.OnPINPatter
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
Crashlytics.setString(Constants.CRASHLYTICS_KEY_LAST_SCREEN, TAG)
|
||||
val crashlytics = FirebaseCrashlytics.getInstance()
|
||||
crashlytics.setCustomKey(Constants.CRASHLYTICS_KEY_LAST_SCREEN, TAG)
|
||||
|
||||
val userId = PreferenceManager.getDefaultSharedPreferences(context)
|
||||
.getString(Constants.KEY_CURRENT_ACCOUNT_ID, "") ?: ""
|
||||
|
@ -122,7 +123,7 @@ class SettingsFragment : ConnectedFragment(), BaseSecurityLockDialog.OnPINPatter
|
|||
} catch (e: AEADBadTagException) {
|
||||
Log.e(TAG, "AEADBadTagException. Class: " + e.javaClass + ", Msg: " + e.message)
|
||||
} catch (e: IllegalStateException) {
|
||||
Crashlytics.logException(e)
|
||||
crashlytics.recordException(e)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -16,7 +16,7 @@ import androidx.lifecycle.ViewModelProviders
|
|||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.afollestad.materialdialogs.list.listItemsMultiChoice
|
||||
import com.crashlytics.android.Crashlytics
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||
import com.jakewharton.rxbinding3.appcompat.queryTextChangeEvents
|
||||
import cy.agorise.bitsybitshareswallet.R
|
||||
import cy.agorise.bitsybitshareswallet.adapters.TransfersDetailsAdapter
|
||||
|
@ -55,7 +55,8 @@ class TransactionsFragment : Fragment(), FilterOptionsDialog.OnFilterOptionsSele
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
Crashlytics.setString(Constants.CRASHLYTICS_KEY_LAST_SCREEN, TAG)
|
||||
val crashlytics = FirebaseCrashlytics.getInstance()
|
||||
crashlytics.setCustomKey(Constants.CRASHLYTICS_KEY_LAST_SCREEN, TAG)
|
||||
|
||||
val userId = PreferenceManager.getDefaultSharedPreferences(context)
|
||||
.getString(Constants.KEY_CURRENT_ACCOUNT_ID, "") ?: ""
|
||||
|
|
|
@ -2,7 +2,7 @@ package cy.agorise.bitsybitshareswallet.repositories
|
|||
|
||||
import android.os.AsyncTask
|
||||
import android.util.Log
|
||||
import com.crashlytics.android.Crashlytics
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||
import cy.agorise.bitsybitshareswallet.database.daos.NodeDao
|
||||
import cy.agorise.bitsybitshareswallet.database.entities.Node
|
||||
import cy.agorise.bitsybitshareswallet.network.BitsyWebservice
|
||||
|
@ -100,7 +100,7 @@ class NodeRepository(private val nodeDao: NodeDao) {
|
|||
}
|
||||
} catch (e: Exception) {
|
||||
// Generic exception handling
|
||||
Crashlytics.logException(e)
|
||||
FirebaseCrashlytics.getInstance().recordException(e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package cy.agorise.bitsybitshareswallet.utils
|
|||
|
||||
import android.app.Application
|
||||
import android.util.Log
|
||||
import com.crashlytics.android.Crashlytics
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||
import cy.agorise.bitsybitshareswallet.database.BitsyDatabase
|
||||
import cy.agorise.bitsybitshareswallet.network.NetworkServiceManager
|
||||
import cy.agorise.bitsybitshareswallet.repositories.NodeRepository
|
||||
|
@ -34,7 +34,7 @@ class BitsyApplication : Application() {
|
|||
// exception to Crashlytics so that we can fix the issues
|
||||
RxJavaPlugins.setErrorHandler { throwable ->
|
||||
Log.e("RxJava Error", throwable.message)
|
||||
Crashlytics.logException(throwable)
|
||||
FirebaseCrashlytics.getInstance().recordException(throwable)
|
||||
}
|
||||
|
||||
appScope = CoroutineScope(Dispatchers.Main + applicationJob)
|
||||
|
|
|
@ -158,6 +158,9 @@ object Constants {
|
|||
/** Key used to add the account ID to the Crashlytics report*/
|
||||
const val CRASHLYTICS_KEY_ACCOUNT_ID = "crashlytics_key_account_id"
|
||||
|
||||
/** Key used to add the current node the app is connected to to the Crashlytics report*/
|
||||
const val CRASHLYTICS_KEY_CURRENT_NODE = "crashlytics_key_current_node"
|
||||
|
||||
/** Definition of the system core (BTS) asset id */
|
||||
const val CORE_ASSET = "1.3.0"
|
||||
}
|
||||
|
|
|
@ -11,17 +11,13 @@ buildscript {
|
|||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
maven {
|
||||
url 'https://maven.fabric.io/public'
|
||||
}
|
||||
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.5.3'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
|
||||
classpath 'com.google.gms:google-services:4.3.3'
|
||||
classpath 'io.fabric.tools:gradle:1.29.0'
|
||||
classpath 'com.google.gms:google-services:4.3.4'
|
||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.4.1'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
|
Loading…
Reference in a new issue