Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/valicm/universal_device_detection
https://github.com/valicm/universal_device_detection
device-detection drupal drupal-8 drupal-module
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/valicm/universal_device_detection
- Owner: valicm
- Created: 2019-05-16T11:28:51.000Z (over 5 years ago)
- Default Branch: 2.0.x
- Last Pushed: 2024-10-15T11:08:12.000Z (4 months ago)
- Last Synced: 2024-12-23T06:19:21.369Z (about 2 months ago)
- Topics: device-detection, drupal, drupal-8, drupal-module
- Language: PHP
- Size: 8.79 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
CONTENTS OF THIS FILE
---------------------* Introduction
* Requirements
* Installation
* Configuration
* Usage
* MaintainersINTRODUCTION
------------Drupal 8 module providing service for device detection using
device detector library.
https://github.com/matomo-org/device-detectorThe Universal Device Detection library that parses User Agents and detects
devices (desktop, tablet, mobile, tv, cars, console, etc.),
clients (browsers, feed readers, media players, PIMs, ...),
operating systems, brands and models.REQUIREMENTS
------------Device detector PHP library https://github.com/matomo-org/device-detector
INSTALLATION
------------Install the Universal Device Detection module as you would normally install
any Drupal contrib module.
Visit https://www.drupal.org/node/1897420 for further information.CONFIGURATION
--------------None
USAGE
--------------This module does not do anything out of the box, just provide service which you
can use in your code.`\Drupal::service('universal_device_detection.default')->detect();`
If you want process bots as normal devices:
`\Drupal::service('universal_device_detection.default')->detect(FALSE);`Example of response
```array (
'type' => 'desktop',
'info' =>
array (
'client' =>
array (
'type' => 'browser',
'name' => 'Chromium',
'short_name' => 'CR',
'version' => '73.0',
'engine' => 'Blink',
'engine_version' => '',
),
'os' =>
array (
'name' => 'Ubuntu',
'short_name' => 'UBT',
'version' => '',
'platform' => 'x64',
),
'brand' => '',
'model' => '',
),
)
```MAINTAINERS
-----------The 8.x-1.x branch was created by:
* Valentino Medimorec (valic) - https://www.drupal.org/u/valic
This module was created and sponsored by Foreo,
Swedish multi-national beauty brand.* Foreo - https://www.foreo.com/