Skip to content

Commit

Permalink
New function for turn on/off flash
Browse files Browse the repository at this point in the history
Change CameraSource class for open source
  • Loading branch information
sleepstream committed May 21, 2018
1 parent 7e5f477 commit 37f7290
Show file tree
Hide file tree
Showing 5 changed files with 1,248 additions and 53 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'

compile "com.android.support:appcompat-v7:$rootProject.ext.supportLibVersion"
compile "com.android.support:appcompat-v7:27.0.0"
compile project(':qreader')
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,23 @@ public void onClick(View v) {
restartbtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
restartActivity();
//restartActivity();
qrEader.turnOnOffTorch();
}
});


// Setup SurfaceView
// -----------------
mySurfaceView = findViewById(R.id.camera_view);

if (hasCameraPermission) {
// Setup QREader
setupQREader();
setupQREader();
} else {
RuntimePermissionUtil.requestPermission(MainActivity.this, cameraPerm, 100);
}

}

void restartActivity() {
Expand Down
2 changes: 1 addition & 1 deletion qreader/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ android {
dependencies {
testCompile 'junit:junit:4.12'
// Add Vision API
compile "com.google.android.gms:play-services-vision:$rootProject.ext.playServicesVersion"
compile "com.google.android.gms:play-services-vision:11.4.2"
}

apply from: 'https://raw.githubusercontent.com/nisrulz/JCenter/master/nishant-config.gradle'
Loading

0 comments on commit 37f7290

Please sign in to comment.