Create Barcode Scanner For Android Using Kotlin, Part 3, Continuous Scan Mode

Arief Bayu Purwanto
Bits and pieces of my mind
4 min readJul 1, 2020

--

So, I’ve got a question from the second part of this tutorial series that asked how to properly implement a continuous scan without blocking the UI thread. So I guess, it’s time to write the next series as I’ve done this in several of my company’s products.

Create New Activity

Just like in part two, we will continue our code based on the previous tutorial. So, let us start by creating a new empty activity. Let us call it ContinuousActivity:

And also configure the manifest to make it as start activity. I don’t really like checking Launcher Activity in New Activity Dialog as it will produce more than one launcher activity. I liked to just cut the piece and pasted into whatever activity I want as a launcher😂.

Implement The Layout

--

--

Arief Bayu Purwanto
Bits and pieces of my mind

Project Leader at AkuPeduli.org | Mozilla Representative | @bloggerngalam | @ariefbayu | blogging at https://ariefbayu.dev