Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install the barcode scanning library without a google account?

I would like to install the android-vision portion of google play services on devices that are not allowed to have a google account signed in. Traditionally, the android-vision library is downloaded through the play store as an update to google play services.

According to this, the package name should be com.google.android.gms.vision.barcode. I used adb to list all packages installed on my rooted nexus device that has the barcode scanning library downloaded and the package was not in the list. I was hoping to pull the package itself and then distribute it.

Thank you for your time and effort.

like image 421
Foxx Avatar asked Aug 23 '16 13:08

Foxx


People also ask

How do I install barcode reader software?

5. Connect the barcode scanner cable to an unused USB port on the computer. Wait a few seconds for Windows to detect the device and configure the USB barcode scanner using the driver you installed from the installation disc.

Is there a free app to scan barcodes?

ScanLife Barcode Reader (Free / iOS, Android) Designed for Android/iOS, the ScanLife barcode reader enables users to quickly scan barcodes and receive information. Usable for both traditional barcodes and QR codes, this is a versatile and simple barcode reader. Even better, it's free.

How do I scan a QR code without an Android app?

Google Screen Search: Google Screen Search allows consumers to scan QR Codes without an app instantly. All one has to do is point their camera at the QR Code, long-press the Home button and click on 'What's on my screen? ' The QR Code link will be available for consumers to open.


2 Answers

You can use Third Part Library implementation com.journeyapps:zxing-android-embedded:3.5.0

Using this library you can easily integrate QR-Code and BAR Code Reader as well without signing in with a google account.

My code here for Bar-Code Reader:

    package com.example.elanwrap.qr_code_elan;

    import android.content.Intent;
    import android.net.Uri;
    import android.support.v7.app.AppCompatActivity;
    import android.os.Bundle;
    import android.view.View;
    import android.widget.Button;
    import android.widget.Toast;
    import com.google.zxing.integration.android.IntentIntegrator;
    import com.google.zxing.integration.android.IntentResult;

    import static android.widget.Toast.LENGTH_LONG;

    public class MainActivity extends AppCompatActivity {

        Button button;
        //CREATING OBJECT
        private IntentIntegrator qrCode;

        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);

            button = (Button) findViewById(R.id.button);

            qrCode = new IntentIntegrator(this);

            button.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                   //  start the Scan here
                    qrCode.initiateScan();
                }
            });
        }

        @Override
        protected void onActivityResult(int requestCode, int resultCode, Intent data) {
            IntentResult intentResult = IntentIntegrator.parseActivityResult(requestCode, resultCode, data);
            super.onActivityResult(requestCode, resultCode, data);
            if (intentResult != null) {
             //passing result to another Activity.
            //    Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(intentResult.getContents() + ""));
                Intent browserIntent = new Intent(this, Result_activity.class );
                browserIntent.putExtra("rah",(intentResult.getContents()+""));
                startActivity(browserIntent);



            } else {
                Toast.makeText(getApplicationContext(), " Empty Result ", Toast.LENGTH_SHORT).show();
            }
        }
    }

and:

package com.example.elanwrap.qr_code_elan;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.widget.TextView;
import android.widget.Toast;

public class Result_activity extends Activity {
    TextView textView;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.result_activity);
        textView=(TextView)findViewById(R.id.details);
        Intent intent = getIntent();
        String str = intent.getStringExtra("rah");
        textView.setText(str);
        Toast.makeText(this, str, Toast.LENGTH_SHORT).show();
    }
}
like image 76
Rahul Kushwaha Avatar answered Sep 29 '22 12:09

Rahul Kushwaha


For any google service,you should register your add app at console.

If you don't want to add your app then you can use any third party API for barcode.

https://github.com/zxing/zxing

like image 44
ViramP Avatar answered Sep 29 '22 13:09

ViramP