{"id":1994,"date":"2011-01-28T13:30:04","date_gmt":"2011-01-28T12:30:04","guid":{"rendered":"http:\/\/blogs.wittwer.fr\/whiler\/?p=1994"},"modified":"2023-03-12T15:01:34","modified_gmt":"2023-03-12T14:01:34","slug":"wbarcodeslist","status":"publish","type":"post","link":"https:\/\/blogs.wittwer.fr\/whiler\/2011\/01\/28\/wbarcodeslist\/","title":{"rendered":"wBarCodesList"},"content":{"rendered":"<table>\n<tr>\n<td><div id=\"attachment_2008\" style=\"width: 160px\" class=\"wp-caption aligncenter\"><a href=\"\/whiler\/wp-content\/uploads\/2011\/01\/wBarCodesList-logo.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2008\" src=\"\/whiler\/wp-content\/uploads\/2011\/01\/wBarCodesList-logo-150x150.jpg\" alt=\"wBarCodesList\" title=\"wBarCodesList\" width=\"150\" height=\"150\" class=\"size-thumbnail wp-image-2008\" srcset=\"https:\/\/blogs.wittwer.fr\/whiler\/wp-content\/uploads\/2011\/01\/wBarCodesList-logo-150x150.jpg 150w, https:\/\/blogs.wittwer.fr\/whiler\/wp-content\/uploads\/2011\/01\/wBarCodesList-logo-300x300.jpg 300w, https:\/\/blogs.wittwer.fr\/whiler\/wp-content\/uploads\/2011\/01\/wBarCodesList-logo.jpg 512w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a><p id=\"caption-attachment-2008\" class=\"wp-caption-text\">wBarCodesList<\/p><\/div><\/td>\n<td>Une petite nouvelle application que j&rsquo;ai rapidement cr\u00e9\u00e9e pour scanner de nombreux codes-barres et en obtenir la liste par email.<\/p>\n<table width=\"100%\">\n<tr>\n<td style=\"text-align: center; width: 125px;\"><a href=\"https:\/\/play.google.com\/store\/apps\/details?id=org.whiler.application.wbarcodeslist\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/blogs.wittwer.fr\/whiler\/wp-content\/plugins\/qr-code-tag\/data\/qrct-c9833b6c58f48bc7bc933ad704e46af2.png\" class=\"qrctimage\" \/><\/a><\/td>\n<td style=\"text-align: center;\"><div id=\"Perm.org.whiler.application.wbarcodeslist\" class=\"permissions\"><a href=\"javascript:void(0);\" onclick=\"android_permissions_show(&quot;org.whiler.application.wbarcodeslist&quot);\" >Afficher les permissions<\/a><\/div><br \/><a href=\"\/whiler\/wp-content\/uploads\/2011\/01\/wBarCodesList.apk\">T\u00e9l\u00e9charger<\/a><\/td>\n<\/tr>\n<\/table>\n<\/td>\n<\/tr>\n<\/table>\n<p>R\u00e9cemment, un ami m&rsquo;a envoy\u00e9 sa liste de DVDs\/Blu-rays via une adresse Web. Sa liste est mise \u00e0 jour depuis une application, <a href=\"https:\/\/www.invelos.com\/dvdpro\/Info.aspx\" target=\"_blank\" rel=\"noopener\">DVD Profiler<\/a>, qui utilise une grande base de donn\u00e9es communautaire afin de facilement retrouver un film afin de l&rsquo;ajouter \u00e0 sa propre liste.<\/p>\n<p>Si on commence une collection et que l&rsquo;on s&rsquo;outille en m\u00eame temps&#8230; rien de plus facile que d&rsquo;entrer au fur et \u00e0 mesure ses nouveaux \u00e9l\u00e9ments. Le probl\u00e8me se pose lorsque l&rsquo;on a d\u00e9j\u00e0 une collection et que l&rsquo;on souhaite la rentrer dans un nouvel outil&#8230; cela peut \u00eatre extr\u00eamement fastidieux <img src=\"https:\/\/blogs.wittwer.fr\/whiler\/wp-includes\/images\/smilies\/skype\/\/worry.gif\" alt=\":s\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" \/><\/p>\n<p>Dans le cas pr\u00e9sent, <a href=\"https:\/\/www.invelos.com\/dvdpro\/Info.aspx\" target=\"_blank\" rel=\"noopener\">DVD Profiler<\/a> offre plusieurs possibilit\u00e9 pour saisir sa collection. On peut bien \u00e9videmment saisir le titre, mais comme pour un m\u00eame titre il existe g\u00e9n\u00e9ralement plusieurs versions (vendu en France ou ailleurs, version collector, &#8230;), il est pr\u00e9f\u00e9rable de saisir le num\u00e9ro du code-barres du produit.<\/p>\n<p>Voulant utiliser mon t\u00e9l\u00e9phone pour scanner ces codes-barres plut\u00f4t que de les saisir un par un \u00e0 la main, j&rsquo;ai essay\u00e9 de trouver une application gratuite qui r\u00e9pondait \u00e0 mon besoin&#8230; Or ils en existent moults et la majorit\u00e9 des applications sont trop \u00e9volu\u00e9es et vont directement chercher la r\u00e9f\u00e9rence du produit en ligne \u00e0 partir du code-barres. De plus, obtenir une liste simple n&rsquo;est g\u00e9n\u00e9ralement pas propos\u00e9e ou n\u00e9cessite de nombreux clicks.<\/p>\n<p>Donc, plut\u00f4t que de passer 3 jours \u00e0 chercher l&rsquo;application de mes r\u00eaves, j&rsquo;ai pr\u00e9f\u00e9r\u00e9 gagner du temps en la d\u00e9veloppement moi-m\u00eame <img src=\"https:\/\/blogs.wittwer.fr\/whiler\/wp-includes\/images\/smilies\/skype\/\/happy.gif\" alt=\"(lol)\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" \/><\/p>\n<p>Son principe est simple&nbsp;:<\/p>\n<ul>\n<li>un bouton pour scanner<\/li>\n<li>une liste de ce que l&rsquo;on vient de scanner<\/li>\n<li>un menu permettant&nbsp;:\n<ul>\n<li>d&rsquo;envoyer la liste par email<\/li>\n<li>de param\u00e9trer l&rsquo;application<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Retrouvez dans les pages suivantes, l&rsquo;interface de l&rsquo;application et des informations sur la m\u00e9thode utilis\u00e9e&#8230;<br \/>\n<!--nextpage--><br \/>\nL&rsquo;interface est sobre&nbsp;:<\/p>\n<ul>\n<li>le champ dans lequel les valeurs des codes sont ins\u00e9r\u00e9s&nbsp;: si vous scannez des <a href=\"http:\/\/fr.wikipedia.org\/wiki\/Code_QR\" rel=\"glossary\" target=\"_blank\" title=\"Wikipedia, D&eacute;finition de&nbsp;: codes QR\" style=\"\" >codes QR<\/a><sup style=\"font-family: Georgia, Times New Roman, Serif; font-weight: bold; color: #AAAAAA\" ><em>W<\/em><\/sup>, vous pouvez avoir du texte, des liens, &#8230;<\/li>\n<li>le bouton pour lancer le scanneur&nbsp;: je n&rsquo;ai pas r\u00e9invent\u00e9 la roue, <img loading=\"lazy\" decoding=\"async\" src=\"\/whiler\/wp-content\/uploads\/2010\/08\/stat_sys_warning_red.png\" alt=\"Attention !!!\" title=\"Attention !!!\" width=\"32\" height=\"32\" class=\"size-full wp-image-1503\" \/>l&rsquo;application <a href=\"\/whiler\/2010\/05\/19\/applications-android\/#BarcodeScanner\">Barcode Scanner<\/a> doit \u00eatre install\u00e9e car  je l&rsquo;utilise pour scanner et r\u00e9cup\u00e9rer le code associ\u00e9. Pour les d\u00e9veloppeurs, j&rsquo;explique en <a href=\"\/whiler\/2011\/01\/28\/wbarcodeslist\/3\/\">page 3<\/a> comment je l&rsquo;utilise  <img src=\"https:\/\/blogs.wittwer.fr\/whiler\/wp-includes\/images\/smilies\/skype\/\/wink.gif\" alt=\";)\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" \/> <\/li>\n<\/ul>\n<div id=\"attachment_1999\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"\/whiler\/wp-content\/uploads\/2011\/01\/wBarCodesList.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1999\" src=\"\/whiler\/wp-content\/uploads\/2011\/01\/wBarCodesList-300x180.png\" alt=\"wBarCodesList - Interface\" title=\"wBarCodesList - Interface\" width=\"300\" height=\"180\" class=\"size-medium wp-image-1999\" srcset=\"https:\/\/blogs.wittwer.fr\/whiler\/wp-content\/uploads\/2011\/01\/wBarCodesList-300x180.png 300w, https:\/\/blogs.wittwer.fr\/whiler\/wp-content\/uploads\/2011\/01\/wBarCodesList.png 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-1999\" class=\"wp-caption-text\">wBarCodesList - Interface<\/p><\/div>\n<p>Si l&rsquo;on appuie sur le bouton <em>Menu<\/em>, on acc\u00e8de \u00e0 d&rsquo;autres fonctions&nbsp;:<\/p>\n<ul>\n<li>Envoyer les codes par email<\/li>\n<li>Modifier les pr\u00e9f\u00e9rences de l&rsquo;application<\/li>\n<li>Effacer le texte de l&rsquo;interface<\/li>\n<li>Quitter l&rsquo;application<\/li>\n<\/ul>\n<div id=\"attachment_2001\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"\/whiler\/wp-content\/uploads\/2011\/01\/wBarCodesList-menu.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2001\" src=\"\/whiler\/wp-content\/uploads\/2011\/01\/wBarCodesList-menu-300x126.png\" alt=\"wBarCodesList - Menu\" title=\"wBarCodesList - Menu\" width=\"300\" height=\"126\" class=\"size-medium wp-image-2001\" srcset=\"https:\/\/blogs.wittwer.fr\/whiler\/wp-content\/uploads\/2011\/01\/wBarCodesList-menu-300x126.png 300w, https:\/\/blogs.wittwer.fr\/whiler\/wp-content\/uploads\/2011\/01\/wBarCodesList-menu.png 480w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-2001\" class=\"wp-caption-text\">wBarCodesList - Menu<\/p><\/div>\n<p>Dans les pr\u00e9f\u00e9rences, on peut&nbsp;:<\/p>\n<ul>\n<li>Sp\u00e9cifier l&rsquo;adresse par d\u00e9faut \u00e0 utiliser pour l&rsquo;envoie des emails<\/li>\n<li>L&rsquo;objet par d\u00e9faut de l&#8217;email<\/li>\n<li>Si l&rsquo;on souhaite purger les codes lorsqu&rsquo;on les a envoy\u00e9s par email<\/li>\n<li>Le format des codes \u00e0 d\u00e9coder<\/li>\n<li>Si l&rsquo;on veut que le scanneur tourne en boucle jusqu&rsquo;\u00e0 ce que l&rsquo;on appuie sur le bouton Retour pour revenir \u00e0 l&rsquo;interface de d\u00e9part<\/li>\n<\/ul>\n<table width=\"100%\">\n<tr>\n<td width=\"50%\"><div id=\"attachment_2003\" style=\"width: 190px\" class=\"wp-caption aligncenter\"><a href=\"\/whiler\/wp-content\/uploads\/2011\/01\/wBarCodesList-preferences.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2003\" src=\"\/whiler\/wp-content\/uploads\/2011\/01\/wBarCodesList-preferences-180x300.png\" alt=\"wBarCodesList - Pr\u00e9f\u00e9rences\" title=\"wBarCodesList - Pr\u00e9f\u00e9rences\" width=\"180\" height=\"300\" class=\"size-medium wp-image-2003\" srcset=\"https:\/\/blogs.wittwer.fr\/whiler\/wp-content\/uploads\/2011\/01\/wBarCodesList-preferences-180x300.png 180w, https:\/\/blogs.wittwer.fr\/whiler\/wp-content\/uploads\/2011\/01\/wBarCodesList-preferences.png 480w\" sizes=\"auto, (max-width: 180px) 100vw, 180px\" \/><\/a><p id=\"caption-attachment-2003\" class=\"wp-caption-text\">wBarCodesList - Pr\u00e9f\u00e9rences<\/p><\/div><\/td>\n<td width=\"50%\"><div id=\"attachment_2004\" style=\"width: 190px\" class=\"wp-caption aligncenter\"><a href=\"\/whiler\/wp-content\/uploads\/2011\/01\/wBarCodesList-scan_mode.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2004\" src=\"\/whiler\/wp-content\/uploads\/2011\/01\/wBarCodesList-scan_mode-180x300.png\" alt=\"wBarCodesList - Formats\" title=\"wBarCodesList - Formats\" width=\"180\" height=\"300\" class=\"size-medium wp-image-2004\" srcset=\"https:\/\/blogs.wittwer.fr\/whiler\/wp-content\/uploads\/2011\/01\/wBarCodesList-scan_mode-180x300.png 180w, https:\/\/blogs.wittwer.fr\/whiler\/wp-content\/uploads\/2011\/01\/wBarCodesList-scan_mode.png 480w\" sizes=\"auto, (max-width: 180px) 100vw, 180px\" \/><\/a><p id=\"caption-attachment-2004\" class=\"wp-caption-text\">wBarCodesList - Formats<\/p><\/div><\/td>\n<\/tr>\n<\/table>\n<p>Si vous utilisez Froyo, l&rsquo;application s&rsquo;installe par d\u00e9faut sur la carte m\u00e9moire. <img src=\"https:\/\/blogs.wittwer.fr\/whiler\/wp-includes\/images\/smilies\/skype\/\/yes.gif\" alt=\"(y)\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" \/> <\/p>\n<p>Sur la page suivante, quelques d\u00e9tails techniques concernant l&rsquo;impl\u00e9mentation du scanneur de <a href=\"\/whiler\/2010\/05\/19\/applications-android\/#BarcodeScanner\">Barcode Scanner<\/a>&#8230;<br \/>\n<!--nextpage--><br \/>\nSi vous souhaitez offrir la possibilit\u00e9 de scanner des codes (<a href=\"http:\/\/fr.wikipedia.org\/wiki\/code-barres\" rel=\"glossary\" target=\"_blank\" title=\"Wikipedia, D&eacute;finition de&nbsp;: code-barres\" style=\"\" >code-barres<\/a><sup style=\"font-family: Georgia, Times New Roman, Serif; font-weight: bold; color: #AAAAAA\" ><em>W<\/em><\/sup>, <a href=\"http:\/\/fr.wikipedia.org\/wiki\/code_QR\" rel=\"glossary\" target=\"_blank\" title=\"Wikipedia, D&eacute;finition de&nbsp;: code QR\" style=\"\" >code QR<\/a><sup style=\"font-family: Georgia, Times New Roman, Serif; font-weight: bold; color: #AAAAAA\" ><em>W<\/em><\/sup>, <a href=\"http:\/\/fr.wikipedia.org\/wiki\/Datamatrix\" rel=\"glossary\" target=\"_blank\" title=\"Wikipedia, D&eacute;finition de&nbsp;: Datamatrix\" style=\"\" >Datamatrix<\/a><sup style=\"font-family: Georgia, Times New Roman, Serif; font-weight: bold; color: #AAAAAA\" ><em>W<\/em><\/sup>) depuis votre application Android, vous pouvez \u00e9ventuellement utiliser l&rsquo;API de l&rsquo;application <a href=\"\/whiler\/2010\/05\/19\/applications-android\/#BarcodeScanner\">Barcode Scanner<\/a>.<\/p>\n<p>Cela n\u00e9cessite donc que cette application soit \u00e9galement install\u00e9e en plus de la votre l\u00e0 o\u00f9 vous souhaiterez l&rsquo;utiliser.<br \/>\nVous pouvez la trouver sur le <a href=\"http:\/\/fr.wikipedia.org\/wiki\/Android_Market\" rel=\"glossary\" target=\"_blank\" title=\"Wikipedia, D&eacute;finition de&nbsp;: market Android\" style=\"\" >market Android<\/a><sup style=\"font-family: Georgia, Times New Roman, Serif; font-weight: bold; color: #AAAAAA\" ><em>W<\/em><\/sup> ou directement scanner ce code&nbsp;:<br \/>\n<center><a href=\"https:\/\/play.google.com\/store\/apps\/details?id=com.google.zxing.client.android\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/blogs.wittwer.fr\/whiler\/wp-content\/plugins\/qr-code-tag\/data\/qrct-4269609586d5516ffceb1b6a6b5c645d.png\" class=\"qrctimage\" \/><\/a><\/center><\/p>\n<p>Dans votre application, il vous suffira alors d&rsquo;impl\u00e9menter l&rsquo;appel de l&rsquo;<a target=\"_blank\" href=\"https:\/\/developer.android.com\/reference\/android\/content\/Intent.html\" rel=\"noopener\">Intent<\/a> fourni par l'<a href=\"http:\/\/fr.wikipedia.org\/wiki\/Interface_de_programmation\" rel=\"glossary\" target=\"_blank\" title=\"Wikipedia, D&eacute;finition de&nbsp;: API\" style=\"\" >API<\/a><sup style=\"font-family: Georgia, Times New Roman, Serif; font-weight: bold; color: #AAAAAA\" ><em>W<\/em><\/sup> et la m\u00e9thode qui sera appel\u00e9e en retour&nbsp;:<\/p>\n<div class=\"codecolorer-container java dawn\" style=\"overflow:auto;white-space:nowrap;width:480px;height:300px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/>14<br \/>15<br \/>16<br \/>17<br \/>18<br \/>19<br \/>20<br \/>21<br \/>22<br \/>23<br \/>24<br \/>25<br \/>26<br \/>27<br \/>28<br \/>29<br \/>30<br \/><\/div><\/td><td><div class=\"java codecolorer\">&nbsp; <span class=\"kw1\">final<\/span> <span class=\"kw1\">public<\/span> <span class=\"kw1\">static<\/span> <span class=\"kw4\">int<\/span> SCAN_RC <span class=\"sy0\">=<\/span> <span class=\"nu0\">0<\/span><span class=\"sy0\">;<\/span><br \/>\n<br \/>\n&nbsp; <span class=\"kw1\">protected<\/span> <span class=\"kw4\">void<\/span> onActivityResult<span class=\"br0\">&#40;<\/span><span class=\"kw4\">int<\/span> requestCode, <span class=\"kw4\">int<\/span> resultCode, Intent intent<span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw1\">if<\/span> <span class=\"br0\">&#40;<\/span>requestCode <span class=\"sy0\">==<\/span> SCAN_RC<span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"kw1\">if<\/span> <span class=\"br0\">&#40;<\/span>resultCode <span class=\"sy0\">==<\/span> RESULT_OK<span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; <a href=\"http:\/\/www.google.com\/search?hl=en&amp;q=allinurl%3Adocs.oracle.com+javase+docs+api+string\"><span class=\"kw3\">String<\/span><\/a> contents <span class=\"sy0\">=<\/span> intent.<span class=\"me1\">getStringExtra<\/span><span class=\"br0\">&#40;<\/span><span class=\"st0\">&quot;SCAN_RESULT&quot;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; <a href=\"http:\/\/www.google.com\/search?hl=en&amp;q=allinurl%3Adocs.oracle.com+javase+docs+api+string\"><span class=\"kw3\">String<\/span><\/a> format <span class=\"sy0\">=<\/span> intent.<span class=\"me1\">getStringExtra<\/span><span class=\"br0\">&#40;<\/span><span class=\"st0\">&quot;SCAN_RESULT_FORMAT&quot;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; <span class=\"co1\">\/\/ Votre traitement sp\u00e9cifique ci-dessous<\/span><br \/>\n<br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"br0\">&#125;<\/span> <span class=\"kw1\">else<\/span> <span class=\"kw1\">if<\/span> <span class=\"br0\">&#40;<\/span>resultCode <span class=\"sy0\">==<\/span> RESULT_CANCELED<span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; <span class=\"co1\">\/\/ En cas d'annulation<\/span><br \/>\n<br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"br0\">&#125;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"br0\">&#125;<\/span><br \/>\n&nbsp; <span class=\"br0\">&#125;<\/span><br \/>\n<br \/>\n&nbsp; <span class=\"co3\">\/**<br \/>\n&nbsp; &nbsp;* Launch the scanner<br \/>\n&nbsp; &nbsp;*\/<\/span><br \/>\n&nbsp; <span class=\"kw1\">public<\/span> <span class=\"kw4\">void<\/span> scan<span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw1\">try<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; Intent intent <span class=\"sy0\">=<\/span> <span class=\"kw1\">new<\/span> Intent<span class=\"br0\">&#40;<\/span><span class=\"st0\">&quot;com.google.zxing.client.android.SCAN&quot;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; intent.<span class=\"me1\">setPackage<\/span><span class=\"br0\">&#40;<\/span><span class=\"st0\">&quot;com.google.zxing.client.android&quot;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; intent.<span class=\"me1\">putExtra<\/span><span class=\"br0\">&#40;<\/span><span class=\"st0\">&quot;SCAN_MODE&quot;<\/span>, <span class=\"st0\">&quot;QR_CODE_MODE&quot;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span> <span class=\"co1\">\/\/ ou un autre format, ou omis pour tous les formats<\/span><br \/>\n&nbsp; &nbsp; &nbsp; startActivityForResult<span class=\"br0\">&#40;<\/span>intent, SCAN_RC<span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"br0\">&#125;<\/span> <span class=\"kw1\">catch<\/span> <span class=\"br0\">&#40;<\/span><a href=\"http:\/\/www.google.com\/search?hl=en&amp;q=allinurl%3Adocs.oracle.com+javase+docs+api+exception\"><span class=\"kw3\">Exception<\/span><\/a> e<span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"co1\">\/\/ Gestion des erreurs<\/span><br \/>\n<br \/>\n&nbsp; &nbsp; <span class=\"br0\">&#125;<\/span><br \/>\n&nbsp; <span class=\"br0\">&#125;<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>Une <a target=\"_blank\" href=\"https:\/\/code.google.com\/p\/zxing\/source\/browse\/trunk\/android-integration\/src\/com\/google\/zxing\/integration\/android\/IntentIntegrator.java\" rel=\"noopener\">classe<\/a> est \u00e9galement fournie pour encore plus vous faciliter son impl\u00e9mentation.<\/p>\n<p>Vous trouverez toutes les informations n\u00e9cessaires depuis <a target=\"_blank\" href=\"https:\/\/code.google.com\/p\/zxing\/\" rel=\"noopener\">les pages Web du site officiel<\/a>.<\/p>\n<p>Sur la <a href=\"\/whiler\/2011\/01\/28\/wbarcodeslist\/4\/\">quatri\u00e8me page<\/a>, vous trouverez les explications et des exemples sur l&rsquo;utilisation des formats personnalis\u00e9s disponible \u00e0 partir de la version 2.0&#8230;<br \/>\n<!--nextpage--><br \/>\nDepuis la version 2.0, il est possible de personnaliser les lignes ins\u00e9r\u00e9es lorsque l&rsquo;on scanne un code. Pour cela, il suffit de modifier les Pr\u00e9f\u00e9rences de wBarCodesList&nbsp;: <em>Touche Menu<\/em>, <em>Pr\u00e9f\u00e9rences<\/em>, puis de cliquer sur <em>Format<\/em> afin de l&rsquo;\u00e9diter.<br \/>\n<div id=\"attachment_2021\" style=\"width: 160px\" class=\"wp-caption aligncenter\"><a href=\"\/whiler\/wp-content\/uploads\/2011\/01\/wBarCodesList-format.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2021\" src=\"\/whiler\/wp-content\/uploads\/2011\/01\/wBarCodesList-format-150x150.png\" alt=\"wBarCodesList - Format\" title=\"wBarCodesList - Format\" width=\"150\" height=\"150\" class=\"size-thumbnail wp-image-2021\" \/><\/a><p id=\"caption-attachment-2021\" class=\"wp-caption-text\">wBarCodesList - Format<\/p><\/div><br \/>\nVous pouvez saisir le texte que vous souhaitez et utiliser les tags pour ins\u00e9rer des valeurs dynamiques dont voici la liste&nbsp;:<\/p>\n<table id=\"wBarCodesListFormats\" name=\"wBarCodesListFormats\">\n<tr>\n<th>Tags<\/th>\n<th>Descriptions<\/th>\n<th>Exemples<\/th>\n<\/tr>\n<tr>\n<th>{24H}<\/th>\n<td>Heures:Minutes:Secondes au format 24h<br \/>Full 24-hour time<\/td>\n<td style=\"text-align:center;\">14:30:27<\/td>\n<\/tr>\n<tr>\n<th>{12H}<\/th>\n<td>Heures:Minutes:Secondes au format 12h<br \/>Full 12-hour time<\/td>\n<td style=\"text-align:center;\">02:30:27 PM<\/td>\n<\/tr>\n<tr>\n<th>{24h}<\/th>\n<td>Heures:Minutes au format 24h<br \/>Short 24-hour time<\/td>\n<td style=\"text-align:center;\">14:30<\/td>\n<\/tr>\n<tr>\n<th>{12h}<\/th>\n<td>Heures:Minutes au format 12h<br \/>Short 12-hour time<\/td>\n<td style=\"text-align:center;\">02:30 PM<\/td>\n<\/tr>\n<tr>\n<th>{DATE}<\/th>\n<td>Date au format AAAA-MM-DD<br \/>Full date in ISO 8601 format (YYYY-MM-DD).<\/td>\n<td style=\"text-align:center;\">2011-01-28<\/td>\n<\/tr>\n<tr>\n<th>{C}<\/th>\n<td>Code scann\u00e9<br \/>Scanned code<\/td>\n<td style=\"text-align:center;\">1234567890128<\/td>\n<\/tr>\n<tr>\n<th>{F}<\/th>\n<td>Format du code scann\u00e9<br \/>Code format<\/td>\n<td style=\"text-align:center;\">EAN_13<\/td>\n<\/tr>\n<tr>\n<th>{D}<\/th>\n<td>La description demand\u00e9e \u00e0 l&rsquo;utilisateur<br \/>The prompted description<\/td>\n<td style=\"text-align:center;\">Blah blah<\/td>\n<\/tr>\n<tr>\n<th>{S}<\/th>\n<td>La valeur renseign\u00e9e dans la <em>Pr\u00e9f\u00e9rence S\u00e9parateur<\/em><br \/>The value set in <em>Delimiter Preference<\/em><\/td>\n<td style=\"text-align:center;\">,<\/td>\n<\/tr>\n<\/table>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/whiler\/wp-content\/uploads\/2010\/08\/stat_sys_warning_red.png\" alt=\"Attention !!!\" title=\"Attention !!!\" width=\"32\" height=\"32\" class=\"size-full wp-image-1503\" \/> Si vous ne mettez pas de tag <strong>{C}<\/strong>, vous ne verrez jamais votre code scann\u00e9&nbsp;!<\/p>\n<p>Si vous avez des questions, pensez \u00e0 d&rsquo;autres valeurs n\u00e9cessaires, n&rsquo;h\u00e9sitez pas \u00e0 laisser un commentaire <img src=\"https:\/\/blogs.wittwer.fr\/whiler\/wp-includes\/images\/smilies\/skype\/\/wink.gif\" alt=\";)\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" \/> <\/p>\n<p><center><a href=\"https:\/\/play.google.com\/store\/apps\/details?id=org.whiler.application.wbarcodeslist\"><img loading=\"lazy\" decoding=\"async\" src=\"\/whiler\/wp-content\/uploads\/2011\/06\/avail_market_logo.png\" alt=\"Android Market\" title=\"Android Market\" width=\"117\" height=\"45\" class=\"size-full wp-image-2584\" \/><\/a><\/center><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Voulant utiliser mon t\u00e9l\u00e9phone pour scanner des codes-barres en s\u00e9rie pour en avoir une liste, j\u2019ai essay\u00e9 de trouver une application gratuite qui r\u00e9pondait \u00e0 mon besoin\u2026 Or ils en existent moults et la majorit\u00e9 des applications sont trop \u00e9volu\u00e9es et vont directement chercher la r\u00e9f\u00e9rence du produit en ligne \u00e0 partir du code-barres. De plus, obtenir une liste simple n\u2019est g\u00e9n\u00e9ralement pas propos\u00e9e ou n\u00e9cessite de nombreux clicks.<\/p>\n<p>Donc, plut\u00f4t que de passer 3 jours \u00e0 chercher l\u2019application de mes r\u00eaves, j\u2019ai pr\u00e9f\u00e9r\u00e9 gagner du temps en la d\u00e9veloppement moi-m\u00eame&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[132,6],"tags":[158,15,27,43,93,108],"class_list":["post-1994","post","type-post","status-publish","format-standard","hentry","category-android","category-dev","tag-android","tag-api","tag-coloration-syntaxique","tag-donnees","tag-freeware","tag-script"],"_links":{"self":[{"href":"https:\/\/blogs.wittwer.fr\/whiler\/wp-json\/wp\/v2\/posts\/1994","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.wittwer.fr\/whiler\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.wittwer.fr\/whiler\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.wittwer.fr\/whiler\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.wittwer.fr\/whiler\/wp-json\/wp\/v2\/comments?post=1994"}],"version-history":[{"count":1,"href":"https:\/\/blogs.wittwer.fr\/whiler\/wp-json\/wp\/v2\/posts\/1994\/revisions"}],"predecessor-version":[{"id":6377,"href":"https:\/\/blogs.wittwer.fr\/whiler\/wp-json\/wp\/v2\/posts\/1994\/revisions\/6377"}],"wp:attachment":[{"href":"https:\/\/blogs.wittwer.fr\/whiler\/wp-json\/wp\/v2\/media?parent=1994"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.wittwer.fr\/whiler\/wp-json\/wp\/v2\/categories?post=1994"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.wittwer.fr\/whiler\/wp-json\/wp\/v2\/tags?post=1994"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}