native service, EGL, native test client
This commit is contained in:
16
src/main/cpp/mosis-test.cpp
Normal file
16
src/main/cpp/mosis-test.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <jni.h>
|
||||
#include <android/binder_ibinder_jni.h>
|
||||
#include <aidl/com/omixlab/mosis/IMosisService.h>
|
||||
#include "logger.h"
|
||||
|
||||
using namespace aidl::com::omixlab::mosis;
|
||||
|
||||
std::shared_ptr<IMosisService> g_service;
|
||||
extern "C"
|
||||
JNIEXPORT void JNICALL
|
||||
Java_com_omixlab_mosis_MainActivity_serviceConnected(JNIEnv *env, jobject thiz, jobject binder) {
|
||||
AIBinder* pBinder = AIBinder_fromJavaBinder(env, binder);
|
||||
const ndk::SpAIBinder spBinder(pBinder);
|
||||
g_service = IMosisService::fromBinder(spBinder);
|
||||
Logger::Log("Service Connected");
|
||||
}
|
||||
Reference in New Issue
Block a user