Skip to content
This repository was archived by the owner on Jun 5, 2023. It is now read-only.

Commit 37bdc0c

Browse files
committed
Remove vendored gesture detector and replace with composite build and add to README.
Also fixes a few .gitignores to exclude ide and build outputs. Change-Id: I7c9bd26db8d2dbd78a6276aeae1e9595aad9b099
1 parent 399eed5 commit 37bdc0c

File tree

9 files changed

+23
-159
lines changed

9 files changed

+23
-159
lines changed

Camera2Sample/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
.idea
55
.project
66
.settings
7+
.classpath
78
.DS_Store
89
/bin
910
/build

GestureLibrarySample/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
.idea
55
.project
66
.settings
7+
.classpath
78
.DS_Store
89
/bin
910
/main/bin
1011
/build
12+
/main/build
1113
/captures
1214
/out
1315
.externalNativeBuild

QRCodeScannerSample/app/build.gradle

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
apply plugin: 'com.android.application'
1818

1919
android {
20-
compileSdkVersion 29
20+
compileSdkVersion 28
2121
defaultConfig {
2222
applicationId "com.example.glass.glassqrcodescanner"
2323
minSdkVersion 27
24-
targetSdkVersion 29
24+
targetSdkVersion 28
2525
versionCode 1
2626
versionName "1.0"
2727
}
@@ -37,6 +37,8 @@ android {
3737
}
3838

3939
dependencies {
40+
implementation 'com.example.glass.ui:gesture-lib-sample:0.1.0-SNAPSHOT'
41+
4042
implementation 'androidx.appcompat:appcompat:1.1.0'
4143
implementation 'androidx.camera:camera-core:1.0.0-alpha06'
4244
implementation 'androidx.camera:camera-camera2:1.0.0-alpha06'

QRCodeScannerSample/app/src/main/java/com/example/glass/qrcodescannersample/BaseActivity.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
import android.view.View;
2222
import androidx.annotation.Nullable;
2323
import androidx.fragment.app.FragmentActivity;
24-
import com.example.glass.qrcodescannersample.GlassGestureDetector.OnGestureListener;
24+
25+
import com.example.glass.ui.GlassGestureDetector;
26+
import com.example.glass.ui.GlassGestureDetector.OnGestureListener;
2527

2628
/**
2729
* Base Activity class used to hide the system UI and capture gestures.

QRCodeScannerSample/app/src/main/java/com/example/glass/qrcodescannersample/CameraActivity.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@
2727
import androidx.annotation.NonNull;
2828
import androidx.camera.core.CameraX;
2929
import androidx.core.content.ContextCompat;
30-
import com.example.glass.qrcodescannersample.GlassGestureDetector.Gesture;
30+
3131
import com.example.glass.qrcodescannersample.QRCodeImageAnalysis.QrCodeAnalysisCallback;
32+
import com.example.glass.ui.GlassGestureDetector.Gesture;
33+
3234
import java.util.concurrent.ExecutorService;
3335
import java.util.concurrent.Executors;
3436

QRCodeScannerSample/app/src/main/java/com/example/glass/qrcodescannersample/GlassGestureDetector.java

-153
This file was deleted.

QRCodeScannerSample/app/src/main/java/com/example/glass/qrcodescannersample/MainActivity.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
import android.view.View;
2323
import android.widget.TextView;
2424
import androidx.annotation.Nullable;
25-
import com.example.glass.qrcodescannersample.GlassGestureDetector.Gesture;
25+
26+
import com.example.glass.ui.GlassGestureDetector.Gesture;
2627

2728
/**
2829
* This activity scans a QR code and shows the result.

QRCodeScannerSample/settings.gradle

+7-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,10 @@
1414
* limitations under the License.
1515
*/
1616

17-
include ':app'
17+
include ':app'
18+
19+
includeBuild('../GestureLibrarySample') {
20+
dependencySubstitution {
21+
substitute module('com.example.glass.ui:gesture-lib-sample') with project(':main')
22+
}
23+
}

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Then use [Android Studio](https://developer.android.com/studio) to build & run t
1616

1717
* [Card Sample](CardSample): A simple Glass application showcasing typical layouts and UI patterns.
1818
* [Camera2 Sample](Camera2Sample): Take photos and videos using the [Camera2 API](https://developer.android.com/guide/topics/media/camera).
19+
* [QR Code Sample](QRCodeScannerSample): Scan QR codes with the camera.
1920
* [Gesture Detector](endpoints-frameworks): Respond to gesture events on the touchpad.
2021

2122
## Contributing

0 commit comments

Comments
 (0)