I have an Android System Service [SS.java] with several methods. It has been added to Service Manager. I need to call one of the methods from a native service[N.cpp] or a native shared library.
From N.cpp, I am able to use defaultservicemanager()->getService("servicename") for native services.
But, is it possible to use a similar approach to call SS.Java?
Currently SS.java does not have any native component. It only has a corresponding ss.aidl.
Is a native interface needed? It is not possible to perform the implementation for the required method in native code because of dependencies.
It would be great if someone could give a detailed explanation of how to call a Java layer system service method from native code.