I have two build options, one of which is in debugging, and the other is release. I have to run some block of code in release mode. For example, I should use Firebase only in release builds, is there any way to do this?
To check the release mode, use
if( BuildConfig.BUILD_TYPE.equalsIgnoreCase("release")) { }
debug mode check
if( BuildConfig.BUILD_TYPE.equalsIgnoreCase("debug")) { }
or you can use this code
if( BuildConfig.DEBUG ){ }
use BuildConfig.DEBUGfor checking in debug mode
BuildConfig.DEBUG
Source: https://habr.com/ru/post/1662009/More articles:wso2 - handlers and sequence - wso2How to specify a common type when one of the types is not needed? - rustсвязывание ошибки в функции друга класса шаблона - c++The difference between [src] and src in Angular2 - angularНекоторые события JQuery Mobile touch не срабатывают - javascriptNearest Laravel stores - eloquentIs there a way to match the first n characters in an elixir string - elixirImport data from a JSON or XML feed and create a list on Android - javadropzone.js: __slice = [] .slice - javascriptHow to remove "Select This Location" from the GMSPlacePicker - iosAll Articles