Feedback
The in-app feedback messenger ships as its own extension module, bugsee-android-feedback. Add it (via the Gradle plugin or an explicit dependency) when you want the feedback UI.
Bugsee provides a built-in, in-app messenger that lets your users talk to your support and developers. In 7.x this feature is packaged as an extension, so apps that don't need it don't pay for it.
Installation
Feedback ships as the bugsee-android-feedback extension module. Once it is on the classpath it activates automatically with the SDK — there is no manual wiring or registerExtension(...) call to make from your code.
With the Gradle plugin (recommended)
If you use the Bugsee Gradle plugin, opt the module in from the bugsee { } block and the plugin pulls in the matching version for you. It is off by default, so add this line to enable it:
- Kotlin DSL (build.gradle.kts)
- Groovy (build.gradle)
bugsee {
feedback.set(true)
}
bugsee {
feedback.set true
}
Manual dependency
Without the plugin (for example a Maven-only setup), declare the extension alongside the core SDK yourself, matching its version:
- Kotlin DSL (build.gradle.kts)
- Groovy (build.gradle)
dependencies {
implementation("com.bugsee:bugsee-android:7.0.0")
implementation("com.bugsee:bugsee-android-feedback:7.0.0")
}
dependencies {
implementation 'com.bugsee:bugsee-android:7.0.0'
implementation 'com.bugsee:bugsee-android-feedback:7.0.0'
}
Retrieving the extension
All feedback APIs live on the Feedback contract interface, which you retrieve from the SDK through Bugsee.ext(...). The call returns null when the bugsee-android-feedback module is not on the classpath, so always null-check the result — your code keeps compiling even if a downstream consumer drops the extension.
- Java
- Kotlin
import com.bugsee.library.Bugsee;
import com.bugsee.library.contracts.extensions.Feedback;
Feedback feedback = Bugsee.ext(Feedback.class);
if (feedback != null) {
feedback.showFeedbackActivity();
}
import com.bugsee.library.Bugsee
import com.bugsee.library.contracts.extensions.Feedback
val feedback = Bugsee.ext(Feedback::class.java)
feedback?.showFeedbackActivity()
For an overview of how the extension framework works in 7.x (registration, lifecycle, Bugsee.ext(...) lookup), see the Bugsee extensions page.
API
The Feedback contract exposes the following methods:
fun showFeedbackActivity()
fun setDefaultFeedbackGreeting(greeting: String?)
fun setOnNewFeedbackListener(listener: FeedbackListener?)
Showing the feedback activity
- Java
- Kotlin
Feedback feedback = Bugsee.ext(Feedback.class);
if (feedback != null) {
feedback.showFeedbackActivity();
}
Bugsee.ext(Feedback::class.java)?.showFeedbackActivity()
New message notifications
Register a FeedbackListener to be notified about feedback activity. It has two callbacks: onNewMessagesReceived(List<String>) fires when new messages arrive from your support team, and onNewMessageSent(String) fires when the user sends one. Pass null to clear a previously set listener.
onNewMessagesReceived may be invoked on a background thread. Marshal to the main thread before touching UI.
- Java
- Kotlin
import com.bugsee.library.contracts.feedback.FeedbackListener;
import java.util.List;
Feedback feedback = Bugsee.ext(Feedback.class);
if (feedback != null) {
feedback.setOnNewFeedbackListener(new FeedbackListener() {
@Override
public void onNewMessagesReceived(List<String> newMessages) {
// New messages received from your support team.
}
@Override
public void onNewMessageSent(String message) {
// A message the user just sent.
}
});
}
import com.bugsee.library.contracts.feedback.FeedbackListener
Bugsee.ext(Feedback::class.java)?.setOnNewFeedbackListener(object : FeedbackListener {
override fun onNewMessagesReceived(newMessages: List<String>) {
// New messages received from your support team.
}
override fun onNewMessageSent(message: String) {
// A message the user just sent.
}
})
Default greeting
A default greeting can be set on the server in your application settings. For cases when the network is not available, you can also set a client-side fallback:
- Java
- Kotlin
Feedback feedback = Bugsee.ext(Feedback.class);
if (feedback != null) {
feedback.setDefaultFeedbackGreeting("Hi! How can we help?");
}
Bugsee.ext(Feedback::class.java)?.setDefaultFeedbackGreeting("Hi! How can we help?")
Appearance
The feedback chat UI is themed through the FeedbackAppearance contract interface, which ships inside bugsee-android-feedback and is only on the classpath when the extension is installed. It exposes constants such as FeedbackAppearance.ActionBarColor, FeedbackAppearance.IncomingBubbleColor, FeedbackAppearance.OutgoingBubbleColor, FeedbackAppearance.InputTextColor and friends, which you pass to the unified appearance API:
Appearance appearance = Bugsee.getAppearance();
appearance.setColor(FeedbackAppearance.OutgoingBubbleColor, Color.BLUE);
See the Appearance page for the full list of FeedbackAppearance keys and the rest of the appearance API.