mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 05:44:20 +01:00
Add Service Status page with service_health_check and report_issue examples
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package com.example.kotlinmpplib
|
||||
|
||||
import breez_sdk.*
|
||||
class ConnectingLsp {
|
||||
fun getServiceStatus(sdk: BlockingBreezServices) {
|
||||
// ANCHOR: health-check-status
|
||||
try {
|
||||
val healthCheck = sdk.serviceHealthCheck()
|
||||
// Log.v("Breez", "Current service status is: ${healthCheck.status}")
|
||||
} catch (e: Exception) {
|
||||
// Handle error
|
||||
}
|
||||
// ANCHOR_END: health-check-status
|
||||
}
|
||||
|
||||
fun reportPaymentFailure(sdk: BlockingBreezServices) {
|
||||
// ANCHOR: report-payment-failure
|
||||
val paymentHash = "..."
|
||||
try {
|
||||
sdk.reportIssue(ReportIssueRequest.PaymentFailure(
|
||||
ReportPaymentFailureDetails(paymentHash)))
|
||||
} catch (e: Exception) {
|
||||
// Handle error
|
||||
}
|
||||
// ANCHOR_END: report-payment-failure
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user