1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-30 14:02:56 +01:00

Add link to background service troubleshoot page

This commit is contained in:
José Rebelo 2024-10-22 22:18:17 +01:00
parent 69530de0c6
commit e25757846f
2 changed files with 5 additions and 5 deletions

View File

@ -270,16 +270,16 @@ public class GBApplication extends Application {
startService(new Intent(this, NotificationCollectorMonitorService.class));
} catch (IllegalStateException e) {
String message = e.toString();
if (message == null) {
message = getString(R.string._unknown_);
}
final Intent instructionsIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://gadgetbridge.org/basics/topics/background-service/"));
final PendingIntent pi = PendingIntentUtils.getActivity(context, 0, instructionsIntent, PendingIntent.FLAG_ONE_SHOT, false);
GB.notify(NOTIFICATION_ID_ERROR,
new NotificationCompat.Builder(this, NOTIFICATION_CHANNEL_HIGH_PRIORITY_ID)
.setSmallIcon(R.drawable.ic_notification)
.setContentTitle(getString(R.string.error_background_service))
.setContentText(getString(R.string.error_background_service_reason_truncated))
.setContentIntent(pi)
.setStyle(new NotificationCompat.BigTextStyle()
.bigText(getString(R.string.error_background_service_reason) + "\"" + message + "\""))
.bigText(getString(R.string.error_background_service_reason) + " \"" + message + "\""))
.setPriority(NotificationCompat.PRIORITY_DEFAULT)
.build(), context);
}

View File

@ -2135,7 +2135,7 @@
<string name="device_requires_key">KEY REQUIRED, LONG PRESS TO ENTER</string>
<string name="device_unsupported">UNSUPPORTED</string>
<string name="device_experimental">EXPERIMENTAL</string>
<string name="error_background_service_reason">Starting the background service failed because of an exception. Error: </string>
<string name="error_background_service_reason">Starting the background service failed because of an exception - click here for more information.\n\nError:</string>
<string name="pref_check_permission_status">Check permission status</string>
<string name="pref_check_permission_status_summary">Check and ask for missing permissions even when they might not be instantly needed. Disable this only if your devices actually doesn\'t support any of these features. Not granting a permission might cause issues!</string>
<string name="pref_show_changelog">Show changelog on startup</string>