 # Format Expiry
 
 formatExpiry = (e) ->
+  target = e.target
   # Only format if input is a number
-  digit = String.fromCharCode(e.which)
-  return unless /^\d+$/.test(digit)
-
-  target = e.target
-  val     = QJ.val(target) + digit
-
-  if /^\d$/.test(val) and val not in ['0', '1']
+  if e.which > 0 
+    digit = String.fromCharCode(e.which);
+    val = QJ.val(target) + digit
+  else # android keycode not provided workaround
+    digit = e.data;
+    val = QJ.val(target)
+
+  return unless /^\d+$/.test(digit)
+
+  if /^\d$/.test(val) and val not in ['0', '1'] 
     e.preventDefault()
     QJ.val(target, "0#{val} / ")
     QJ.trigger(target, 'change')


formatCardNumber = (maxLength) -> (e) ->
  # Only format if input is a number
  digit = String.fromCharCode(e.which)
  return unless /^\d+$/.test(digit)

  target = e.target
  value   = QJ.val(target)
  card    = cardFromNumber(value + digit)
  length  = (value.replace(/\D/g, '') + digit).length

  upperLengths = [16]
  upperLengths = card.length if card

    QJ.on el, 'keydown', formatBackCardNumber
    QJ.on el, 'keyup blur', setCardType
    QJ.on el, 'paste', reFormatCardNumber
    QJ.on el, 'input', formatCardNumber(maxLength)
    el
  @getCardArray: -> return cards
  @setCardArray: (cardArray) ->
