How to cast native context to react native context

Solution for How to cast native context to react native context
is Given Below:

I am new to React native. I need to call a function from React native module in my Native Android Module.
I am trying to cast my native context to React native module but it is showing error and app is crashing.
Error –
com.raushan.ui.activities.BaseActivity cannot be cast to com.raushan.application.CalculateApp
Code is –

ReactInstanceManager mReactInstanceManager = ((CalculateApp) context).getReactNativeHost().getReactInstanceManager();
ReactApplicationContext reactContext = (ReactApplicationContext) mReactInstanceManager.getCurrentReactContext();
reactContext.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).emit("login_event", "login_event");```


Please help.