Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
07bd1a9
Update LoadDisplayImage.pde
rtomas May 15, 2023
fc0dc61
updated to gradle 7.3.1, with necessary deps for import aar plugin
codeanticode May 30, 2023
6de1436
Merge pull request #739 from rtomas/main
codeanticode Jul 4, 2023
50b8728
Adding Augmented Image Dataset
Jul 11, 2023
f22885f
Delete gradlew.zip
rupeshkumar22 Jul 17, 2023
a1682b4
Added gradlew.zip(includes gradle-wrapper.jar)
rupeshkumar22 Jul 17, 2023
3ccde37
Update AndroidBuild.java
rupeshkumar22 Jul 17, 2023
5257c9a
Adding isImage Method
Jul 18, 2023
d8b4677
started to move files around
codeanticode Sep 11, 2023
175f45c
Merge pull request #747 from rupeshkumar22/master
codeanticode Sep 11, 2023
7e576fa
version roll over
codeanticode Sep 11, 2023
a585e55
Merge pull request #754 from processing/main
codeanticode Sep 11, 2023
81a2cd6
Merge pull request #745 from p4puniya/ar-image-markers-gsoc2023-v0.2
codeanticode Sep 11, 2023
986875c
some corrections
codeanticode Sep 11, 2023
ab906ab
all build errors fixed
codeanticode Sep 11, 2023
b7f6500
implemented all cases for AugmentedImage
codeanticode Sep 12, 2023
a4c219b
code cleanup, added example
codeanticode Sep 12, 2023
bfc8bec
removed --add-exports=java.base/sun.nio.ch=ALL-UNNAMED arg from gradl…
codeanticode Sep 12, 2023
6394068
use initialized session object from renderer
codeanticode Sep 12, 2023
0e482ea
Fixed array size
codeanticode Sep 12, 2023
91b13c2
formatting of condition
codeanticode Sep 12, 2023
14716e0
Merge pull request #755 from processing/ar-image-markers-gsoc2023
codeanticode Sep 12, 2023
4a40102
add AR markers debug example
codeanticode Oct 29, 2023
941db93
added addImage method inluding the size argument
codeanticode Oct 29, 2023
71b9d97
renamed Images example as ImageMarkers
codeanticode Oct 29, 2023
229a7f1
added comment in ImageMarkers example about adding IRL size of marker
codeanticode Oct 29, 2023
4f20743
made sphere in image marker example smaller
codeanticode Oct 29, 2023
bdde55a
Fixed template for AR gradle build file
codeanticode Oct 29, 2023
142bffb
Fixed duplicated keyboard shortcuts in the editor
codeanticode Oct 30, 2023
9e8c066
move test apps to their new location
codeanticode Jun 2, 2024
e21fb5b
Merge pull request #764 from processing/main
codeanticode Jun 2, 2024
e6fb085
moved shader assets to correct location
codeanticode Jun 2, 2024
2357137
placed libs manifest files in correct location
codeanticode Jun 3, 2024
415ce54
added comment on the 'cannot resolve base' error
codeanticode Jun 3, 2024
73fb0ef
moved image markers example to correct location
codeanticode Jun 3, 2024
d44aee5
point to the new source locations
codeanticode Jun 3, 2024
228de7f
removed jar files
codeanticode Jun 3, 2024
316340d
get the soures from libs
codeanticode Jun 3, 2024
2804282
added the mode ignores to a new gitignore file inside the processing …
codeanticode Jun 3, 2024
19acd09
Merge pull request #765 from processing/new-structure
codeanticode Jun 3, 2024
0b48f52
exclude manifest file and java folder from resources
codeanticode Jun 3, 2024
1bc7456
put back readme file
codeanticode Jun 9, 2024
5a5ca77
put back gradlew command line tools
codeanticode Jun 9, 2024
2704cb9
replaced import android.support.v4.os.ResultReceiver by import androi…
codeanticode Jun 9, 2024
a327820
gradlew is not needed in the root folder
codeanticode Jun 9, 2024
8d8f3ff
added the lib namespaces to the build files
codeanticode Jun 9, 2024
a2fd321
version roll over
codeanticode Jun 9, 2024
40af769
removed debug code in build file
codeanticode Jun 9, 2024
c0a89a9
the zipalign tool is no longer used
codeanticode Jun 9, 2024
17ac016
some refactoring of abd calls
codeanticode Jun 9, 2024
9f5ce68
properly set command line tools as executebles
codeanticode Jun 9, 2024
7785fbd
remove unused options in extractFolder util function
codeanticode Jun 9, 2024
864efe2
some name refactor
codeanticode Jun 9, 2024
ddd4fea
fixed SDK download issues
codeanticode Jun 10, 2024
989d710
added lxml to the dependencies for the permissions task
codeanticode Jun 10, 2024
2bcc384
updated permissions
codeanticode Jun 10, 2024
749405c
removed compileSdkVersion
codeanticode Jun 10, 2024
363521a
keep platform dir from zip unpack
codeanticode Jun 10, 2024
076af7e
fixed-critical
omgupta-iitk Jul 5, 2024
a6b5c92
Merge pull request #769 from omgupta-iitk/omgupta-iitk/fixed-critical
codeanticode Jul 9, 2024
8f4f49b
Changes introduced by Claudine AI agent
morisil Oct 22, 2024
1bebad7
Merge pull request #773 from morisil/feature/updateOfAndroidSdkPerfor…
codeanticode Jan 6, 2025
f057b2e
updated to gradle wrapper 8.12
codeanticode Jan 9, 2025
6a3891e
updating gradle build files and importAar plugin to gradle 8
codeanticode Jan 9, 2025
c457650
finally extracting jar files
codeanticode Jan 9, 2025
bf5aa8c
save jar files in project's main build/libs and remove version
codeanticode Jan 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
19 changes: 2 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
mode/processing-core.zip
mode/mode/AndroidMode.jar
mode/mode/gradle-tooling-api*
mode/mode/slf4j*

mode/mode/percent.jar
mode/mode/recyclerview-v7.jar
mode/mode/support-*
mode/mode/wearable.jar

mode/libraries/vr/library
mode/libraries/ar/library
mode/tools/SDKUpdater/tool
mode/tools/SDKUpdater/lib

debug/.gradle
debug/.idea
.gradle
.idea

**/examples/**/AndroidManifest.xml

Expand Down
36 changes: 36 additions & 0 deletions apps/armarkers/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
plugins {
id 'com.android.application'
}

android {
compileSdkVersion 33
defaultConfig {
applicationId "processing.tests.armarkers"
minSdkVersion 23
targetSdkVersion 33
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
namespace 'armarkers'
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.13.2'
implementation project(':libs:processing-core')
implementation project(':libs:processing-ar')
implementation 'androidx.appcompat:appcompat:1.6.0'
implementation 'com.google.ar:core:1.35.0'
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.CAMERA"/>
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.ar" android:required="true"/>
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
<application android:icon="@mipmap/ic_launcher"
Expand Down
Binary file added apps/armarkers/src/main/assets/earth.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
111 changes: 111 additions & 0 deletions apps/armarkers/src/main/java/armarkers/MainActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
package armarkers;

import android.Manifest;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Bundle;
import android.content.Intent;
import android.provider.Settings;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.Toast;

import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;

import processing.android.PFragment;
import processing.android.CompatUtils;
import processing.core.PApplet;

public class MainActivity extends AppCompatActivity {
private static final int CAMERA_PERMISSION_CODE = 0;
private static boolean CAMERA_PERMISSION_REQUESTED = false;
private static final String CAMERA_PERMISSION = Manifest.permission.CAMERA;
private static final String CAMERA_PERMISSION_MESSAGE = "Camera permission is needed to use AR";

private PApplet sketch;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
FrameLayout frame = new FrameLayout(this);
frame.setId(CompatUtils.getUniqueViewId());
setContentView(frame, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT));

sketch = new Sketch();
PFragment fragment = new PFragment(sketch);
fragment.setView(frame, this);
}

@Override
protected void onResume() {
super.onResume();
if (!hasCameraPermission()) requestCameraPermission();
}

@Override
public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
if (!hasCameraPermission()) {
Toast.makeText(this, CAMERA_PERMISSION_MESSAGE, Toast.LENGTH_LONG).show();
if (!shouldShowRequestPermissionRationale()) {
launchPermissionSettings();
}
finish();
}

if (sketch != null) {
sketch.onRequestPermissionsResult(requestCode, permissions, grantResults);
}

CAMERA_PERMISSION_REQUESTED = false;
}

@Override
public void onNewIntent(Intent intent) {
super.onNewIntent(intent);
if (sketch != null) {
sketch.onNewIntent(intent);
}
}

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (sketch != null) {
sketch.onActivityResult(requestCode, resultCode, data);
}
}

@Override
public void onBackPressed() {
if (sketch != null) {
sketch.onBackPressed();
}
}

private boolean hasCameraPermission() {
int res = ContextCompat.checkSelfPermission(this, CAMERA_PERMISSION);
return res == PackageManager.PERMISSION_GRANTED;
}

private void requestCameraPermission() {
if (!CAMERA_PERMISSION_REQUESTED) {
CAMERA_PERMISSION_REQUESTED = true;
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA}, CAMERA_PERMISSION_CODE);
}
}

private boolean shouldShowRequestPermissionRationale() {
return ActivityCompat.shouldShowRequestPermissionRationale(this, CAMERA_PERMISSION);
}

private void launchPermissionSettings() {
Intent intent = new Intent();
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
intent.setData(Uri.fromParts("package", this.getPackageName(), null));
this.startActivity(intent);
}
}
51 changes: 51 additions & 0 deletions apps/armarkers/src/main/java/armarkers/Sketch.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package armarkers;

import java.util.ArrayList;

import processing.ar.*;
import processing.core.PApplet;
import processing.core.PImage;
import processing.core.PShape;

public class Sketch extends PApplet {
ARTracker tracker;
ARAnchor anchor;
PShape earth;

public void settings() {
fullScreen(AR);
}

public void setup() {
fullScreen(AR);

tracker = new ARTracker(this);

PImage earthImg = loadImage("earth.jpg");
tracker.start();
tracker.addImage("earth", earthImg);

earth = createShape(SPHERE, 0.15f);
}

public void draw() {
lights();

if (mousePressed) {
// Create new anchor at the current touch point
if (anchor != null) anchor.dispose();
ARTrackable hit = tracker.get(mouseX, mouseY);
if (hit != null && hit.isImage() && hit.getName().equals("earth")) {
anchor = new ARAnchor(hit);
}
else anchor = null;
}

if (anchor != null) {
anchor.attach();
shape(earth);
anchor.detach();
}
}

}
5 changes: 3 additions & 2 deletions debug/apps/arscene/build.gradle → apps/arscene/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
apply plugin: 'com.android.application'
plugins {
id 'com.android.application'
}

android {
compileSdkVersion 33
defaultConfig {
applicationId "processing.tests.arscene"
minSdkVersion 23
Expand Down
File renamed without changes.
28 changes: 28 additions & 0 deletions apps/arscene/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.CAMERA"/>
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.ar" android:required="true"/>
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
<application android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/ArActivityTheme"
android:allowBackup="false"
android:usesCleartextTraffic="false"
tools:ignore="GoogleAppIndexingWarning">
<activity android:configChanges="orientation|screenSize"
android:exported="true"
android:name=".MainActivity"
android:screenOrientation="locked"
android:theme="@style/Theme.AppCompat.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<meta-data android:name="com.google.ar.core" android:value="required"/>
</application>
</manifest>
3 changes: 3 additions & 0 deletions apps/arscene/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<resources>
<string name="app_name">AR Test</string>
</resources>
9 changes: 9 additions & 0 deletions apps/arscene/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<resources>
<style name="ArActivityTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowFullscreen">true</item>
<item name="android:windowAnimationStyle">@null</item>
<item name="android:windowActionBar">false</item>
<item name="android:windowDisablePreview">true</item>
<item name="android:windowContentOverlay">@null</item>
</style>
</resources>
5 changes: 3 additions & 2 deletions debug/apps/fast2d/build.gradle → apps/fast2d/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
apply plugin: 'com.android.application'
plugins {
id 'com.android.application'
}

android {
compileSdkVersion 33
defaultConfig {
applicationId "processing.tests.fast2d"
minSdkVersion 17
Expand Down
File renamed without changes.
17 changes: 10 additions & 7 deletions debug/apps/simple/build.gradle → apps/simple/build.gradle
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
apply plugin: 'com.android.application'
plugins {
id 'com.android.application'
}

android {
namespace 'processing.tests.simple'
compileSdkVersion 33

defaultConfig {
applicationId "processing.tests.simple"
minSdkVersion 17
targetSdkVersion 33
versionCode 1
versionName "1.0"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
namespace 'simple'
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.13.2'
implementation 'androidx.appcompat:appcompat:1.6.1'

implementation project(':libs:processing-core')
implementation 'androidx.appcompat:appcompat:1.6.0'
}
21 changes: 21 additions & 0 deletions apps/simple/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
android:theme="@style/AppTheme"
android:hardwareAccelerated="true"
android:largeHeap="true">
<activity android:name=".MainActivity"
<activity android:name="simple.MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
Expand Down
5 changes: 3 additions & 2 deletions debug/apps/vrcube/build.gradle → apps/vrcube/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
apply plugin: 'com.android.application'
plugins {
id 'com.android.application'
}

android {
compileSdkVersion 33
defaultConfig {
applicationId "processing.tests.vrcube"
minSdkVersion 19
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
android:label="@string/app_name"
android:theme="@style/VrActivityTheme">
<activity android:configChanges="orientation|keyboardHidden|screenSize"
android:name=".MainActivity"
android:name="vrcube.MainActivity"
android:resizeableActivity="false"
android:screenOrientation="landscape"
android:exported="true">
Expand Down
7 changes: 7 additions & 0 deletions apps/vrcube/src/main/res/layout/main.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/fragment"
android:name=".Cube"
tools:layout="@layout/fragment_main"
android:layout_width="match_parent"
android:layout_height="match_parent" />
Loading