Cozy Device Helper¶
This library allows to know more information about the device platform
API¶
Platforms¶
import { isFlagshipApp, isMobile, isAndroid, isIOS } from 'cozy-device-helper'
To know the platform:
isFlagshipApp()
: returnboolean
if inside the flagship app.isFlagshipOfflineSupported()
: returnboolean
if offline supported by the flagship app.getFlagshipMetadata()
: returnobject
corresponding to flagship metadata.isAndroid()
: returnboolean
(check if the user is on an android smartphone (native & browser))isIOS()
: returnboolean
(check if the user is on an iOS smartphone (native & browser))isMobile()
: returnboolean
(check if the user is on an android or iOS smartphone (native & browser))