How to stop loading data from realtime database before the start of the activity?
I know that the realtime database is of asynchronous type. But is there any way to stop loading data before the start of the activity. I have lot of data that these activities loads, which is not required. I want to decrease the usage of loading realtime database data. Even if I am wrong please correct me.
This is the code:-
class Profile : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)...