The Java Native Interface (aka JNI) allows Java code to interoperate with C/C++ code.
These are notes taken from https://docs.oracle.com/en/java/javase/18/docs/specs/jni/
How does Java code interoperate with C/C++ code (aka "native code") ?
The Java Native Interface (aka JNI) allows Java code to interoperate with C/C++ code.
These are notes taken from https://docs.oracle.com/en/java/javase/18/docs/specs/jni/
How does Java code interoperate with C/C++ code (aka "native code") ?
A service is an application component that performs work in the background, without a visible user-interface. For example, a service could be an audio player playing music while the user is in another app or has the device locked. While the current song is playing, the service might also be retrieving the next song from the network.
A service runs in the main thread of its hosting app process; the service does not create its own thread and does not run in a separate process unless you specify otherwise. You should run any blocking operations on a separate thread within the service to avoid Application Not Responding (ANR) errors.
As with other application components, the service class must be a top-level class (i.e. not an inner class of another class) and be declared in the manifest. (In the manifest) you can declare such class as: