Skip to content

Instantly share code, notes, and snippets.

@mukeshsolanki
Last active April 11, 2022 05:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mukeshsolanki/c3d4650457749545fbd546a06c506a6e to your computer and use it in GitHub Desktop.
Save mukeshsolanki/c3d4650457749545fbd546a06c506a6e to your computer and use it in GitHub Desktop.
class ExampleApp : Application(), ExceptionListener {
override fun onCreate() {
super.onCreate()
setupExceptionHandler()
}
override fun uncaughtException(thread: Thread, throwable: Throwable) {
// TODO Make sure you are logging this issue some where like Crashlytics.
// Also indicate that something went wrong to the user like maybe a dialog or an activity.
Log.d("ExampleApp", t.message)
}
fun setupExceptionHandler(){
Handler(Looper.getMainLooper()).post {
while (true) {
try {
Looper.loop()
} catch (e: Throwable) {
uncaughtException(Looper.getMainLooper().thread, e)
}
}
}
Thread.setDefaultUncaughtExceptionHandler { t, e ->
uncaughtException(t, e)
}
}
}
@otoo-peacemaker
Copy link

yes
Alright thanks.

@otoo-peacemaker
Copy link

Please, what's the current version of this library?

dependencies {
implementation 'com.github.mukeshsolanki:Google-Places-AutoComplete-EditText:'
}

@mukeshsolanki
Copy link
Author

Please, what's the current version of this library?

dependencies { implementation 'com.github.mukeshsolanki:Google-Places-AutoComplete-EditText:' }

This is no longer being supported and the library has been deprecated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment