lib/mobileesp.rb
def detect_mobile_long
      return true if detect_mobile_quick || detect_game_console || detect_sony_mylo

      # detect older phones from certain manufacturers and operators.
      ( !@user_agent.index(UPLINK).nil? ||
        !@user_agent.index(MANU_SONY_ERICSSON).nil? ||
        !@user_agent.index(MANUERICSSON).nil? ||
        !@user_agent.index(MANU_SAMSUNG1).nil? ||
        !@user_agent.index(SVC_DOCOMO).nil? ||
        !@user_agent.index(SVC_KDDI).nil? ||
        !@user_agent.index(SVC_VODAFONE).nil? )
    end
# The longer and more thorough way to detect for a mobile device.
#   Will probably detect most feature phones,
#   smartphone-class devices, Internet Tablets,
#   Internet-enabled game consoles, etc.
#   This ought to catch a lot of the more obscure and older devices, also --
#   but no promises on thoroughness!
The longer and more thorough way to detect for a mobile device.
Will probably detect most feature phones,
smartphone-class devices, Internet Tablets,
Internet-enabled game consoles, etc.
This ought to catch a lot of the more obscure and older devices, also
but no promises on thoroughness!
The longer and more thorough way to detect for a mobile device . Will probably detect most feature phones smartphone - class devices Internet Tablets Internet - enabled game consoles etc . This ought to catch a lot of the more obscure and older devices also but no promises on thoroughness!
def detect_mobile_long
      return true if detect_mobile_quick || detect_game_console || detect_sony_mylo
      ( !@user_agent.index(UPLINK).nil? ||
        !@user_agent.index(MANU_SONY_ERICSSON).nil? ||
        !@user_agent.index(MANUERICSSON).nil? ||
        !@user_agent.index(MANU_SAMSUNG1).nil? ||
        !@user_agent.index(SVC_DOCOMO).nil? ||
        !@user_agent.index(SVC_KDDI).nil? ||
        !@user_agent.index(SVC_VODAFONE).nil? )
    end
def detect_mobile_long return true if detect_mobile_quick || detect_game_console || detect_sony_mylo ( ! @user_agent . index ( UPLINK ) . nil? || ! @user_agent . index ( MANU_SONY_ERICSSON ) . nil? || ! @user_agent . index ( MANUERICSSON ) . nil? || ! @user_agent . index ( MANU_SAMSUNG1 ) . nil? || ! @user_agent . index ( SVC_DOCOMO ) . nil? || ! @user_agent . index ( SVC_KDDI ) . nil? || ! @user_agent . index ( SVC_VODAFONE ) . nil? ) end
The longer and more thorough way to detect for a mobile device.
The longer and more thorough way to detect for a mobile device .
# detect older phones from certain manufacturers and operators.