Custom Dialog and Translation
Hi, can Bugshaker support custom dialog and custom string resources (to support multi-language)?
Hi @ryanhoo95!
From a quick review of the library, it looks like the email subject line can be replaced with a localized string, but that's about it.
The dialog strings are currently hard-coded: https://github.com/stkent/bugshaker-android/blob/8ff33357268c151782ec934f4e5502609756d7cd/bugshaker/src/main/java/com/github/stkent/bugshaker/flow/dialog/DialogProvider.java#L26-L29
as are the email field strings: https://github.com/stkent/bugshaker-android/blob/8ff33357268c151782ec934f4e5502609756d7cd/bugshaker/src/main/java/com/github/stkent/bugshaker/flow/email/FeedbackEmailIntentProvider.java#L94-L102
Which of these strings were you looking to localize (or was it others that I missed)? I have some ideas how to proceed but would like to learn more about what your goal is first :)
Hi @stkent , I wish to customize the dialog string, as well as the whole dialog, because I customize every dialog in my app.
Ok! What do you mean by
as well as the whole dialog
What other parts of the dialog would you ideally like to be able to control/change?
Is it possible for something like this: When init the bugshaker in Application class, we can add in a shake listenser, implement custom dialog inside the listener.
Hmm, I think I understand now. I can explore this a bit tomorrow and see whether this is feasible or not, and I'll report back here afterwards!
@stkent Thanks...
Hi @ryanhoo95,
I have created a new version of the library for you to test! Please download it from here and place it in your project's libs folder, and then temporarily replace your existing dependency on the published BugShaker with
implementation files('libs/bugshaker-release.aar')
The documentation for this version can be found here. In particular, please try out the new setCustomDialogProvider method and see if it works for your use case. Let me know how the test goes, and if it's successful I can create a new release.
A quick test using the new version of the library to create a custom dialog in the sample app:

Hi stkent, Sorry for the late reply, been very busy lately. The link given returns 404. Have you already removed the project? Thanks.
Hi @ryanhoo95,
No worries! That temporary file-sharing site must only keep files for 24 hours or so. Here's a link that should last a little longer: https://drive.google.com/open?id=1jRtMXQpmLpzwvPKhk3ZjZ_8u98XqZLrp
Let me know if it works for you when you're able :)
Hi @ryanhoo95,
Any update on how that new version worked out for you?
Cheers!
Hey Stkent, can you share me also the link ? your library is awesome, I tried to pass a custom dialog with the dialogProvider instance the parameter is a closure with activity and a listener, but how can I custom the colors/strings ?
Hi @Dave181295,
I haven't actually released v2.0.0 of the library yet; I'll do that tomorrow. Once that's available you should be able to customize the dialog fully.
Hope that helps,
Stuart
OK, v2.0.0 is out, please try it out!
dependencies {
implementation("com.github.stkent:bugshaker:2.0.0")
}