I have an application in that whenever the internet connectivity changes , I need to make some variables in another activities unclickable. Since internet connectivity might change in the first activity , hence the 2nd activity wont have any idea if the internet connectivity is there or not .
I need a way to create a global variable or a class which holds this status , So that all the activity can get the variable value and handle responses accordingly .
My initial idea was to create a base activity and make another activities inherit it. But since that is a bad use of inheritence , I am searching for some other solutions.
Is there anything like that build in inside android or kotlin , Except for sharedPreferences ?