Skip to content

Commit 794fe86

Browse files
authored
Merge pull request #6 from artoolkitx/android
Android
2 parents 28b9f67 + 4e71727 commit 794fe86

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+2233
-478
lines changed

.gitignore

Lines changed: 57 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,69 @@
1+
#### OS-generated caches and resources
2+
.DS_Store
3+
.DS_Store?
4+
._*
5+
.Spotlight-V100
6+
.Trashes
7+
ehthumbs.db
8+
Thumbs.db
9+
10+
### git merge conflict files
11+
*.orig
12+
13+
#### Intermediate build products
14+
*.o
15+
16+
#### Intermediate Language products
17+
*.dex
18+
*.class
19+
20+
# Android Studio
21+
**/.gradle/
22+
**/.idea/caches
23+
**/.idea/deploymentTargetDropDown.xml
24+
**/.idea/libraries
25+
**/.idea/workspace.xml
26+
**/.idea/navEditor.xml
27+
**/.idea/assetWizardSettings.xml
28+
**/captures/
29+
**/.externalNativeBuild/
30+
**/.cxx/
31+
local.properties
32+
33+
# MonoDevelop/Xamarin Studio
34+
*.userprefs
35+
36+
# Visual Studio
37+
*.suo
38+
*.user
39+
*.userosscache
40+
*.sln.docstates
41+
.vscode/settings.json
42+
43+
# Xcode
44+
xcuserdata/
45+
*.mode1*
46+
*.pbxuser
47+
*.xccheckout
48+
*.xcscmblueprint
49+
50+
# Dependencies
151
depends/ios/include/ARX/
252
depends/ios/lib/libARX.a
353
depends/ios/Frameworks/opencv2.framework
454
depends/macos/Frameworks/ARX.framework/
555
depends/macos/Frameworks/opencv2.framework
56+
depends/android/artoolkitx
57+
artoolkitX.for.iOS.v*.dmg
58+
artoolkitX.for.macOS.v*.dmg
59+
60+
# Build files
661
Linux/build/
762
iOS/user-config.xcconfig
863
iOS/build/
964
macOS/user-config.xcconfig
1065
macOS/build/
11-
xcuserdata/
12-
*.xcscmblueprint
13-
local.properties
14-
Android/app/.cxx
1566
Android/app/build
1667
Android/build
17-
Android/.gradle
18-
depends/android/artoolkitx
68+
69+
# Other

Android/app/build.gradle

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ android {
88
applicationId "org.artoolkitx.utilities.calibcameraandroid"
99
minSdkVersion 24
1010
targetSdkVersion 33
11-
versionCode 1
12-
versionName "1.0"
11+
compileSdkVersion 33
12+
versionCode 1010000
13+
versionName "1.1"
1314
externalNativeBuild {
1415
cmake {
1516
arguments "-DANDROID_APP_PLATFORM=android-24", "-DANDROID_STL=c++_shared"
@@ -46,4 +47,10 @@ android {
4647

4748
dependencies {
4849
implementation fileTree(include: ['*.jar'], dir: 'libs')
50+
def appcompat_version = "1.6.1"
51+
implementation "androidx.appcompat:appcompat:$appcompat_version"
52+
def preference_version = "1.2.1"
53+
implementation "androidx.preference:preference:$preference_version"
54+
def constraintlayout_version = "2.1.4"
55+
implementation "androidx.constraintlayout:constraintlayout:$constraintlayout_version"
4956
}

Android/app/src/main/AndroidManifest.xml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
android:versionCode="1"
4-
android:versionName="1.0"
53
android:installLocation="auto">
64

75
<uses-permission android:name="android.permission.CAMERA" />
86
<uses-permission android:name="android.permission.INTERNET" />
97
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
8+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
109

1110
<uses-feature android:name="android.hardware.camera.any" />
1211
<uses-feature android:name="android.hardware.camera"
@@ -55,25 +54,17 @@
5554
<!-- if you want to capture audio, uncomment this. -->
5655
<!-- <uses-permission android:name="android.permission.RECORD_AUDIO" /> -->
5756

58-
<!-- Create a Java class extending SDLActivity and place it in a
59-
directory under app/src/main/java matching the package, e.g. app/src/main/java/com/gamemaker/game/MyGame.java
60-
61-
then replace "SDLActivity" with the name of your class (e.g. "MyGame")
62-
in the XML below.
63-
64-
An example Java class can be found in README-android.md
65-
-->
6657
<application android:label="@string/app_name"
6758
android:icon="@mipmap/ic_launcher"
6859
android:allowBackup="true"
69-
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
60+
android:theme="@style/AppTheme"
7061
android:hardwareAccelerated="true" >
7162

7263
<!-- Example of setting SDL hints from AndroidManifest.xml:
7364
<meta-data android:name="SDL_ENV.SDL_ACCELEROMETER_AS_JOYSTICK" android:value="0"/>
7465
-->
7566

76-
<activity android:name="SDLActivity"
67+
<activity android:name="org.artoolkitx.utilities.cameracalibration.CameraCalibrationActivity"
7768
android:label="@string/app_name"
7869
android:alwaysRetainTaskState="true"
7970
android:launchMode="singleInstance"
@@ -99,6 +90,12 @@
9990
</intent-filter>
10091
-->
10192
</activity>
93+
<activity
94+
android:name="org.artoolkitx.utilities.cameracalibration.CameraCalibrationSettingsActivity"
95+
android:label="@string/settings_activity_name"
96+
android:parentActivityName="org.artoolkitx.utilities.cameracalibration.CameraCalibrationActivity"
97+
android:theme="@style/Theme.AppCompat.Light.NoActionBar">
98+
</activity>
10299
</application>
103100

104101
</manifest>

Android/app/src/main/cpp/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ set(SOURCE
107107
${ARTOOLKITX_CAMERA_CALIBRATION_HOME}/version.h
108108
${ARTOOLKITX_CAMERA_CALIBRATION_HOME}/calib_camera.cpp
109109
${ARTOOLKITX_CAMERA_CALIBRATION_HOME}/calib_camera.h
110+
${ARTOOLKITX_CAMERA_CALIBRATION_HOME}/calib_camera_jni.cpp
110111
${ARTOOLKITX_CAMERA_CALIBRATION_HOME}/Calibration.hpp
111112
${ARTOOLKITX_CAMERA_CALIBRATION_HOME}/Calibration.cpp
112113
${ARTOOLKITX_CAMERA_CALIBRATION_HOME}/calc.cpp
@@ -115,8 +116,11 @@ set(SOURCE
115116
${ARTOOLKITX_CAMERA_CALIBRATION_HOME}/fileUploader.h
116117
${ARTOOLKITX_CAMERA_CALIBRATION_HOME}/flow.cpp
117118
${ARTOOLKITX_CAMERA_CALIBRATION_HOME}/flow.hpp
119+
${ARTOOLKITX_CAMERA_CALIBRATION_HOME}/loc_strings.cpp
120+
${ARTOOLKITX_CAMERA_CALIBRATION_HOME}/loc_strings.hpp
118121
${ARTOOLKITX_CAMERA_CALIBRATION_HOME}/prefs.hpp
119122
${ARTOOLKITX_CAMERA_CALIBRATION_HOME}/prefsNull.cpp
123+
${ARTOOLKITX_CAMERA_CALIBRATION_HOME}/prefsAndroid.cpp
120124
${ARTOOLKITX_CAMERA_CALIBRATION_HOME}/Eden/Eden.h
121125
${ARTOOLKITX_CAMERA_CALIBRATION_HOME}/Eden/EdenError.h
122126
${ARTOOLKITX_CAMERA_CALIBRATION_HOME}/Eden/EdenGLFont.c

0 commit comments

Comments
 (0)