Skip to content

Commit 862f5a9

Browse files
Rob ChohanRob Chohan
authored andcommitted
added example code for encode
1 parent c259a5c commit 862f5a9

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Android/BarcodeScanner/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,25 @@ A full example could be:
5555
alert("Scanning failed: " + error);
5656
}, {yesString: "Install"}
5757
);
58+
59+
## Encoding a Barcode ##
60+
Supported encoding types:
61+
62+
* TEXT_TYPE
63+
* EMAIL_TYPE
64+
* PHONE_TYPE
65+
* SMS_TYPE
66+
67+
68+
A full example could be:
69+
70+
window.plugins.barcodeScanner.encode(BarcodeScanner.Encode.TEXT_TYPE, "http://www.nytimes.com", function(success) {
71+
alert("encode success: " + success);
72+
}, function(fail) {
73+
alert("encoding failed: " + fail);
74+
}, {yesString: "Install"}
75+
);
76+
5877

5978
## BUGS AND CONTRIBUTIONS ##
6079
The latest bleeding-edge version is available [on GitHub](http://github.com/ascorbic/phonegap-plugins/tree/master/Android/)

0 commit comments

Comments
 (0)