| Title |
Action |
Extras | Description |
|---|---|---|---|
| Encode | com.google.zxing.client.android.ENCODE | Encode data |
Encode to barcode and display on screen. |
Data to encode.
ENCODE_DATA: The data to encode. Use Intent.putExtra(DATA, data) where data is either a String or a Bundle, depending on the type specified. See Contents for details.
ENCODE_TYPE: The type of data being supplied. Use Intent.putExtra(TYPE, type) with one of Contents.Type.
Can be one of the following:
"TEXT_TYPE": Plain text. Use Intent.putExtra(DATA, string). This can be used for URLs too, but string must include "http://" or "https://".
"EMAIL_TYPE": An email type. Use Intent.putExtra(DATA, string) where string is the email address.
"PHONE_TYPE": Use Intent.putExtra(DATA, string) where string is the phone number to call.
"SMS_TYPE": An SMS type. Use Intent.putExtra(DATA, string) where string is the number to SMS.
"CONTACT_TYPE": A contact. Send a request to encode it as follows:
import android.provider.Contacts;
Intent intent = new Intent(Intents.Encode.ACTION);
intent.putExtra(Intents.Encode.TYPE, CONTACT);
Bundle bundle = new Bundle();
bundle.putString(Contacts.Intents.Insert.NAME, "Jenny");
bundle.putString(Contacts.Intents.Insert.PHONE, "8675309");
bundle.putString(Contacts.Intents.Insert.EMAIL, "jenny@the80s.com");
intent.putExtra(Intents.Encode.DATA, bundle);
"LOCATION_TYPE": A geographic location. Use as follows:
Bundle bundle = new Bundle();
bundle.putFloat("LAT", latitude);
bundle.putFloat("LONG", longitude);
intent.putExtra(Intents.Encode.DATA, bundle);
See Android Manifest, com.android.barcodes.Intents, and com.android.barcodes.Contents
| Title |
Action |
Extras | Description |
|---|---|---|---|
| Encode | com.google.zxing.client.android.ENCODE | Encode data |
Encode to barcode and display on screen. |