

To share the files in Android we have to do the following steps.įirst set the permission in the AndroidManifest file, as followed. The Explicit Intent is the one that runs the specific component or the class, it is mostly used to run the different internal activities. The first one ‘Implicit Intent’ doesn’t specify the component but it provides the information of available components provided by the system that is best to run for that. There are two types of intent available in Android, one is Implicit Intent and another one is Explicit Intent. Intent – in Android Intent is a message object that is used to communicate between different components, like Activities, Broadcast receiver, Content Providers, and Services. Before proceed, what is intent in Android? It uses the action ACTION_SEND, it will communicate with other applications to share the content using the URI of the files. Android allows us to share the content with intent, this can be done by using Implicit intent. StartActivity(Intent.In this post, we will learn how to share the files in Android using the Intent. Intent.putExtra(Intent.EXTRA_TEXT, inBody.getText().toString().trim()) Intent.putExtra(Intent.EXTRA_SUBJECT, inSubject.getText().toString().trim()) Public class ScannedBarcodeActivity extends AppCompatActivity ) activity_email.xmlĪdd the Google Mobile Vision API in adle file. activity_scanned_barcode.xmlĬreate an activity_email.xml layout to perform email action. The SurfaceView widget is used for camera source. activity_main.xmlĬreate an activity_scanned_barcode.xml layout and add the following code. 2D barcodes: QR Code, Data Matrix, AZTEC, PDF-417.Ĭreate an activity_main.xml and add the following code.The Mobile Vision API supports the following formats of the barcode. Here we will use the Mobile Vision API of Google Play Service to scan the QR code. In this example, we will scan the QR code of a web URL and Email address, and act on it. By Integrating the Mobile Vision API of Google Play Service.Using a web-based application that accesses your camera and scans the QR code or barcode and returns the results.Using a web-based API solution, where the QR code or barcode is uploaded to the server, and the server returns the results.Scanning the QR code can be done programmatically by using many ways:

Next → ← prev Android QR Code / Bar Code Scannerĭuring the development of an android application, sometimes it is required to provide a functionality that scans a QR code or barcode.
