Commit dc5c7ee6 authored by Alexander Smorkalov's avatar Alexander Smorkalov

Link to OpenCV website updated. Full Manager version added to UI. Screen orientation fixed.

parent d55e114f
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.opencv.engine" package="org.opencv.engine"
android:versionCode="14" android:versionCode="15"
android:versionName="1.4" > android:versionName="1.5" >
<uses-sdk android:minSdkVersion="8" /> <uses-sdk android:minSdkVersion="8" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/> <uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
...@@ -17,7 +17,10 @@ ...@@ -17,7 +17,10 @@
</intent-filter> </intent-filter>
</service> </service>
<activity android:name="org.opencv.engine.manager.ManagerActivity" android:label="@string/app_name" > <activity
android:name="org.opencv.engine.manager.ManagerActivity"
android:label="@string/app_name"
android:screenOrientation="portrait">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:autoLink="web" android:autoLink="web"
android:text="OpenCV is Open Computer Vision library. OpenCV Manager provides the best version of the OpenCV for your hardware. See www.opencv.org for details." android:text="OpenCV is Open Computer Vision library. OpenCV Manager provides the best version of the OpenCV for your hardware. See opencv.org for details."
android:textAppearance="?android:attr/textAppearanceSmall" /> android:textAppearance="?android:attr/textAppearanceSmall" />
<LinearLayout <LinearLayout
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:autoLink="web" android:autoLink="web"
android:text="OpenCV library is used by other applications for image enhancement, panorama stitching, object detection, recognition and tracking and so on. OpenCV Manager provides the best version of the OpenCV for your hardware. See www.opencv.org for details." android:text="OpenCV library is used by other applications for image enhancement, panorama stitching, object detection, recognition and tracking and so on. OpenCV Manager provides the best version of the OpenCV for your hardware. See opencv.org for details."
android:textAppearance="?android:attr/textAppearanceMedium" /> android:textAppearance="?android:attr/textAppearanceMedium" />
<LinearLayout <LinearLayout
......
...@@ -17,6 +17,7 @@ import android.content.Intent; ...@@ -17,6 +17,7 @@ import android.content.Intent;
import android.content.IntentFilter; import android.content.IntentFilter;
import android.content.ServiceConnection; import android.content.ServiceConnection;
import android.content.pm.PackageInfo; import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.os.IBinder; import android.os.IBinder;
...@@ -43,6 +44,15 @@ public class ManagerActivity extends Activity ...@@ -43,6 +44,15 @@ public class ManagerActivity extends Activity
TextView OsVersionView = (TextView)findViewById(R.id.OsVersionValue); TextView OsVersionView = (TextView)findViewById(R.id.OsVersionValue);
OsVersionView.setText(Build.VERSION.CODENAME + " (" + Build.VERSION.RELEASE + "), API " + Build.VERSION.SDK_INT); OsVersionView.setText(Build.VERSION.CODENAME + " (" + Build.VERSION.RELEASE + "), API " + Build.VERSION.SDK_INT);
try {
PackageInfo packageInfo = getPackageManager().getPackageInfo(this.getPackageName(), 0);
ManagerVersion = packageInfo.versionName;
} catch (NameNotFoundException e) {
// TODO Auto-generated catch block
ManagerVersion = "N/A";
e.printStackTrace();
}
mInstalledPackageView = (ListView)findViewById(R.id.InstalledPackageList); mInstalledPackageView = (ListView)findViewById(R.id.InstalledPackageList);
mMarket = new MarketConnector(this); mMarket = new MarketConnector(this);
...@@ -201,6 +211,8 @@ public class ManagerActivity extends Activity ...@@ -201,6 +211,8 @@ public class ManagerActivity extends Activity
protected MarketConnector mMarket; protected MarketConnector mMarket;
protected AlertDialog mActionDialog; protected AlertDialog mActionDialog;
protected HashMap<String,String> mActivePackageMap = new HashMap<String, String>(); protected HashMap<String,String> mActivePackageMap = new HashMap<String, String>();
protected int ManagerApiLevel = 0;
protected String ManagerVersion;
protected BroadcastReceiver mPackageChangeReciever = new BroadcastReceiver() { protected BroadcastReceiver mPackageChangeReciever = new BroadcastReceiver() {
...@@ -220,15 +232,16 @@ public class ManagerActivity extends Activity ...@@ -220,15 +232,16 @@ public class ManagerActivity extends Activity
} }
public void onServiceConnected(ComponentName name, IBinder service) { public void onServiceConnected(ComponentName name, IBinder service) {
TextView EngineVersionView = (TextView)findViewById(R.id.EngineVersionValue);
OpenCVEngineInterface EngineService = OpenCVEngineInterface.Stub.asInterface(service); OpenCVEngineInterface EngineService = OpenCVEngineInterface.Stub.asInterface(service);
try { try {
EngineVersionView.setText("" + EngineService.getEngineVersion()); ManagerApiLevel = EngineService.getEngineVersion();
} catch (RemoteException e) { } catch (RemoteException e) {
EngineVersionView.setText("not avaliable");
e.printStackTrace(); e.printStackTrace();
} }
TextView EngineVersionView = (TextView)findViewById(R.id.EngineVersionValue);
EngineVersionView.setText(ManagerVersion);
try { try {
String path = EngineService.getLibPathByVersion("2.4"); String path = EngineService.getLibPathByVersion("2.4");
Log.d(TAG, "2.4 -> " + path); Log.d(TAG, "2.4 -> " + path);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment