Issue 941 retrieve more info from Google Books for ISBNs

git-svn-id: https://zxing.googlecode.com/svn/trunk@1891 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2011-08-22 12:08:33 +00:00
parent 824ab62a40
commit 9af326638d
33 changed files with 296 additions and 97 deletions

View file

@ -37,6 +37,7 @@ Jonas Petersson (Prisjakt)
Joseph Wain (Google) Joseph Wain (Google)
Juho Mikkonen Juho Mikkonen
jwicks jwicks
kamilkaczm
Kevin O'Sullivan (SITA) Kevin O'Sullivan (SITA)
Kevin Xue (NetDragon Websoft Inc., China) Kevin Xue (NetDragon Websoft Inc., China)
Lachezar Dobrev Lachezar Dobrev

View file

@ -175,8 +175,7 @@
android:textColorLink="@color/result_text" android:textColorLink="@color/result_text"
android:textSize="14sp" android:textSize="14sp"
android:padding="24dip" android:padding="24dip"
android:autoLink="web" android:autoLink="web"/>
android:clickable="true"/>
</LinearLayout> </LinearLayout>

View file

@ -74,6 +74,8 @@
<string name="msg_default_type">النوع</string> <string name="msg_default_type">النوع</string>
<string name="msg_encode_barcode_failed">تعذر إنشاء الرمز الشريطي المطلوب.</string> <string name="msg_encode_barcode_failed">تعذر إنشاء الرمز الشريطي المطلوب.</string>
<string name="msg_encode_contents_failed">تعذر ترميز رمز شريطي من البيانات المتوفرة.</string> <string name="msg_encode_contents_failed">تعذر ترميز رمز شريطي من البيانات المتوفرة.</string>
<string name="msg_google_books">كتب جوجل</string>
<string name="msg_google_product">بحث جوجل</string>
<string name="msg_google_shopper_missing">لم يتم تثبيت Google Shopper</string> <string name="msg_google_shopper_missing">لم يتم تثبيت Google Shopper</string>
<string name="msg_install_google_shopper">يجمع Google Shopper بين مسح الرمز الشريطي مع الأسعار والتعليقات وغيرها بدون فتح المتصفح. هل تريد استخدامه؟</string> <string name="msg_install_google_shopper">يجمع Google Shopper بين مسح الرمز الشريطي مع الأسعار والتعليقات وغيرها بدون فتح المتصفح. هل تريد استخدامه؟</string>
<string name="msg_intent_failed">عفوا، تعذر تشغيل التطبيق المطلوب. قد تكون محتويات الرمز الشريطي غير صحيحة.</string> <string name="msg_intent_failed">عفوا، تعذر تشغيل التطبيق المطلوب. قد تكون محتويات الرمز الشريطي غير صحيحة.</string>

View file

@ -74,6 +74,8 @@
<string name="msg_default_type">Тип</string> <string name="msg_default_type">Тип</string>
<string name="msg_encode_barcode_failed">Неуспешно създаване на желания баркод.</string> <string name="msg_encode_barcode_failed">Неуспешно създаване на желания баркод.</string>
<string name="msg_encode_contents_failed">Неуспешно кодиране на подадените данни.</string> <string name="msg_encode_contents_failed">Неуспешно кодиране на подадените данни.</string>
<string name="msg_google_books">Google Books</string>
<string name="msg_google_product">Google Търсене на продукти</string>
<string name="msg_google_shopper_missing">Гугъл Магазин не е инсталиран</string> <string name="msg_google_shopper_missing">Гугъл Магазин не е инсталиран</string>
<string name="msg_install_google_shopper">Гугъл Магазин комбинира сканирането на баркодове с онлайн и локални цени, отзиви и още много неща без да отваряте браузър. Желаете ли да опитате?</string> <string name="msg_install_google_shopper">Гугъл Магазин комбинира сканирането на баркодове с онлайн и локални цени, отзиви и още много неща без да отваряте браузър. Желаете ли да опитате?</string>
<string name="msg_intent_failed">Съжаляваме, но нужното приложение не успя да се стартира. Възможно е баркода или съдържанието му да са невалидни.</string> <string name="msg_intent_failed">Съжаляваме, но нужното приложение не успя да се стартира. Възможно е баркода или съдържанието му да са невалидни.</string>

View file

@ -74,6 +74,8 @@
<string name="msg_default_type">Typ</string> <string name="msg_default_type">Typ</string>
<string name="msg_encode_barcode_failed">Nepodařilo se vytvořit požadovaný čárový kód.</string> <string name="msg_encode_barcode_failed">Nepodařilo se vytvořit požadovaný čárový kód.</string>
<string name="msg_encode_contents_failed">Nepodařilo se rozkódovat čárový kód z poskytnutých údajů.</string> <string name="msg_encode_contents_failed">Nepodařilo se rozkódovat čárový kód z poskytnutých údajů.</string>
<string name="msg_google_books">Google Books</string>
<string name="msg_google_product">Google Product Search</string>
<string name="msg_google_shopper_missing">Google Shopper není nainstalován</string> <string name="msg_google_shopper_missing">Google Shopper není nainstalován</string>
<string name="msg_install_google_shopper">Google Shopper kombinuje technologie čárového kódu s cenami, recenze a více bez otevření prohlížeče. Chtěli byste to zkusit?</string> <string name="msg_install_google_shopper">Google Shopper kombinuje technologie čárového kódu s cenami, recenze a více bez otevření prohlížeče. Chtěli byste to zkusit?</string>
<string name="msg_intent_failed">Litujeme, požadovanou aplikaci nelze spustit. Čárový kód je nefunkční.</string> <string name="msg_intent_failed">Litujeme, požadovanou aplikaci nelze spustit. Čárový kód je nefunkční.</string>

View file

@ -74,6 +74,8 @@
<string name="msg_default_type">Type</string> <string name="msg_default_type">Type</string>
<string name="msg_encode_barcode_failed">Kunne ikke generere den ønskede stregkode.</string> <string name="msg_encode_barcode_failed">Kunne ikke generere den ønskede stregkode.</string>
<string name="msg_encode_contents_failed">Kunne ikke indkode en stregkode fra oplysningerne.</string> <string name="msg_encode_contents_failed">Kunne ikke indkode en stregkode fra oplysningerne.</string>
<string name="msg_google_books">Google Books</string>
<string name="msg_google_product">Google Product Search</string>
<string name="msg_google_shopper_missing">Google Shopper er ikke installeret</string> <string name="msg_google_shopper_missing">Google Shopper er ikke installeret</string>
<string name="msg_install_google_shopper">Google Shopper kombinerer stregkodescanning med priser, anmeldelser og meget mere uden at åbne en browser. Kunne du tænke dig at prøve det?</string> <string name="msg_install_google_shopper">Google Shopper kombinerer stregkodescanning med priser, anmeldelser og meget mere uden at åbne en browser. Kunne du tænke dig at prøve det?</string>
<string name="msg_intent_failed">Beklager, den ønskede applikation kunne ikke blive startet. Stregkodeindholdet er måsket ugyldigt.</string> <string name="msg_intent_failed">Beklager, den ønskede applikation kunne ikke blive startet. Stregkodeindholdet er måsket ugyldigt.</string>

View file

@ -74,6 +74,8 @@
<string name="msg_default_type">Typ</string> <string name="msg_default_type">Typ</string>
<string name="msg_encode_barcode_failed">Der gewünschte Barcode kann nicht erzeugt werden.</string> <string name="msg_encode_barcode_failed">Der gewünschte Barcode kann nicht erzeugt werden.</string>
<string name="msg_encode_contents_failed">Aus den Daten kann kein Barcode erzeugt werden.</string> <string name="msg_encode_contents_failed">Aus den Daten kann kein Barcode erzeugt werden.</string>
<string name="msg_google_books">Google Bücher</string>
<string name="msg_google_product">Google Shopping</string>
<string name="msg_google_shopper_missing">Google Shopper ist nicht installiert</string> <string name="msg_google_shopper_missing">Google Shopper ist nicht installiert</string>
<string name="msg_install_google_shopper">Google Shopper verbindet ohne Öffnen des Browsers Barcode-Scannen mit Preisen, Testberichten und mehr. Möchten Sie es ausprobieren?</string> <string name="msg_install_google_shopper">Google Shopper verbindet ohne Öffnen des Browsers Barcode-Scannen mit Preisen, Testberichten und mehr. Möchten Sie es ausprobieren?</string>
<string name="msg_intent_failed">Die gewünschte Applikation kann nicht geöffnet werden. Der Barcode könnte ungültig sein.</string> <string name="msg_intent_failed">Die gewünschte Applikation kann nicht geöffnet werden. Der Barcode könnte ungültig sein.</string>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
Copyright (C) 2010 ZXing authors Copyright (C) 2011 ZXing authors
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@ -74,6 +74,8 @@
<string name="msg_default_type">Τύπος</string> <string name="msg_default_type">Τύπος</string>
<string name="msg_encode_barcode_failed">Σφάλμα στην παραγωγή του barcode.</string> <string name="msg_encode_barcode_failed">Σφάλμα στην παραγωγή του barcode.</string>
<string name="msg_encode_contents_failed">Δεν γίνεται να παραχθεί barcode από τα δεδομένα αυτά.</string> <string name="msg_encode_contents_failed">Δεν γίνεται να παραχθεί barcode από τα δεδομένα αυτά.</string>
<string name="msg_google_books">Google Books</string>
<string name="msg_google_product">Αναζήτηση προϊόντων Google</string>
<string name="msg_google_shopper_missing">Το Google Shopper is not installedδεν είναι εγκατεστημένο.</string> <string name="msg_google_shopper_missing">Το Google Shopper is not installedδεν είναι εγκατεστημένο.</string>
<string name="msg_install_google_shopper">Το Google Shopper συνδυάζει σκανάρισμα barcode με online και τοπικές τιμές, αξιολογήσεις και άλλα χωρίς να ανοίξετε τον browser. Θέλετε να το δοκιμάσετε;</string> <string name="msg_install_google_shopper">Το Google Shopper συνδυάζει σκανάρισμα barcode με online και τοπικές τιμές, αξιολογήσεις και άλλα χωρίς να ανοίξετε τον browser. Θέλετε να το δοκιμάσετε;</string>
<string name="msg_intent_failed">Συγνώμη, η ζητούμενη εφαρμογή δεν μπορεί να εκιννηθεί. Τα δεδομληνα του barcode ίσως δεν είναι έγκυρα.</string> <string name="msg_intent_failed">Συγνώμη, η ζητούμενη εφαρμογή δεν μπορεί να εκιννηθεί. Τα δεδομληνα του barcode ίσως δεν είναι έγκυρα.</string>
@ -107,9 +109,9 @@
<string name="preferences_play_beep_title">Μπιπ</string> <string name="preferences_play_beep_title">Μπιπ</string>
<string name="preferences_remember_duplicates_summary">Αποθήκευση ολλαπλών σκαναρισμάτων του ίδιου barcode στο ιστορικό</string> <string name="preferences_remember_duplicates_summary">Αποθήκευση ολλαπλών σκαναρισμάτων του ίδιου barcode στο ιστορικό</string>
<string name="preferences_remember_duplicates_title">Απομνημόνευση διπλών</string> <string name="preferences_remember_duplicates_title">Απομνημόνευση διπλών</string>
<string name="preferences_result_title">Ρυθμίσεις αποτελεσμάτων</string>
<string name="preferences_reverse_image_summary">Ενεργοποιήστε σε συσκευές με μόνο μπροστινή κάμερα</string> <string name="preferences_reverse_image_summary">Ενεργοποιήστε σε συσκευές με μόνο μπροστινή κάμερα</string>
<string name="preferences_reverse_image_title">Ανάποδη εικόνα κάμερας</string> <string name="preferences_reverse_image_title">Ανάποδη εικόνα κάμερας</string>
<string name="preferences_result_title">Ρυθμίσεις αποτελεσμάτων</string>
<string name="preferences_scanning_title">Όταν σκανάρεις barcodes, ψάχνε για\u2026</string> <string name="preferences_scanning_title">Όταν σκανάρεις barcodes, ψάχνε για\u2026</string>
<string name="preferences_supplemental_summary">Προσπάθησε να βρείς περισσότερες πληροφορίες για τα περιεχόμενα του barcode</string> <string name="preferences_supplemental_summary">Προσπάθησε να βρείς περισσότερες πληροφορίες για τα περιεχόμενα του barcode</string>
<string name="preferences_supplemental_title">Ψάχνε επιπλέον πληροφορίες</string> <string name="preferences_supplemental_title">Ψάχνε επιπλέον πληροφορίες</string>
@ -130,13 +132,13 @@
<string name="title_about">Barcode Scanner v</string> <string name="title_about">Barcode Scanner v</string>
<string name="wa_name">Σύνδεση WLAN</string> <string name="wa_name">Σύνδεση WLAN</string>
<string name="wifi_changing_network">Αλλαγή Δικτύου</string> <string name="wifi_changing_network">Αλλαγή Δικτύου</string>
<string name="wifi_connect_failed">Σφάλμα στην σύνδεση Δικτύου</string>
<string name="wifi_connected">Συνδέθηκε</string> <string name="wifi_connected">Συνδέθηκε</string>
<string name="wifi_creating_network">Δημιουργία Δικτύου</string> <string name="wifi_creating_network">Δημιουργία Δικτύου</string>
<string name="wifi_modifying_network">Επεξεργασία Δικτύου</string> <string name="wifi_modifying_network">Επεξεργασία Δικτύου</string>
<string name="wifi_ssid_label">Όνομα Δικτύου</string>
<string name="wifi_ssid_missing">Λείπει όνομα Δικτύου</string> <string name="wifi_ssid_missing">Λείπει όνομα Δικτύου</string>
<string name="wifi_type_incorrect">Λάθος τύπος Δικτύου</string> <string name="wifi_type_incorrect">Λάθος τύπος Δικτύου</string>
<string name="wifi_connect_failed">Σφάλμα στην σύνδεση Δικτύου</string>
<string name="wifi_ssid_label">Όνομα Δικτύου</string>
<string name="wifi_type_label">Τύπος</string> <string name="wifi_type_label">Τύπος</string>
<string name="zxing_url">http://code.google.com/p/zxing</string> <string name="zxing_url">http://code.google.com/p/zxing</string>
</resources> </resources>

View file

@ -74,6 +74,8 @@
<string name="msg_default_type">Tipo</string> <string name="msg_default_type">Tipo</string>
<string name="msg_encode_barcode_failed">No se pudo generar el código de barras solicitado.</string> <string name="msg_encode_barcode_failed">No se pudo generar el código de barras solicitado.</string>
<string name="msg_encode_contents_failed">No puede codificar un código de barras con estos datos.</string> <string name="msg_encode_contents_failed">No puede codificar un código de barras con estos datos.</string>
<string name="msg_google_books">Google Libros</string>
<string name="msg_google_product">Google Shopping</string>
<string name="msg_google_shopper_missing">Google Shopper no está instalado</string> <string name="msg_google_shopper_missing">Google Shopper no está instalado</string>
<string name="msg_install_google_shopper">Google Shopper combina escaneo de código de barras con los precios, comentarios y mucho más sin necesidad de abrir el navegador. ¿Le gustaría probarlo?</string> <string name="msg_install_google_shopper">Google Shopper combina escaneo de código de barras con los precios, comentarios y mucho más sin necesidad de abrir el navegador. ¿Le gustaría probarlo?</string>
<string name="msg_intent_failed">Lo sentimos, la aplicación solicitada no pudo ser lanzada. El contenido de código de barras puede ser inválida.</string> <string name="msg_intent_failed">Lo sentimos, la aplicación solicitada no pudo ser lanzada. El contenido de código de barras puede ser inválida.</string>

View file

@ -74,6 +74,8 @@
<string name="msg_default_type">Tyypi</string> <string name="msg_default_type">Tyypi</string>
<string name="msg_encode_barcode_failed">Ei voinut generoida pyydettyä viivakoodia.</string> <string name="msg_encode_barcode_failed">Ei voinut generoida pyydettyä viivakoodia.</string>
<string name="msg_encode_contents_failed">Ei voinut purkaa viivakoodin sisältöä.</string> <string name="msg_encode_contents_failed">Ei voinut purkaa viivakoodin sisältöä.</string>
<string name="msg_google_books">Google Books</string>
<string name="msg_google_product">Google Product Search</string>
<string name="msg_google_shopper_missing">Google Shopper ei ole asennettu</string> <string name="msg_google_shopper_missing">Google Shopper ei ole asennettu</string>
<string name="msg_install_google_shopper">Google Shopper yhdistää viivakoodi skannauksen hintoihin, arvostelut ja avaamatta selainta. Haluatko kokeilla sitä?</string> <string name="msg_install_google_shopper">Google Shopper yhdistää viivakoodi skannauksen hintoihin, arvostelut ja avaamatta selainta. Haluatko kokeilla sitä?</string>
<string name="msg_intent_failed">Anteeksi, pyydettyä ohjelmaa ei voi käynnistää. Viivakoodin sisältö on voinut vahingoittua.</string> <string name="msg_intent_failed">Anteeksi, pyydettyä ohjelmaa ei voi käynnistää. Viivakoodin sisältö on voinut vahingoittua.</string>

View file

@ -74,6 +74,8 @@
<string name="msg_default_type">Type</string> <string name="msg_default_type">Type</string>
<string name="msg_encode_barcode_failed">Impossible de générer le code-barres demandé.</string> <string name="msg_encode_barcode_failed">Impossible de générer le code-barres demandé.</string>
<string name="msg_encode_contents_failed">Impossible de créer le code-barres à partir des données fournies.</string> <string name="msg_encode_contents_failed">Impossible de créer le code-barres à partir des données fournies.</string>
<string name="msg_google_books">Google Livres</string>
<string name="msg_google_product">Google Shopping</string>
<string name="msg_google_shopper_missing">Google Shopper n\'est pas installé</string> <string name="msg_google_shopper_missing">Google Shopper n\'est pas installé</string>
<string name="msg_install_google_shopper">Google Shopper associe la lecture de codes-barres avec des prix, des commentaires et plus encore sans ouvrir le navigateur. Désirez-vous l\'essayer maintenant ?</string> <string name="msg_install_google_shopper">Google Shopper associe la lecture de codes-barres avec des prix, des commentaires et plus encore sans ouvrir le navigateur. Désirez-vous l\'essayer maintenant ?</string>
<string name="msg_intent_failed">Désolé, l\'application demandée n\'a pas pu être lancée. Le contenu du code-barres est peut-être invalide.</string> <string name="msg_intent_failed">Désolé, l\'application demandée n\'a pas pu être lancée. Le contenu du code-barres est peut-être invalide.</string>

View file

@ -74,6 +74,8 @@
<string name="msg_default_type">סוג</string> <string name="msg_default_type">סוג</string>
<string name="msg_encode_barcode_failed">לא ניתן ליצור את הברקוד המבוקש.</string> <string name="msg_encode_barcode_failed">לא ניתן ליצור את הברקוד המבוקש.</string>
<string name="msg_encode_contents_failed">לא היתה אפשרות לקודד ברקוד מהנתונים שסופקו.</string> <string name="msg_encode_contents_failed">לא היתה אפשרות לקודד ברקוד מהנתונים שסופקו.</string>
<string name="msg_google_books">Google Books</string>
<string name="msg_google_product">Google Product Search</string>
<string name="msg_google_shopper_missing">Google Shopper לא מותקן.</string> <string name="msg_google_shopper_missing">Google Shopper לא מותקן.</string>
<string name="msg_install_google_shopper">Google Shopper משלבת סריקת ברקודים עם מחירים מקוונים, חוות דעת ועוד בלי לפתוח את הדפדפן. האם ברצונך לנסות זאת?</string> <string name="msg_install_google_shopper">Google Shopper משלבת סריקת ברקודים עם מחירים מקוונים, חוות דעת ועוד בלי לפתוח את הדפדפן. האם ברצונך לנסות זאת?</string>
<string name="msg_intent_failed">סליחה, לא ניתן להפעיל את היישום המבוקש. ייתכן שתוכן הברקוד לא תקין.</string> <string name="msg_intent_failed">סליחה, לא ניתן להפעיל את היישום המבוקש. ייתכן שתוכן הברקוד לא תקין.</string>

View file

@ -74,6 +74,8 @@
<string name="msg_default_type">Típus</string> <string name="msg_default_type">Típus</string>
<string name="msg_encode_barcode_failed">Nem lehetett legenerálni a kért vonalkódot.</string> <string name="msg_encode_barcode_failed">Nem lehetett legenerálni a kért vonalkódot.</string>
<string name="msg_encode_contents_failed">Nem lehetett lekódolni a vonalkódot a megadott tartalomból.</string> <string name="msg_encode_contents_failed">Nem lehetett lekódolni a vonalkódot a megadott tartalomból.</string>
<string name="msg_google_books">Google Könyvek</string>
<string name="msg_google_product">Google Product Search</string>
<string name="msg_google_shopper_missing">A Google Shopper nincs telepítve</string> <string name="msg_google_shopper_missing">A Google Shopper nincs telepítve</string>
<string name="msg_install_google_shopper">A Google Shopper kombinálja a vonalkód szkennelést árakkal, értékelésekkel és más dolgokkal, böngésző megnyitása nélkül. Ki szeretné próbálni?</string> <string name="msg_install_google_shopper">A Google Shopper kombinálja a vonalkód szkennelést árakkal, értékelésekkel és más dolgokkal, böngésző megnyitása nélkül. Ki szeretné próbálni?</string>
<string name="msg_intent_failed">Elnézést, a kért alkalmazást nem lehet elindítani. A vonalkód tartalma lehet, hogy érvénytelen.</string> <string name="msg_intent_failed">Elnézést, a kért alkalmazást nem lehet elindítani. A vonalkód tartalma lehet, hogy érvénytelen.</string>

View file

@ -74,6 +74,8 @@
<string name="msg_default_type">Tipe</string> <string name="msg_default_type">Tipe</string>
<string name="msg_encode_barcode_failed">Tidak dapat menghasilkan barcode yang diminta.</string> <string name="msg_encode_barcode_failed">Tidak dapat menghasilkan barcode yang diminta.</string>
<string name="msg_encode_contents_failed">Tidak dapat meng-encode barcode dari data yang diberikan.</string> <string name="msg_encode_contents_failed">Tidak dapat meng-encode barcode dari data yang diberikan.</string>
<string name="msg_google_books">Google Books</string>
<string name="msg_google_product">Google Product Search</string>
<string name="msg_google_shopper_missing">Google Shopper belum dipasang</string> <string name="msg_google_shopper_missing">Google Shopper belum dipasang</string>
<string name="msg_install_google_shopper">Google Shopper menggabungkan hasil pemindaian barcode dengan harga online dan lokal, tinjauan dan lain sebagainya tanpa harus membuka browser. Apakah Anda akan mencobanya?</string> <string name="msg_install_google_shopper">Google Shopper menggabungkan hasil pemindaian barcode dengan harga online dan lokal, tinjauan dan lain sebagainya tanpa harus membuka browser. Apakah Anda akan mencobanya?</string>
<string name="msg_intent_failed">Maaf, aplikasi yang diminta tidak dapat dijalankan. Mungkin ada kesalahan isi barcode.</string> <string name="msg_intent_failed">Maaf, aplikasi yang diminta tidak dapat dijalankan. Mungkin ada kesalahan isi barcode.</string>
@ -107,9 +109,9 @@
<string name="preferences_play_beep_title">Beep</string> <string name="preferences_play_beep_title">Beep</string>
<string name="preferences_remember_duplicates_summary">Simpan beberapa pindaian dari barcode yang sama di dalam Riwayat</string> <string name="preferences_remember_duplicates_summary">Simpan beberapa pindaian dari barcode yang sama di dalam Riwayat</string>
<string name="preferences_remember_duplicates_title">Ingat duplikasi</string> <string name="preferences_remember_duplicates_title">Ingat duplikasi</string>
<string name="preferences_result_title">Hasil pengaturan</string>
<string name="preferences_reverse_image_summary">Aktifkan perangkat hanya dengan kamera depan</string> <string name="preferences_reverse_image_summary">Aktifkan perangkat hanya dengan kamera depan</string>
<string name="preferences_reverse_image_title">Gambar kamera terbalik</string> <string name="preferences_reverse_image_title">Gambar kamera terbalik</string>
<string name="preferences_result_title">Hasil pengaturan</string>
<string name="preferences_scanning_title">Ketika memindai barcode, decode\u2026</string> <string name="preferences_scanning_title">Ketika memindai barcode, decode\u2026</string>
<string name="preferences_supplemental_summary">Mencoba mendapatkan beberapa informasi mengenai isi barcode</string> <string name="preferences_supplemental_summary">Mencoba mendapatkan beberapa informasi mengenai isi barcode</string>
<string name="preferences_supplemental_title">Ambil informasi lebih lanjut</string> <string name="preferences_supplemental_title">Ambil informasi lebih lanjut</string>
@ -130,13 +132,13 @@
<string name="title_about">Barcode Scanner v</string> <string name="title_about">Barcode Scanner v</string>
<string name="wa_name">Koneksi WLAN</string> <string name="wa_name">Koneksi WLAN</string>
<string name="wifi_changing_network">Ubah Koneksi</string> <string name="wifi_changing_network">Ubah Koneksi</string>
<string name="wifi_connect_failed">Koneksi ke jaringan gagal</string>
<string name="wifi_connected">Terhubung</string> <string name="wifi_connected">Terhubung</string>
<string name="wifi_creating_network">Buat Koneksi</string> <string name="wifi_creating_network">Buat Koneksi</string>
<string name="wifi_modifying_network">Perbarui Jaringan</string> <string name="wifi_modifying_network">Perbarui Jaringan</string>
<string name="wifi_ssid_label">Nama Jaringan</string>
<string name="wifi_ssid_missing">Nama jaringan hilang</string> <string name="wifi_ssid_missing">Nama jaringan hilang</string>
<string name="wifi_type_incorrect">Jenis jaringan salah</string> <string name="wifi_type_incorrect">Jenis jaringan salah</string>
<string name="wifi_connect_failed">Koneksi ke jaringan gagal</string>
<string name="wifi_ssid_label">Nama Jaringan</string>
<string name="wifi_type_label">Tipe</string> <string name="wifi_type_label">Tipe</string>
<string name="zxing_url">http://code.google.com/p/zxing</string> <string name="zxing_url">http://code.google.com/p/zxing</string>
</resources> </resources>

View file

@ -74,6 +74,8 @@
<string name="msg_default_type">Tipo</string> <string name="msg_default_type">Tipo</string>
<string name="msg_encode_barcode_failed">Impossibile generare il codice a barre richiesto.</string> <string name="msg_encode_barcode_failed">Impossibile generare il codice a barre richiesto.</string>
<string name="msg_encode_contents_failed">Impossibile codificare un codice a barre dai dati forniti.</string> <string name="msg_encode_contents_failed">Impossibile codificare un codice a barre dai dati forniti.</string>
<string name="msg_google_books">Google Libri</string>
<string name="msg_google_product">Google Shopping</string>
<string name="msg_google_shopper_missing">Google Shopper non è installato</string> <string name="msg_google_shopper_missing">Google Shopper non è installato</string>
<string name="msg_install_google_shopper">Google Shopper combina la scansione dei codici a barre con prezzi locali e online, recensioni e altro senza dover aprire il browser. Vuoi provare?</string> <string name="msg_install_google_shopper">Google Shopper combina la scansione dei codici a barre con prezzi locali e online, recensioni e altro senza dover aprire il browser. Vuoi provare?</string>
<string name="msg_intent_failed">Spiacenti, l\'applicazione richiesta non può essere avviata. Il contenuto del codice a barre può essere non valido.</string> <string name="msg_intent_failed">Spiacenti, l\'applicazione richiesta non può essere avviata. Il contenuto del codice a barre può essere non valido.</string>

View file

@ -74,6 +74,8 @@
<string name="msg_default_type">סוג</string> <string name="msg_default_type">סוג</string>
<string name="msg_encode_barcode_failed">לא ניתן ליצור את הברקוד המבוקש.</string> <string name="msg_encode_barcode_failed">לא ניתן ליצור את הברקוד המבוקש.</string>
<string name="msg_encode_contents_failed">לא היתה אפשרות לקודד ברקוד מהנתונים שסופקו.</string> <string name="msg_encode_contents_failed">לא היתה אפשרות לקודד ברקוד מהנתונים שסופקו.</string>
<string name="msg_google_books">Google Books</string>
<string name="msg_google_product">Google Product Search</string>
<string name="msg_google_shopper_missing">Google Shopper לא מותקן.</string> <string name="msg_google_shopper_missing">Google Shopper לא מותקן.</string>
<string name="msg_install_google_shopper">Google Shopper משלבת סריקת ברקודים עם מחירים מקוונים, חוות דעת ועוד בלי לפתוח את הדפדפן. האם ברצונך לנסות זאת?</string> <string name="msg_install_google_shopper">Google Shopper משלבת סריקת ברקודים עם מחירים מקוונים, חוות דעת ועוד בלי לפתוח את הדפדפן. האם ברצונך לנסות זאת?</string>
<string name="msg_intent_failed">סליחה, לא ניתן להפעיל את היישום המבוקש. ייתכן שתוכן הברקוד לא תקין.</string> <string name="msg_intent_failed">סליחה, לא ניתן להפעיל את היישום המבוקש. ייתכן שתוכן הברקוד לא תקין.</string>

View file

@ -74,6 +74,8 @@
<string name="msg_default_type">タイプ</string> <string name="msg_default_type">タイプ</string>
<string name="msg_encode_barcode_failed">バーコードを作成できませんでした。</string> <string name="msg_encode_barcode_failed">バーコードを作成できませんでした。</string>
<string name="msg_encode_contents_failed">このデータからバーコードを作成できませんでした。</string> <string name="msg_encode_contents_failed">このデータからバーコードを作成できませんでした。</string>
<string name="msg_google_books">Google書籍</string>
<string name="msg_google_product">Googleショッピング</string>
<string name="msg_google_shopper_missing">Google ショッパーがインストールされていません</string> <string name="msg_google_shopper_missing">Google ショッパーがインストールされていません</string>
<string name="msg_install_google_shopper">Google ショッパーは、ブラウザを使わなくても、価格やレビューなどを見ることができます。試しますか?</string> <string name="msg_install_google_shopper">Google ショッパーは、ブラウザを使わなくても、価格やレビューなどを見ることができます。試しますか?</string>
<string name="msg_intent_failed">指定されたアプリケーションを起動できませんでした。バーコードの内容が無効である可能性があります。</string> <string name="msg_intent_failed">指定されたアプリケーションを起動できませんでした。バーコードの内容が無効である可能性があります。</string>

View file

@ -74,6 +74,8 @@
<string name="msg_default_type">종류</string> <string name="msg_default_type">종류</string>
<string name="msg_encode_barcode_failed">요청된 바코드를 만들지 못하였습니다.</string> <string name="msg_encode_barcode_failed">요청된 바코드를 만들지 못하였습니다.</string>
<string name="msg_encode_contents_failed">주어진 데이터로 바코드를 만들지 못하였습니다.</string> <string name="msg_encode_contents_failed">주어진 데이터로 바코드를 만들지 못하였습니다.</string>
<string name="msg_google_books">Google 도서</string>
<string name="msg_google_product">Google 상품 검색</string>
<string name="msg_google_shopper_missing">Google Shopper가 설치되어 있지 않습니다.</string> <string name="msg_google_shopper_missing">Google Shopper가 설치되어 있지 않습니다.</string>
<string name="msg_install_google_shopper">Google Shopper는 바코드 스캐닝을 이용하여 인터넷을 열지 않고 가격, 리뷰 등을 열람하는 기능을 제공합니다. 사용해 보시겠습니까?</string> <string name="msg_install_google_shopper">Google Shopper는 바코드 스캐닝을 이용하여 인터넷을 열지 않고 가격, 리뷰 등을 열람하는 기능을 제공합니다. 사용해 보시겠습니까?</string>
<string name="msg_intent_failed">죄송합니다. 어플리케이션이 실행되지 않습니다. 바코드 내용이 잘못 되었을 수도 있습니다.</string> <string name="msg_intent_failed">죄송합니다. 어플리케이션이 실행되지 않습니다. 바코드 내용이 잘못 되었을 수도 있습니다.</string>

View file

@ -74,6 +74,8 @@
<string name="msg_default_type">Type</string> <string name="msg_default_type">Type</string>
<string name="msg_encode_barcode_failed">Kan de gevraagde barcode niet genereren.</string> <string name="msg_encode_barcode_failed">Kan de gevraagde barcode niet genereren.</string>
<string name="msg_encode_contents_failed">Kan geen barcode van de gegeven data maken.</string> <string name="msg_encode_contents_failed">Kan geen barcode van de gegeven data maken.</string>
<string name="msg_google_books">Google Boeken</string>
<string name="msg_google_product">Google Shopping</string>
<string name="msg_google_shopper_missing">Google Shopper is niet geinstalleerd</string> <string name="msg_google_shopper_missing">Google Shopper is niet geinstalleerd</string>
<string name="msg_install_google_shopper">Google Shopper combineert barcode scannen met prijzen, reviews en nog veel meer zonder het openen van de browser. Wilt u het proberen?</string> <string name="msg_install_google_shopper">Google Shopper combineert barcode scannen met prijzen, reviews en nog veel meer zonder het openen van de browser. Wilt u het proberen?</string>
<string name="msg_intent_failed">Sorry, de gevraagde applicatie kan niet gestart worden. De barcode kan verkeerd zijn.</string> <string name="msg_intent_failed">Sorry, de gevraagde applicatie kan niet gestart worden. De barcode kan verkeerd zijn.</string>

View file

@ -74,6 +74,8 @@
<string name="msg_default_type">Typ</string> <string name="msg_default_type">Typ</string>
<string name="msg_encode_barcode_failed">Nie można wygenerować żądanego kodu paskowego.</string> <string name="msg_encode_barcode_failed">Nie można wygenerować żądanego kodu paskowego.</string>
<string name="msg_encode_contents_failed">Nie można zakodować kodu paskowego z dostarczonych danych.</string> <string name="msg_encode_contents_failed">Nie można zakodować kodu paskowego z dostarczonych danych.</string>
<string name="msg_google_books">Google Książki</string>
<string name="msg_google_product">Wyszukiwarka produktów Google</string>
<string name="msg_google_shopper_missing">Google Shopper nie jest zainstalowany</string> <string name="msg_google_shopper_missing">Google Shopper nie jest zainstalowany</string>
<string name="msg_install_google_shopper">Google Shopper łączy skanowanie kodów paskowych z cenami, recenzjami, itp bez otwierania przeglądarki. Czy chciał/a byś go wypróbować?</string> <string name="msg_install_google_shopper">Google Shopper łączy skanowanie kodów paskowych z cenami, recenzjami, itp bez otwierania przeglądarki. Czy chciał/a byś go wypróbować?</string>
<string name="msg_intent_failed">Przepraszamy, żadana aplikacja nie może zostać uruchomiona. Zawartość kodu paskowego może być nieprawidłowa.</string> <string name="msg_intent_failed">Przepraszamy, żadana aplikacja nie może zostać uruchomiona. Zawartość kodu paskowego może być nieprawidłowa.</string>

View file

@ -74,6 +74,8 @@
<string name="msg_default_type">Tipo</string> <string name="msg_default_type">Tipo</string>
<string name="msg_encode_barcode_failed">Não foi possível criar código de barras pedido.</string> <string name="msg_encode_barcode_failed">Não foi possível criar código de barras pedido.</string>
<string name="msg_encode_contents_failed">Não foi possível codificar código de barras dos dados fornecidos.</string> <string name="msg_encode_contents_failed">Não foi possível codificar código de barras dos dados fornecidos.</string>
<string name="msg_google_books">Google Livros</string>
<string name="msg_google_product">Google Product Search</string>
<string name="msg_google_shopper_missing">Google Shopper não está instalado.</string> <string name="msg_google_shopper_missing">Google Shopper não está instalado.</string>
<string name="msg_install_google_shopper">Google Shopper combina escaneamento de código de barras com os preços, opiniões e muito mais sem precisar abrir o navegador. Você gostaria de experimentar?</string> <string name="msg_install_google_shopper">Google Shopper combina escaneamento de código de barras com os preços, opiniões e muito mais sem precisar abrir o navegador. Você gostaria de experimentar?</string>
<string name="msg_intent_failed">Lamentamos, não foi possível iniciar a aplicação pedida. Conteúdos do código de barras inválidos..</string> <string name="msg_intent_failed">Lamentamos, não foi possível iniciar a aplicação pedida. Conteúdos do código de barras inválidos..</string>

View file

@ -74,6 +74,8 @@
<string name="msg_default_type">Тип</string> <string name="msg_default_type">Тип</string>
<string name="msg_encode_barcode_failed">Не получилось сгенерировать запрошенный штрих-код.</string> <string name="msg_encode_barcode_failed">Не получилось сгенерировать запрошенный штрих-код.</string>
<string name="msg_encode_contents_failed">Невозможно создать штрих-код из текущих данных.</string> <string name="msg_encode_contents_failed">Невозможно создать штрих-код из текущих данных.</string>
<string name="msg_google_books">Google Books</string>
<string name="msg_google_product">Google Product Search</string>
<string name="msg_google_shopper_missing">Проложение "Google Shopper" не установлено</string> <string name="msg_google_shopper_missing">Проложение "Google Shopper" не установлено</string>
<string name="msg_install_google_shopper">Приложение "Google Shopper" объединяет сканирование штрих-кодов с online-поиском товаров, цен, отзывов и т.д., не открывая браузер. Хотите попробовать?</string> <string name="msg_install_google_shopper">Приложение "Google Shopper" объединяет сканирование штрих-кодов с online-поиском товаров, цен, отзывов и т.д., не открывая браузер. Хотите попробовать?</string>
<string name="msg_intent_failed">К сожалению, запрошенное приложение не может быть запущенно. Возможно, содержимое штрих-кода повреждено.</string> <string name="msg_intent_failed">К сожалению, запрошенное приложение не может быть запущенно. Возможно, содержимое штрих-кода повреждено.</string>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
Copyright (C) 2010 ZXing authors Copyright (C) 2011 ZXing authors
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@ -74,6 +74,8 @@
<string name="msg_default_type">Typ</string> <string name="msg_default_type">Typ</string>
<string name="msg_encode_barcode_failed">Nie je možné vygenerovať požadovaný čiarový kód.</string> <string name="msg_encode_barcode_failed">Nie je možné vygenerovať požadovaný čiarový kód.</string>
<string name="msg_encode_contents_failed">Nie je možné zakódovať čiarový kód z poskytnutých údajov.</string> <string name="msg_encode_contents_failed">Nie je možné zakódovať čiarový kód z poskytnutých údajov.</string>
<string name="msg_google_books">Google Books</string>
<string name="msg_google_product">Google Product Search</string>
<string name="msg_google_shopper_missing">Nie je nainštalovaný Google Shopper.</string> <string name="msg_google_shopper_missing">Nie je nainštalovaný Google Shopper.</string>
<string name="msg_install_google_shopper">Google Shopper kombinuje v sebe skenovanie čiarových kódov s miestnymi cenami on-line, recenzie a oveľa viac bez otvorenia prehliadača. Chceli by ste ho vyskúšať?</string> <string name="msg_install_google_shopper">Google Shopper kombinuje v sebe skenovanie čiarových kódov s miestnymi cenami on-line, recenzie a oveľa viac bez otvorenia prehliadača. Chceli by ste ho vyskúšať?</string>
<string name="msg_intent_failed">Ospravedlňujeme sa, požadovanú aplikáciu nemohla byť spustená. Obsah čiarového kódu je možno neplatný.</string> <string name="msg_intent_failed">Ospravedlňujeme sa, požadovanú aplikáciu nemohla byť spustená. Obsah čiarového kódu je možno neplatný.</string>

View file

@ -74,6 +74,8 @@
<string name="msg_default_type">Tip</string> <string name="msg_default_type">Tip</string>
<string name="msg_encode_barcode_failed">Ni bilo mogoče generirati željene črtne kode</string> <string name="msg_encode_barcode_failed">Ni bilo mogoče generirati željene črtne kode</string>
<string name="msg_encode_contents_failed">Ni bilo mogoče narediti črtne kode iz podanih podatkov</string> <string name="msg_encode_contents_failed">Ni bilo mogoče narediti črtne kode iz podanih podatkov</string>
<string name="msg_google_books">Google Books</string>
<string name="msg_google_product">Google Product Search</string>
<string name="msg_google_shopper_missing">Google Shopper ni nameščen</string> <string name="msg_google_shopper_missing">Google Shopper ni nameščen</string>
<string name="msg_install_google_shopper">Google Shopper kombinira branje črtnih kod s cenami lokalnih ter spletnih trgovin, ocenami izdelkov in več brez odpiranja spletnega brskalnika. Ga želite preizkusiti?</string> <string name="msg_install_google_shopper">Google Shopper kombinira branje črtnih kod s cenami lokalnih ter spletnih trgovin, ocenami izdelkov in več brez odpiranja spletnega brskalnika. Ga želite preizkusiti?</string>
<string name="msg_intent_failed">Oprostite, zahtevana aplikacija se ne more zagnati. Lahko da gre za napačno vsebino črtne kode.</string> <string name="msg_intent_failed">Oprostite, zahtevana aplikacija se ne more zagnati. Lahko da gre za napačno vsebino črtne kode.</string>

View file

@ -74,6 +74,8 @@
<string name="msg_default_type">Typ</string> <string name="msg_default_type">Typ</string>
<string name="msg_encode_barcode_failed">Misslyckades med att skapa den önskade streckkoden.</string> <string name="msg_encode_barcode_failed">Misslyckades med att skapa den önskade streckkoden.</string>
<string name="msg_encode_contents_failed">Kunde inte skape en streckkod från de givna uppgifterna.</string> <string name="msg_encode_contents_failed">Kunde inte skape en streckkod från de givna uppgifterna.</string>
<string name="msg_google_books">Google Books</string>
<string name="msg_google_product">Google Product Search</string>
<string name="msg_google_shopper_missing">Google Shopper är inte installerat</string> <string name="msg_google_shopper_missing">Google Shopper är inte installerat</string>
<string name="msg_install_google_shopper">Google Shopper kombinerar barcode scanning med priser, recensioner och mer utan att öppna webbläsaren. Vill du prova det?</string> <string name="msg_install_google_shopper">Google Shopper kombinerar barcode scanning med priser, recensioner och mer utan att öppna webbläsaren. Vill du prova det?</string>
<string name="msg_intent_failed">Tyvärr, den önskade applikationen kunde inte startas. Streckkodens innehåll kanske är ogiltigt.</string> <string name="msg_intent_failed">Tyvärr, den önskade applikationen kunde inte startas. Streckkodens innehåll kanske är ogiltigt.</string>

View file

@ -74,6 +74,8 @@
<string name="msg_default_type">Tür</string> <string name="msg_default_type">Tür</string>
<string name="msg_encode_barcode_failed">İstenen barkod oluşturulamadı.</string> <string name="msg_encode_barcode_failed">İstenen barkod oluşturulamadı.</string>
<string name="msg_encode_contents_failed">Sağlanan verilerden bir barkod kodlanamadı.</string> <string name="msg_encode_contents_failed">Sağlanan verilerden bir barkod kodlanamadı.</string>
<string name="msg_google_books">Google Kitap Arama</string>
<string name="msg_google_product">Google Ürün Arama</string>
<string name="msg_google_shopper_missing">Google Shopper yüklü değil</string> <string name="msg_google_shopper_missing">Google Shopper yüklü değil</string>
<string name="msg_install_google_shopper">Google Shopper, tarayıcıyı açmanıza gerek kalmadan barkod taraması, çevrimiçi ve yerel fiyatlar ile gözden geçirme ve diğer özellikten yararlanmanızı sağlar. Denemek ister misiniz?</string> <string name="msg_install_google_shopper">Google Shopper, tarayıcıyı açmanıza gerek kalmadan barkod taraması, çevrimiçi ve yerel fiyatlar ile gözden geçirme ve diğer özellikten yararlanmanızı sağlar. Denemek ister misiniz?</string>
<string name="msg_intent_failed">Üzgünüz, istenen uygulama başlatılamadı. Barkod içeriği geçersiz olabilir.</string> <string name="msg_intent_failed">Üzgünüz, istenen uygulama başlatılamadı. Barkod içeriği geçersiz olabilir.</string>

View file

@ -74,6 +74,8 @@
<string name="msg_default_type">类型</string> <string name="msg_default_type">类型</string>
<string name="msg_encode_barcode_failed">无法生成条码。</string> <string name="msg_encode_barcode_failed">无法生成条码。</string>
<string name="msg_encode_contents_failed">无法根据已有数据生成条码。 </string> <string name="msg_encode_contents_failed">无法根据已有数据生成条码。 </string>
<string name="msg_google_books">谷歌图书</string>
<string name="msg_google_product">谷歌购物</string>
<string name="msg_google_shopper_missing">谷歌购物未安装</string> <string name="msg_google_shopper_missing">谷歌购物未安装</string>
<string name="msg_install_google_shopper">谷歌购物是一款将条码扫描和商品比价相结合的应用,谷歌购物不使用浏览器,您想尝试吗?</string> <string name="msg_install_google_shopper">谷歌购物是一款将条码扫描和商品比价相结合的应用,谷歌购物不使用浏览器,您想尝试吗?</string>
<string name="msg_intent_failed">抱歉,无法打开所需软件。 条码内容可能无效。</string> <string name="msg_intent_failed">抱歉,无法打开所需软件。 条码内容可能无效。</string>

View file

@ -74,6 +74,8 @@
<string name="msg_default_type">類型</string> <string name="msg_default_type">類型</string>
<string name="msg_encode_barcode_failed">找不到條碼。</string> <string name="msg_encode_barcode_failed">找不到條碼。</string>
<string name="msg_encode_contents_failed">無法讀取條碼。 </string> <string name="msg_encode_contents_failed">無法讀取條碼。 </string>
<string name="msg_google_books">谷歌圖書</string>
<string name="msg_google_product">谷歌產品搜索</string>
<string name="msg_google_shopper_missing">未安裝谷歌購物</string> <string name="msg_google_shopper_missing">未安裝谷歌購物</string>
<string name="msg_install_google_shopper">谷歌購物結合條碼掃描價格,評論,更無需打開瀏覽器。您想試用嗎?</string> <string name="msg_install_google_shopper">谷歌購物結合條碼掃描價格,評論,更無需打開瀏覽器。您想試用嗎?</string>
<string name="msg_intent_failed">抱歉,無法打開所需軟體。 條碼內容可能無效。</string> <string name="msg_intent_failed">抱歉,無法打開所需軟體。 條碼內容可能無效。</string>

View file

@ -74,6 +74,8 @@
<string name="msg_default_type">Type</string> <string name="msg_default_type">Type</string>
<string name="msg_encode_barcode_failed">Could not generate the requested barcode.</string> <string name="msg_encode_barcode_failed">Could not generate the requested barcode.</string>
<string name="msg_encode_contents_failed">Could not encode a barcode from the data provided.</string> <string name="msg_encode_contents_failed">Could not encode a barcode from the data provided.</string>
<string name="msg_google_books">Google Books</string>
<string name="msg_google_product">Google Product Search</string>
<string name="msg_google_shopper_missing">Google Shopper is not installed</string> <string name="msg_google_shopper_missing">Google Shopper is not installed</string>
<string name="msg_install_google_shopper">Google Shopper combines barcode scanning with online and local prices, reviews and more without opening the browser. Would you like to try it?</string> <string name="msg_install_google_shopper">Google Shopper combines barcode scanning with online and local prices, reviews and more without opening the browser. Would you like to try it?</string>
<string name="msg_intent_failed">Sorry, the requested application could not be launched. The barcode contents may be invalid.</string> <string name="msg_intent_failed">Sorry, the requested application could not be launched. The barcode contents may be invalid.</string>

View file

@ -0,0 +1,126 @@
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.zxing.client.android.result.supplement;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import android.content.Context;
import android.widget.TextView;
import com.google.zxing.client.android.LocaleManager;
import com.google.zxing.client.android.R;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONTokener;
import android.os.Handler;
import com.google.zxing.client.android.history.HistoryManager;
/**
* @author kamilkaczm
* @author Sean Owen
*/
public final class BookResultInfoRetriever extends SupplementalInfoRetriever {
private static final String BASE_BOOK_URI =
"http://www.google." + LocaleManager.getBookSearchCountryTLD() + "/search?tbm=bks&source=zxing&q=";
private final String isbn;
private final String source;
BookResultInfoRetriever(TextView textView,
String isbn,
Handler handler,
HistoryManager historyManager,
Context context) {
super(textView, handler, historyManager);
this.isbn = isbn;
this.source = context.getString(R.string.msg_google_books);
}
@Override
void retrieveSupplementalInfo() throws IOException, InterruptedException {
String contents = downloadViaHttp("https://www.googleapis.com/books/v1/volumes?q=isbn:" + isbn);
if (contents.length() == 0) {
return;
}
String title;
String pages;
Collection<String> authors;
try {
JSONObject topLevel = (JSONObject) new JSONTokener(contents).nextValue();
JSONArray items = topLevel.optJSONArray("items");
if (items == null || items.isNull(0)) {
return;
}
JSONObject volumeInfo = ((JSONObject) items.get(0)).getJSONObject("volumeInfo");
if (volumeInfo == null) {
return;
}
title = volumeInfo.optString("title");
pages = volumeInfo.optString("pageCount");
authors = new ArrayList<String>();
JSONArray authorsArray = volumeInfo.optJSONArray("authors");
if (authorsArray != null && !authorsArray.isNull(0)) {
for (int i = 0; i < authorsArray.length(); i++) {
authors.add(authorsArray.getString(i));
}
}
} catch (JSONException e) {
throw new IOException(e.toString());
}
Collection<String> newTexts = new ArrayList<String>();
if (title != null && title.length() > 0) {
newTexts.add(title);
}
if (authors != null && !authors.isEmpty()) {
boolean first = true;
StringBuilder authorsText = new StringBuilder();
for (String author : authors) {
if (first) {
first = false;
} else {
authorsText.append(", ");
}
authorsText.append(author);
}
newTexts.add(authorsText.toString());
}
if (pages != null && pages.length() > 0) {
newTexts.add(pages + "pp.");
}
append(isbn, source, newTexts.toArray(new String[newTexts.size()]), BASE_BOOK_URI + isbn);
}
}

View file

@ -18,28 +18,18 @@ package com.google.zxing.client.android.result.supplement;
import android.content.Context; import android.content.Context;
import android.os.Handler; import android.os.Handler;
import android.util.Log;
import android.widget.TextView; import android.widget.TextView;
import com.google.zxing.client.android.R;
import com.google.zxing.client.android.history.HistoryManager; import com.google.zxing.client.android.history.HistoryManager;
import com.google.zxing.client.android.AndroidHttpClient;
import com.google.zxing.client.android.LocaleManager; import com.google.zxing.client.android.LocaleManager;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpUriRequest;
import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
final class ProductResultInfoRetriever extends SupplementalInfoRetriever { final class ProductResultInfoRetriever extends SupplementalInfoRetriever {
private static final String TAG = ProductResultInfoRetriever.class.getSimpleName();
private static final String BASE_PRODUCT_URI = private static final String BASE_PRODUCT_URI =
"http://www.google." + LocaleManager.getProductSearchCountryTLD() + "http://www.google." + LocaleManager.getProductSearchCountryTLD() +
"/m/products?ie=utf8&oe=utf8&scoring=p&source=zxing&q="; "/m/products?ie=utf8&oe=utf8&scoring=p&source=zxing&q=";
@ -48,14 +38,16 @@ final class ProductResultInfoRetriever extends SupplementalInfoRetriever {
private final String productID; private final String productID;
private final String source;
ProductResultInfoRetriever(TextView textView, ProductResultInfoRetriever(TextView textView,
String productID, String productID,
Handler handler, Handler handler,
HistoryManager historyManager, HistoryManager historyManager,
Context context) { Context context) {
super(textView, handler, historyManager, context); super(textView, handler, historyManager);
this.productID = productID; this.productID = productID;
this.source = context.getString(R.string.msg_google_product);
} }
@Override @Override
@ -63,52 +55,11 @@ final class ProductResultInfoRetriever extends SupplementalInfoRetriever {
String encodedProductID = URLEncoder.encode(productID, "UTF-8"); String encodedProductID = URLEncoder.encode(productID, "UTF-8");
String uri = BASE_PRODUCT_URI + encodedProductID; String uri = BASE_PRODUCT_URI + encodedProductID;
String content = downloadViaHttp(uri);
HttpUriRequest head = new HttpGet(uri);
AndroidHttpClient client = AndroidHttpClient.newInstance(null);
HttpResponse response = client.execute(head);
int status = response.getStatusLine().getStatusCode();
if (status != 200) {
return;
}
String content = consume(response.getEntity());
Matcher matcher = PRODUCT_NAME_PRICE_PATTERN.matcher(content); Matcher matcher = PRODUCT_NAME_PRICE_PATTERN.matcher(content);
if (matcher.find()) { if (matcher.find()) {
String details = matcher.group(1) + ' ' + matcher.group(2); append(productID, source, new String[] { matcher.group(1), matcher.group(2) }, uri);
append(productID, details);
}
setLink(uri);
}
private static String consume(HttpEntity entity) {
Log.d(TAG, "Consuming entity");
ByteArrayOutputStream out = new ByteArrayOutputStream();
InputStream in = null;
try {
in = entity.getContent();
byte[] buffer = new byte[1024];
int bytesRead;
while ((bytesRead = in.read(buffer)) > 0) {
out.write(buffer, 0, bytesRead);
}
} catch (IOException ioe) {
Log.w(TAG, ioe);
// continue
} finally {
if (in != null) {
try {
in.close();
} catch (IOException ioe) {
// continue
}
}
}
try {
return new String(out.toByteArray(), "UTF-8");
} catch (UnsupportedEncodingException uee) {
// can't happen
throw new IllegalStateException(uee);
} }
} }

View file

@ -17,20 +17,31 @@
package com.google.zxing.client.android.result.supplement; package com.google.zxing.client.android.result.supplement;
import android.content.Context; import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Handler; import android.os.Handler;
import android.text.Html; import android.text.Spannable;
import android.view.View; import android.text.SpannableString;
import android.text.Spanned;
import android.text.method.LinkMovementMethod;
import android.text.style.URLSpan;
import android.widget.TextView; import android.widget.TextView;
import com.google.zxing.client.android.AndroidHttpClient;
import com.google.zxing.client.result.ISBNParsedResult; import com.google.zxing.client.result.ISBNParsedResult;
import com.google.zxing.client.result.ParsedResult; import com.google.zxing.client.result.ParsedResult;
import com.google.zxing.client.result.ProductParsedResult; import com.google.zxing.client.result.ProductParsedResult;
import com.google.zxing.client.result.URIParsedResult; import com.google.zxing.client.result.URIParsedResult;
import com.google.zxing.client.android.history.HistoryManager; import com.google.zxing.client.android.history.HistoryManager;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpUriRequest;
import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.lang.ref.WeakReference; import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Collection;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
@ -60,23 +71,21 @@ public abstract class SupplementalInfoRetriever implements Callable<Void> {
Handler handler, Handler handler,
HistoryManager historyManager, HistoryManager historyManager,
Context context) { Context context) {
SupplementalInfoRetriever retriever = null;
Collection<SupplementalInfoRetriever> retrievers = new ArrayList<SupplementalInfoRetriever>(1);
if (result instanceof URIParsedResult) { if (result instanceof URIParsedResult) {
retriever = new URIResultInfoRetriever(textView, (URIParsedResult) result, handler, historyManager, context); retrievers.add(new URIResultInfoRetriever(textView, (URIParsedResult) result, handler, historyManager, context));
} else if (result instanceof ProductParsedResult) { } else if (result instanceof ProductParsedResult) {
retriever = new ProductResultInfoRetriever(textView, String productID = ((ProductParsedResult) result).getProductID();
((ProductParsedResult) result).getProductID(), retrievers.add(new ProductResultInfoRetriever(textView, productID, handler, historyManager, context));
handler,
historyManager,
context);
} else if (result instanceof ISBNParsedResult) { } else if (result instanceof ISBNParsedResult) {
retriever = new ProductResultInfoRetriever(textView, String isbn = ((ISBNParsedResult) result).getISBN();
((ISBNParsedResult) result).getISBN(), retrievers.add(new ProductResultInfoRetriever(textView, isbn, handler, historyManager, context));
handler, retrievers.add(new BookResultInfoRetriever(textView, isbn, handler, historyManager, context));
historyManager,
context);
} }
if (retriever != null) {
for (SupplementalInfoRetriever retriever : retrievers) {
ExecutorService executor = getExecutorService(); ExecutorService executor = getExecutorService();
Future<?> future = executor.submit(retriever); Future<?> future = executor.submit(retriever);
// Make sure it's interrupted after a short time though // Make sure it's interrupted after a short time though
@ -86,13 +95,11 @@ public abstract class SupplementalInfoRetriever implements Callable<Void> {
private final WeakReference<TextView> textViewRef; private final WeakReference<TextView> textViewRef;
private final Handler handler; private final Handler handler;
private final Context context;
private final HistoryManager historyManager; private final HistoryManager historyManager;
SupplementalInfoRetriever(TextView textView, Handler handler, HistoryManager historyManager, Context context) { SupplementalInfoRetriever(TextView textView, Handler handler, HistoryManager historyManager) {
this.textViewRef = new WeakReference<TextView>(textView); this.textViewRef = new WeakReference<TextView>(textView);
this.handler = handler; this.handler = handler;
this.context = context;
this.historyManager = historyManager; this.historyManager = historyManager;
} }
@ -103,28 +110,90 @@ public abstract class SupplementalInfoRetriever implements Callable<Void> {
abstract void retrieveSupplementalInfo() throws IOException, InterruptedException; abstract void retrieveSupplementalInfo() throws IOException, InterruptedException;
final void append(String itemID, final String newText) throws InterruptedException { final void append(String itemID, String source, String[] newTexts, String linkURL) throws InterruptedException {
final TextView textView = textViewRef.get(); final TextView textView = textViewRef.get();
if (textView == null) { if (textView == null) {
throw new InterruptedException(); throw new InterruptedException();
} }
StringBuilder newTextCombined = new StringBuilder();
if (source != null) {
newTextCombined.append(source).append('\n');
}
int spanStart = newTextCombined.length();
boolean first = true;
for (String newText : newTexts) {
if (first) {
newTextCombined.append(newText);
first = false;
} else {
newTextCombined.append(" [");
newTextCombined.append(newText);
newTextCombined.append(']');
}
}
int spanEnd = newTextCombined.length();
newTextCombined.append("\n\n");
String newText = newTextCombined.toString();
final Spannable content = new SpannableString(newText);
if (linkURL != null) {
content.setSpan(new URLSpan(linkURL), spanStart, spanEnd, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
}
handler.post(new Runnable() { handler.post(new Runnable() {
public void run() { public void run() {
textView.append(Html.fromHtml(newText + '\n')); textView.append(content);
textView.setMovementMethod(LinkMovementMethod.getInstance());
} }
}); });
// Add the text to the history. // Add the text to the history.
historyManager.addHistoryItemDetails(itemID, newText); historyManager.addHistoryItemDetails(itemID, newText);
} }
final void setLink(final String uri) { protected static String downloadViaHttp(String uri) throws IOException {
textViewRef.get().setOnClickListener(new View.OnClickListener() { HttpUriRequest get = new HttpGet(uri);
public void onClick(View view) { AndroidHttpClient client = AndroidHttpClient.newInstance(null);
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri)); HttpResponse response = client.execute(get);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); int status = response.getStatusLine().getStatusCode();
context.startActivity(intent); if (status != 200) {
throw new IOException();
}
return consume(response.getEntity());
}
private static String consume(HttpEntity entity) throws IOException {
ByteArrayOutputStream out = new ByteArrayOutputStream();
InputStream in = null;
try {
in = entity.getContent();
byte[] buffer = new byte[1024];
int bytesRead;
while ((bytesRead = in.read(buffer)) > 0) {
out.write(buffer, 0, bytesRead);
} }
}); } finally {
if (in != null) {
try {
in.close();
} catch (IOException ioe) {
// continue
}
}
}
try {
return new String(out.toByteArray(), "UTF-8");
} catch (UnsupportedEncodingException uee) {
// can't happen
throw new IllegalStateException(uee);
}
} }
} }

View file

@ -48,7 +48,7 @@ final class URIResultInfoRetriever extends SupplementalInfoRetriever {
Handler handler, Handler handler,
HistoryManager historyManager, HistoryManager historyManager,
Context context) { Context context) {
super(textView, handler, historyManager, context); super(textView, handler, historyManager);
redirectString = context.getString(R.string.msg_redirect); redirectString = context.getString(R.string.msg_redirect);
this.result = result; this.result = result;
} }
@ -59,12 +59,11 @@ final class URIResultInfoRetriever extends SupplementalInfoRetriever {
String newURI = unredirect(oldURI); String newURI = unredirect(oldURI);
int count = 0; int count = 0;
while (count < 3 && !oldURI.equals(newURI)) { while (count < 3 && !oldURI.equals(newURI)) {
append(result.getDisplayResult(), redirectString + " : " + newURI); append(result.getDisplayResult(), null, new String[] { redirectString + " : " + newURI }, newURI);
count++; count++;
oldURI = newURI; oldURI = newURI;
newURI = unredirect(newURI); newURI = unredirect(newURI);
} }
setLink(newURI);
} }
private static String unredirect(String uri) throws IOException { private static String unredirect(String uri) throws IOException {