Accessing composable function from within non-composable function

  android, android-jetpack-compose, jetpack, kotlin

Is there any way using android jetpack compose to access a composable function or an ambientOf value from within a non-composable function? For instance, I have a val in MainActivity that I would like to access/modify from within a non-composable function. Is this possible? If so, how do I go about doing this.

Source: Android Questions