adding OpenCV Manager

This commit is contained in:
Andrey Pavlenko
2012-06-21 14:50:05 +00:00
parent a3be73b5cc
commit 2984fa751e
133 changed files with 34065 additions and 84 deletions

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry combineaccessrules="false" kind="src" path="/JavaService"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>tests</name>
<comment></comment>
<projects>
<project>JavaService</project>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.opencv.engine.test"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<instrumentation
android:name="android.test.InstrumentationTestRunner"
android:targetPackage="org.opencv.engine" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<uses-library android:name="android.test.runner" />
</application>
</manifest>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />
</LinearLayout>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hello">Hello World!</string>
<string name="app_name">JavaServiceTest</string>
</resources>

View File

@@ -0,0 +1,65 @@
package org.opencv.engine.test;
import org.opencv.engine.OpenCVEngineInterface;
import org.opencv.engine.OpenCVEngineService;
import android.content.Intent;
import android.os.IBinder;
import android.os.RemoteException;
import android.test.ServiceTestCase;
public class EngineInterfaceTest extends ServiceTestCase<OpenCVEngineService>
{
public EngineInterfaceTest()
{
super(OpenCVEngineService.class);
// TODO Auto-generated constructor stub
}
public void testVersion() throws RemoteException
{
IBinder ServiceBinder = bindService(new Intent("org.opencv.engine.BIND"));
assertNotNull(ServiceBinder);
OpenCVEngineInterface ServiceObj = OpenCVEngineInterface.Stub.asInterface(ServiceBinder);
assertNotNull(ServiceObj);
int ServiceVersion = ServiceObj.getEngineVersion();
assertEquals(1, ServiceVersion);
}
public void testInstallVersion() throws RemoteException
{
IBinder ServiceBinder = bindService(new Intent("org.opencv.engine"));
assertNotNull(ServiceBinder);
OpenCVEngineInterface ServiceObj = OpenCVEngineInterface.Stub.asInterface(ServiceBinder);
assertNotNull(ServiceObj);
assertTrue(ServiceObj.installVersion("2.4"));
}
public void testGetPathForExistVersion() throws RemoteException
{
IBinder ServiceBinder = bindService(new Intent("org.opencv.engine"));
assertNotNull(ServiceBinder);
OpenCVEngineInterface ServiceObj = OpenCVEngineInterface.Stub.asInterface(ServiceBinder);
assertNotNull(ServiceObj);
assertEquals("/data/data/org.opencv.lib_v240_tegra3/lib", ServiceObj.getLibPathByVersion("2.4"));
}
public void testGetPathForUnExistVersion() throws RemoteException
{
IBinder ServiceBinder = bindService(new Intent("org.opencv.engine"));
assertNotNull(ServiceBinder);
OpenCVEngineInterface ServiceObj = OpenCVEngineInterface.Stub.asInterface(ServiceBinder);
assertNotNull(ServiceObj);
assertEquals("", ServiceObj.getLibPathByVersion("2.5"));
}
public void testInstallAndGetVersion() throws RemoteException
{
IBinder ServiceBinder = bindService(new Intent("org.opencv.engine"));
assertNotNull(ServiceBinder);
OpenCVEngineInterface ServiceObj = OpenCVEngineInterface.Stub.asInterface(ServiceBinder);
assertNotNull(ServiceObj);
assertTrue(ServiceObj.installVersion("2.4"));
assertEquals("/data/data/org.opencv.lib_v240_tegra3/lib", ServiceObj.getLibPathByVersion("2.4"));
}
}