In Bugfender you have the option to enable/disable individual devices from logging using the user interface. However, there are situations where you want to programatically decide to send logs regardless.
In order to do that, you can use the following two options from code:
forceSendOnce: Synchronizes all logs with the server once, only for the current execution of the app.
setForceEnabled(boolean): If force enabled, synchronizes all logs with the server all the time, until setForceEnabled(false) is called.
Both commands can be called anytime, and will take effect the next time the device is online beginning with the current execution of the app.
Please note it is not possible to disable logging programmatically, overriding the setting in the user interface.