Hei! In my android app I have a button that starts the app Barcode Scanner. I want to stop this app after 2 minutes, for example. How can I do this?
This is my code :
qrgame = (Button) findViewById(R.id.qrgame);
qrgame.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
Intent intent = new Intent(
"com.google.zxing.client.android.SCAN");
intent.setPackage("com.google.zxing.client.android");
intent.putExtra("SCAN_MODE", "QR_CODE_MODE");
startActivityForResult(intent, 0);
}
});
See Question&Answers more detail:os