<?xml version="1.0" encoding="UTF-8"?>
-<project name="ManagerActivity" default="help">
+<project name="OpenCV Manager" default="help">
<!-- The local.properties file is created and updated by the 'android' tool.
It contains the path to the SDK. It should *NOT* be checked into
NativeService/CommonPackageManager.cpp \
JNIWrapper/JavaBasedPackageManager.cpp \
NativeService/PackageInfo.cpp \
- JNIWrapper/HardwareDetector_jni.cpp
+ JNIWrapper/HardwareDetector_jni.cpp \
+ JNIWrapper/OpenCVLibraryInfo.cpp
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/include \
--- /dev/null
+#include "OpenCVLibraryInfo.h"
+
+JNIEXPORT jlong JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_open
+ (JNIEnv * env, jobject, jstring)
+{
+ return 255;
+}
+
+JNIEXPORT jstring JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_getPackageName
+ (JNIEnv* env, jobject, jlong)
+{
+ return env->NewStringUTF("org.opencv.lib_v24_tegra3");
+}
+
+JNIEXPORT jstring JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_getPublicName
+(JNIEnv* env, jobject, jlong)
+{
+ return env->NewStringUTF("OpenCV library for Tegra3");
+}
+
+JNIEXPORT jstring JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_getLibraryList
+ (JNIEnv* env, jobject, jlong)
+{
+ return env->NewStringUTF("");
+}
+
+JNIEXPORT jstring JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_getVersionName
+ (JNIEnv* env, jobject, jlong)
+{
+ return env->NewStringUTF("9.9");
+}
+
+JNIEXPORT void JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_close
+ (JNIEnv* env, jobject, jlong)
+{
+
+}
--- /dev/null
+#include <jni.h>
+
+#ifndef _Included_org_opencv_engine_OpenCVLibraryInfo
+#define _Included_org_opencv_engine_OpenCVLibraryInfo
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+JNIEXPORT jlong JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_open
+ (JNIEnv *, jobject, jstring);
+
+JNIEXPORT jstring JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_getPackageName
+ (JNIEnv *, jobject, jlong);
+
+ JNIEXPORT jstring JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_getPublicName
+ (JNIEnv *, jobject, jlong);
+
+JNIEXPORT jstring JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_getLibraryList
+ (JNIEnv *, jobject, jlong);
+
+JNIEXPORT jstring JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_getVersionName
+ (JNIEnv *, jobject, jlong);
+
+JNIEXPORT void JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_close
+ (JNIEnv *, jobject, jlong);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
-target=android-8
+target=android-10
--- /dev/null
+package org.opencv.engine;
+
+public class OpenCVLibraryInfo {
+ public OpenCVLibraryInfo(String packagePath) {
+ mNativeObj = open(packagePath);
+ if (mNativeObj != 0) {
+ mPackageName = getPackageName(mNativeObj);
+ mLibraryList = getLibraryList(mNativeObj);
+ mVersionName = getVersionName(mNativeObj);
+ mPublicName = getPublicName(mNativeObj);
+ close(mNativeObj);
+ }
+ }
+
+ public boolean status() {
+ return (mNativeObj != 0);
+ }
+
+ public String packageName() {
+ return mPackageName;
+ }
+
+ public String publicName() {
+ return mPublicName;
+ }
+
+ public String libraryList() {
+ return mLibraryList;
+ }
+
+ public String versionName() {
+ return mVersionName;
+ }
+
+ private long mNativeObj;
+ private String mPackageName;
+ private String mPublicName;
+ private String mLibraryList;
+ private String mVersionName;
+
+ private native long open(String packagePath);
+ private native String getPackageName(long obj);
+ private native String getPublicName(long obj);
+ private native String getLibraryList(long obj);
+ private native String getVersionName(long obj);
+ private native void close(long obj);
+}