I have a scenario were i have to download 2 shared library(libbase, libderived) during runtime and load those libraries and invoke a method inside one library. I am able to load it and invoke the method, but dynamic_cast inside the library does not work(it returns null pointer).
If i keep those libs as native dependencies in my android app(including it as jni in the app - libs getting added to lib folder of apk) then dynamic_cast works as expected.
But runtime loading of downloaded libs using system.load(...) or dlopen(...) causes dynamic_cast to return null pointer.
My goal is that dynamic_cast should work for my scenario. Any help would be appreciated.