1. Ce site utilise des cookies. En continuant à utiliser ce site, vous acceptez l'utilisation des cookies. En savoir plus.
  2. Bonjour tout le monde ! Veillez consulter la Politique de forum pour comprendre nos règles, Merci a vous !
    Rejeter la notice

WM Champ Caméra pour lecture des codes Barres android

Discussion dans 'Windev Mobile' créé par LAPIPE2018, Sept 8, 2019.

  1. LAPIPE2018

    LAPIPE2018 Active Member
    MEMBRE WX

    Inscrit:
    Fev 17, 2018
    Messages:
    648
    J'aime reçus:
    227
    Bonsoir,
    Dans le champ Caméra pour lire le code
    il y a l'évènement décodage code barre
    il avec le code
    Code (Text):
    PROCÉDURE DécodeCodeBarre(cb est un CodeBarres)
    SAI_SansNom1=cb.ValeurBrute
     
    COmment faire. SVp, je cherche un exemple qui marche. Je trouve CBacpture lourd pour Android.
    Merci
     
    Tags:
  2. C0mrade

    C0mrade Member

    Inscrit:
    Juil 25, 2019
    Messages:
    32
    J'aime reçus:
    7
    H
    you're actually on the right track.
    Read the contents of the QR Code / Bar Code at the "decodage of a bar code" event.
    All you have to do is display the result code.
    There is nothing more.
    windev decodes in string for you.
    This is (for guide and example) my decode part:

    [windev]
    PROCÉDURE DécodeCodeBarre(_barCode est un CodeBarres)
    i is int = 0
    _ScanNumIscr,_ScanGUIDAss,_ScanNomin is string
    _TerminalType is int

    FOR ALL STRING _currentStr OF _barCode.Content SEPARATED BY ";"
    i++
    SWITCH i
    CASE 1
    _ScanGUIDAss = _currentStr
    CASE 2
    _ScanNumIscr = _currentStr
    CASE 3
    _ScanNomin = _currentStr
    CASE 4
    _TerminalType = _currentStr
    END
    END

    <COMPILE SI TypeConfiguration=Android>
    VibrationTrigger(1000)
    <FIN>
    <COMPILE SI TypeConfiguration=iOS>
    VibrationTrigger()
    <FIN>

    _Obj_Scan.Nominativo = _ScanNomin
    _Obj_Scan.NumIscriz = _ScanNumIscr
    _Obj_Scan.GUIDAssociato = _ScanGUIDAss

    IF _TerminalType > 0 THEN
    _Obj_Scan.TerminalType = _TerminalType
    INT_InviaNotifica = True
    INT_InviaNotifica..State = Active
    ELSE
    INT_InviaNotifica = False
    INT_InviaNotifica..State = Grayed
    END

    IF _TerminalType > 0 THEN
    IF _TerminalType = 1 THEN
    STR_Codice = "Associato: "+ _ScanNomin + CR + "N. Iscrizione: " + _ScanNumIscr+ CR +"Terminale Android"
    ELSE IF _TerminalType = 2
    STR_Codice = "Associato: "+ _ScanNomin + CR + "N. Iscrizione: " + _ScanNumIscr+ CR +"Terminale iOS"
    END
    ELSE IF _TerminalType <= 0 THEN
    STR_Codice = "Associato: "+ _ScanNomin + CR + "N. Iscrizione: " + _ScanNumIscr+ CR +"WebScan/App v. 1"
    END
    [/windev]
     
    WX1331 et LAPIPE2018 aiment ça.
  3. LAPIPE2018

    LAPIPE2018 Active Member
    MEMBRE WX

    Inscrit:
    Fev 17, 2018
    Messages:
    648
    J'aime reçus:
    227

    Bonjour visiteur, Merci de vous Inscrire ou de vous connectez pour voir les liens!

    H
    you're actually on the right track.
    Read the contents of the QR Code / Bar Code at the "decodage of a bar code" event.
    All you have to do is display the result code.
    There is nothing more.
    windev decodes in string for you.
    This is (for guide and example) my decode part:

    [windev]
    PROCÉDURE DécodeCodeBarre(_barCode est un CodeBarres)
    i is int = 0
    _ScanNumIscr,_ScanGUIDAss,_ScanNomin is string
    _TerminalType is int

    FOR ALL STRING _currentStr OF _barCode.Content SEPARATED BY ";"
    i++
    SWITCH i
    CASE 1
    _ScanGUIDAss = _currentStr
    CASE 2
    _ScanNumIscr = _currentStr
    CASE 3
    _ScanNomin = _currentStr
    CASE 4
    _TerminalType = _currentStr
    END
    END

    <COMPILE SI TypeConfiguration=Android>
    VibrationTrigger(1000)
    <FIN>
    <COMPILE SI TypeConfiguration=iOS>
    VibrationTrigger()
    <FIN>

    _Obj_Scan.Nominativo = _ScanNomin
    _Obj_Scan.NumIscriz = _ScanNumIscr
    _Obj_Scan.GUIDAssociato = _ScanGUIDAss

    IF _TerminalType > 0 THEN
    _Obj_Scan.TerminalType = _TerminalType
    INT_InviaNotifica = True
    INT_InviaNotifica..State = Active
    ELSE
    INT_InviaNotifica = False
    INT_InviaNotifica..State = Grayed
    END

    IF _TerminalType > 0 THEN
    IF _TerminalType = 1 THEN
    STR_Codice = "Associato: "+ _ScanNomin + CR + "N. Iscrizione: " + _ScanNumIscr+ CR +"Terminale Android"
    ELSE IF _TerminalType = 2
    STR_Codice = "Associato: "+ _ScanNomin + CR + "N. Iscrizione: " + _ScanNumIscr+ CR +"Terminale iOS"
    END
    ELSE IF _TerminalType <= 0 THEN
    STR_Codice = "Associato: "+ _ScanNomin + CR + "N. Iscrizione: " + _ScanNumIscr+ CR +"WebScan/App v. 1"
    END
    [/windev]
    Cliquez pour agrandir...
    I was expecting the picture field to close autmaticaly. That is not the case. The think is who is suppose to close it ?
    Should I pour a Buton to close it ?
    Even the sample distribute by PCSOFT himself does not close. That's where I am confuse
     
  • LAPIPE2018

    LAPIPE2018 Active Member
    MEMBRE WX

    Inscrit:
    Fev 17, 2018
    Messages:
    648
    J'aime reçus:
    227

    Bonjour visiteur, Merci de vous Inscrire ou de vous connectez pour voir les liens!

    H
    you're actually on the right track.
    Read the contents of the QR Code / Bar Code at the "decodage of a bar code" event.
    All you have to do is display the result code.
    There is nothing more.
    windev decodes in string for you.
    This is (for guide and example) my decode part:

    [windev]
    PROCÉDURE DécodeCodeBarre(_barCode est un CodeBarres)
    i is int = 0
    _ScanNumIscr,_ScanGUIDAss,_ScanNomin is string
    _TerminalType is int

    FOR ALL STRING _currentStr OF _barCode.Content SEPARATED BY ";"
    i++
    SWITCH i
    CASE 1
    _ScanGUIDAss = _currentStr
    CASE 2
    _ScanNumIscr = _currentStr
    CASE 3
    _ScanNomin = _currentStr
    CASE 4
    _TerminalType = _currentStr
    END
    END

    <COMPILE SI TypeConfiguration=Android>
    VibrationTrigger(1000)
    <FIN>
    <COMPILE SI TypeConfiguration=iOS>
    VibrationTrigger()
    <FIN>

    _Obj_Scan.Nominativo = _ScanNomin
    _Obj_Scan.NumIscriz = _ScanNumIscr
    _Obj_Scan.GUIDAssociato = _ScanGUIDAss

    IF _TerminalType > 0 THEN
    _Obj_Scan.TerminalType = _TerminalType
    INT_InviaNotifica = True
    INT_InviaNotifica..State = Active
    ELSE
    INT_InviaNotifica = False
    INT_InviaNotifica..State = Grayed
    END

    IF _TerminalType > 0 THEN
    IF _TerminalType = 1 THEN
    STR_Codice = "Associato: "+ _ScanNomin + CR + "N. Iscrizione: " + _ScanNumIscr+ CR +"Terminale Android"
    ELSE IF _TerminalType = 2
    STR_Codice = "Associato: "+ _ScanNomin + CR + "N. Iscrizione: " + _ScanNumIscr+ CR +"Terminale iOS"
    END
    ELSE IF _TerminalType <= 0 THEN
    STR_Codice = "Associato: "+ _ScanNomin + CR + "N. Iscrizione: " + _ScanNumIscr+ CR +"WebScan/App v. 1"
    END
    [/windev]
    Cliquez pour agrandir...
    Hi,
    One more thing, what is _Obj_Scan ?
    Sorry, but I would like to share the project, so that you can test and see what to to.
     
  • C0mrade

    C0mrade Member

    Inscrit:
    Juil 25, 2019
    Messages:
    32
    J'aime reçus:
    7
    hi

    _Obj_Scan is my class for stored result.

    I have created for you example with the plan the QR Code.

    Bonjour visiteur, Merci de vous Inscrire ou de vous connectez pour voir les liens!

    (project)

    Bonjour visiteur, Merci de vous Inscrire ou de vous connectez pour voir les liens!

    (app apk)
     
    WX1331 et suenodesign aiment ça.
  • LAPIPE2018

    LAPIPE2018 Active Member
    MEMBRE WX

    Inscrit:
    Fev 17, 2018
    Messages:
    648
    J'aime reçus:
    227
    Hi,

    Bonjour visiteur, Merci de vous Inscrire ou de vous connectez pour voir les liens!

    hi

    _Obj_Scan is my class for stored result.

    I have created for you example with the plan the QR Code.

    Bonjour visiteur, Merci de vous Inscrire ou de vous connectez pour voir les liens!

    (project)

    Bonjour visiteur, Merci de vous Inscrire ou de vous connectez pour voir les liens!

    (app apk)
    Cliquez pour agrandir...
    Thx, let me test
     
  • C0mrade

    C0mrade Member

    Inscrit:
    Juil 25, 2019
    Messages:
    32
    J'aime reçus:
    7
    I hope I was helpful.
     
  • LAPIPE2018

    LAPIPE2018 Active Member
    MEMBRE WX

    Inscrit:
    Fev 17, 2018
    Messages:
    648
    J'aime reçus:
    227

    Bonjour visiteur, Merci de vous Inscrire ou de vous connectez pour voir les liens!

    hi

    _Obj_Scan is my class for stored result.

    I have created for you example with the plan the QR Code.

    Bonjour visiteur, Merci de vous Inscrire ou de vous connectez pour voir les liens!

    (project)

    Bonjour visiteur, Merci de vous Inscrire ou de vous connectez pour voir les liens!

    (app apk)
    Cliquez pour agrandir...
    It's OK for sample 1, 2 is not stable.
     
  • C0mrade

    C0mrade Member

    Inscrit:
    Juil 25, 2019
    Messages:
    32
    J'aime reçus:
    7
    I tried it on Android 9/8 and 4.4w and had no problems.
    With which version of the system are you testing?
    Consider that I wanted to pass on the methodology, the app is certainly not a build version :).
     
  • LAPIPE2018

    LAPIPE2018 Active Member
    MEMBRE WX

    Inscrit:
    Fev 17, 2018
    Messages:
    648
    J'aime reçus:
    227

    Bonjour visiteur, Merci de vous Inscrire ou de vous connectez pour voir les liens!

    I tried it on Android 9/8 and 4.4w and had no problems.
    With which version of the system are you testing?
    Consider that I wanted to pass on the methodology, the app is certainly not a build version :).
    Cliquez pour agrandir...
    Hi,
    I am still diagnocising
     
  • Man

    Man Active Member

    Inscrit:
    Juil 9, 2018
    Messages:
    290
    J'aime reçus:
    67

    Bonjour visiteur, Merci de vous Inscrire ou de vous connectez pour voir les liens!

    hi

    _Obj_Scan is my class for stored result.

    I have created for you example with the plan the QR Code.

    Bonjour visiteur, Merci de vous Inscrire ou de vous connectez pour voir les liens!

    (project)

    Bonjour visiteur, Merci de vous Inscrire ou de vous connectez pour voir les liens!

    (app apk)
    Cliquez pour agrandir...
    @cOmrade bsr
    Les fichiers joins ne sont plus dispo.
    Prière d réactiver ces liens Merci.
     

    Fichiers attachés:

  • C0mrade

    C0mrade Member

    Inscrit:
    Juil 25, 2019
    Messages:
    32
    J'aime reçus:
    7
    Ciao,

    This is the new link for project download:

    Bonjour visiteur, Merci de vous Inscrire ou de vous connectez pour voir les liens!

     
  • COMANJOU

    COMANJOU New Member

    Inscrit:
    Juil 30, 2019
    Messages:
    1
    J'aime reçus:
    1
    Bonjour à tous,

    Serait-il possible de réactiver les liens, s'il vous plaît.

    Sorry, would it be possible to activate one more time the links, please

    Bonne journée
    Have a good day

    Gilles
     
    WX1331 apprécie ceci.
  • RADOUANE999

    RADOUANE999 Member

    Inscrit:
    Mar 21, 2018
    Messages:
    66
    J'aime reçus:
    18
    bonjour
    si possible re-upload

    Bonjour visiteur, Merci de vous Inscrire ou de vous connectez pour voir les liens!


    merci
     
  • Pns

    Pns New Member

    Inscrit:
    Fev 15, 2024
    Messages:
    5
    J'aime reçus:
    0
    Bo

    Bonjour visiteur, Merci de vous Inscrire ou de vous connectez pour voir les liens!

    hi

    _Obj_Scan is my class for stored result.

    I have created for you example with the plan the QR Code.

    Bonjour visiteur, Merci de vous Inscrire ou de vous connectez pour voir les liens!

    (project)

    Bonjour visiteur, Merci de vous Inscrire ou de vous connectez pour voir les liens!

    (app apk)
    Cliquez pour agrandir...

    Bonjour visiteur, Merci de vous Inscrire ou de vous connectez pour voir les liens!

    bonjour
    si possible re-upload

    Bonjour visiteur, Merci de vous Inscrire ou de vous connectez pour voir les liens!


    merci
    Cliquez pour agrandir...
    Bonsoir je peux avoir un nouveau lien Merci
     
  • Partager cette page

    Chargement...