function hook_determine_device_capability in Mobile Tools 6.2
Determine device capabilities.
This hook can be used to implement custom device capability detection. Custom detection methods will be displayed and made selectable on the Mobile Tools administration page.
2 invocations of hook_determine_device_capability()
- mobile_tools_devicecapability in ./
mobile_tools.module - Inspect a certain capability of the current user agent.
- mobile_tools_external_modules_configuration_form in ./
mobile_tools.admin.inc - Configuration of external modules
File
- ./
mobile_tools.api.php, line 88 - Hooks provided by the Mobile Tools module.
Code
function hook_determine_device_capability($capability) {
// Implement some sort of algorithm to determine the device's support for the
// requested capability
$device_properties = custom_detection_algorithm();
// Return the value of the device's capability
return $device_properties[$capability];
}