Hoi Klaus,

on mouseUp

if the environment is "mobile" then
   mobileVibrate 3
   end if
end mouseUp

the vibrate has nothing to do with the barcode reader.

But it could be a Rights issue, you can check if the app has rights to use the vibration, requsting these are also in the dictionary



Op 16-4-2021 om 13:58 schreef Klaus major-k via use-livecode:
Hi all,

a problem with the barcode sacanner on Android.
I have this script:
---------------------------------------------
on barcodeDetected pBarcode, pID
    put pBarcode["raw value"] into tBarCode
## It definitively works
    answer tBarCode
## This works, too, fetch data from a good ol' lookup table:
    put tierinfo(tBarCode) into tData
    answer tData

    ## So tData is NOT empty, just a TAB delimited line of text
    if tData = EMPTY then
       exit to top
    end if
## The rest is never executed :-/
    mobileVibrate 1
lock screen
    set itemdel to TAB
    set the icon of btn "bild" of grp "tierinfo" to item 3 of tData
    put item 5 of tData into fld "name" of grp "tierinfo2"

    ## Hide the widget
    hide widget "barcoder"

    ## Show button "scan again"
    show button "neuscannen"
    put item 5 of tData into tSound
    unlock screen
    if the environment = "mobile" then
       play (specialfolderpath("resources") & "/" & tSound)
    end if
end barcodeDetected
------------------------------------------------------
However it does not vibrate nor is the rest of the script is being executed.
What am I missing?

Thanks for any hint.


Best

Klaus
--
Klaus Major
https://www.major-k.de
https://www.major-k.de/bass
kl...@major-k.de


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to