Created
September 18, 2019 08:22
-
-
Save zamahaka/acfb40cc4d753b0f22a59311750ec9fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.paragoncoin.paragon.core.domain.barcode | |
import com.google.android.gms.vision.MultiProcessor | |
import com.google.android.gms.vision.Tracker | |
import com.google.android.gms.vision.barcode.Barcode | |
class BarcodeTrackerFactory(private val detectedListener: (Barcode) -> Unit) : MultiProcessor.Factory<Barcode> { | |
override fun create(p0: Barcode?) = object : Tracker<Barcode>() { | |
override fun onNewItem(id: Int, barcode: Barcode) = detectedListener(barcode) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment