Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

created functionality for localizations #3

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions acuantcamera/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ android {
buildFeatures {
viewBinding true
}


// publishing {
// publications {
// mavenJava(MavenPublication) {
// groupId = 'com.github.hrayr09amiraghyan'
// artifactId = 'acuantcamera'
// version = '1.5.7'
// }
// }
// }

}
dependencies {
// Kotlin lang
Expand All @@ -54,4 +66,5 @@ dependencies {
implementation 'com.rmtheis:tess-two:9.1.0'
implementation 'com.acuant:acuantcommon:11.5.4'
implementation 'com.acuant:acuantimagepreparation:11.5.4'

}
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,31 @@ import com.acuant.acuantcamera.interfaces.ICameraActivityFinish
import com.acuant.acuantcamera.constant.*
import com.acuant.acuantcamera.databinding.ActivityCameraBinding
import com.acuant.acuantcamera.helper.MrzResult
import com.acuant.acuantcamera.language.LocaleManager
import com.acuant.acuantcommon.model.AcuantError
import java.util.*

class AcuantCameraActivity: AppCompatActivity(), ICameraActivityFinish {
class AcuantCameraActivity : AppCompatActivity(), ICameraActivityFinish {

private lateinit var binding: ActivityCameraBinding

//Camera Launch
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActivityCameraBinding.inflate(layoutInflater)

val unserializedOptions = intent.getSerializableExtra(ACUANT_EXTRA_CAMERA_OPTIONS)

val options: AcuantCameraOptions = if (unserializedOptions == null) {
AcuantCameraOptions.DocumentCameraOptionsBuilder().build()
} else {
unserializedOptions as AcuantCameraOptions
}

LocaleManager.updateResources(this, Locale(options.language))
super.onCreate(savedInstanceState)
binding = ActivityCameraBinding.inflate(layoutInflater)
if (options.preventScreenshots) {
window.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE)
window.setFlags(
WindowManager.LayoutParams.FLAG_SECURE,
WindowManager.LayoutParams.FLAG_SECURE
)
}

setContentView(binding.root)
Expand Down
Loading