mincu-core
Namespaces
Enumerations
Classes
Interfaces
- AppData
- Base_info
- Clipboard
- DeviceInfo
- EdgeInsets
- INativeFuncs
- NavConfig
- NetInfo
- RNLinking
- ShareConfig
- ToastAndroidStatic
- VibrationStatic
Type Aliases
ColorSchemeName
Ƭ ColorSchemeName: "light"
| "dark"
| null
| undefined
EventMap
Ƭ EventMap: Object
Index signature
▪ [key: number
]: { failed
: any
; success
: any
}
FuncNames
Ƭ FuncNames: keyof INativeFuncs
States
Ƭ States: Object
Type declaration
Name | Type |
---|---|
colorScheme | ColorSchemeName |
colors | any |
StatusBarStyle
Ƭ StatusBarStyle: "default"
| "light-content"
| "dark-content"
Functions
channelGenerator
▸ channelGenerator(eventMap
): void
Parameters
Name | Type |
---|---|
eventMap | EventMap |
Returns
void
Classes
Class: MincuCoreBase
目前支持 web 和 native 的双向通信
Constructors
constructor
• new MincuCoreBase(eventKey?
, eventMap?
)
Parameters
Name | Type |
---|---|
eventKey? | number |
eventMap? | EventMap |
Properties
call
• call: <Class, Method>(baseClass
: Class
, method
: Method
, params
: ParamType
<INativeFuncs
[Class
][Method
]>, success?
: (res?
: { data
: CallReturnType
<INativeFuncs
[Class
][Method
]> }) => any
, failed?
: (...args
: any
[]) => void
) => void
Type declaration
▸ <Class
, Method
>(baseClass
, method
, params
, success?
, failed?
): void
主动请求并触发客户端事件
Type parameters
Name | Type |
---|---|
Class | extends keyof INativeFuncs |
Method | extends string | number | symbol |
Parameters
Name | Type |
---|---|
baseClass | Class |
method | Method |
params | ParamType <INativeFuncs [Class ][Method ]> |
success? | (res? : { data : CallReturnType <INativeFuncs [Class ][Method ]> }) => any |
failed? | (...args : any []) => void |
Returns
void
callPromise
• callPromise: <Class, Method>(baseClass
: Class
, method
: Method
, params
: ParamType
<INativeFuncs
[Class
][Method
]>) => Promise
<CallReturnType
<INativeFuncs
[Class
][Method
]>>
Type declaration
▸ <Class
, Method
>(baseClass
, method
, params
): Promise
<CallReturnType
<INativeFuncs
[Class
][Method
]>>
Type parameters
Name | Type |
---|---|
Class | extends keyof INativeFuncs |
Method | extends string | number | symbol |
Parameters
Name | Type |
---|---|
baseClass | Class |
method | Method |
params | ParamType <INativeFuncs [Class ][Method ]> |
Returns
Promise
<CallReturnType
<INativeFuncs
[Class
][Method
]>>
eventKey
• Private
eventKey: any
eventMap
• Private
eventMap: any
initial
• initial: (resolve
: (value?
: unknown
) => any
, reject?
: (value?
: unknown
) => any
) => void
Type declaration
▸ (resolve
, reject?
): void
Parameters
Name | Type |
---|---|
resolve | (value? : unknown ) => any |
reject? | (value? : unknown ) => any |
Returns
void
listener
• listener: (eventName
: string
, fn
: (data
: any
) => any
) => EventEmitter
Type declaration
▸ (eventName
, fn
): EventEmitter
添加一个原生事件监听器
Parameters
Name | Type |
---|---|
eventName | string |
fn | (data : any ) => any |
Returns
EventEmitter
makeProxyFromNativeFunc
• makeProxyFromNativeFunc: <Class>(func
: Class
) => INativeFuncs
[Class
]
Type declaration
▸ <Class
>(func
): INativeFuncs
[Class
]
Return a proxy handle callPromise from INativeFuncs
Type parameters
Name | Type |
---|---|
Class | extends keyof INativeFuncs |
Parameters
Name | Type |
---|---|
func | Class |
Returns
INativeFuncs
[Class
]
once
• once: (eventName
: string
, fn
: (data
: any
) => any
) => EventEmitter
Type declaration
▸ (eventName
, fn
): EventEmitter
添加一个原生事件监听器 (监听一次后立即销毁)
Parameters
Name | Type |
---|---|
eventName | string |
fn | (data : any ) => any |
Returns
EventEmitter
remove
• remove: (eventName
: string
, fn
: (data
: any
) => any
) => void
Type declaration
▸ (eventName
, fn
): void
移除某个原生事件监听器
Parameters
Name | Type |
---|---|
eventName | string |
fn | (data : any ) => any |
Returns
void
Accessors
appData
• get
appData(): AppData
由 iNCU WebView 注入的来自 App 的数据
Returns
isApp
• get
isApp(): boolean
通过 userAgent 判断是否在 iNCU 环境 userAgent: iNCU.*
Returns
boolean
isReady
• get
isReady(): any
由 App 端注入的数据段,用以判断是否注入成功
Returns
any
messageChannel
• get
messageChannel(): EventEmitter
与 App 端通信的消息通道
Returns
EventEmitter
webview
• get
webview(): any
App 端的 Webview JavaScriptInterface,用以向 App 端发送信息
Returns
any
Enums
Enumeration: NetInfoCellularGeneration
Enumeration Members
2g
• 2g = "2g"
3g
• 3g = "3g"
4g
• 4g = "4g"
5g
• 5g = "5g"
Enumeration: NetInfoStateType
Enumeration Members
bluetooth
• bluetooth = "bluetooth"
cellular
• cellular = "cellular"
ethernet
• ethernet = "ethernet"
none
• none = "none"
other
• other = "other"
unknown
• unknown = "unknown"
vpn
• vpn = "vpn"
wifi
• wifi = "wifi"
wimax
• wimax = "wimax"
Modules
Namespace: Orientation
Functions
addOrientationListener
▸ addOrientationListener(callback
): void
Parameters
Name | Type |
---|---|
callback | (orientation : orientation ) => void |
Returns
void
addSpecificOrientationListener
▸ addSpecificOrientationListener(callback
): void
Parameters
Name | Type |
---|---|
callback | (specificOrientation : specificOrientation ) => void |
Returns
void
getInitialOrientation
▸ getInitialOrientation(): orientation
Returns
orientation
getOrientation
▸ getOrientation(callback
): void
Parameters
Name | Type |
---|---|
callback | (err : Error , orientation : orientation ) => void |
Returns
void
getSpecificOrientation
▸ getSpecificOrientation(callback
): void
Parameters
Name | Type |
---|---|
callback | (err : Error , orientation : specificOrientation ) => void |
Returns
void
lockToLandscape
▸ lockToLandscape(): void
Returns
void
lockToLandscapeLeft
▸ lockToLandscapeLeft(): void
Returns
void
lockToLandscapeRight
▸ lockToLandscapeRight(): void
Returns
void
lockToPortrait
▸ lockToPortrait(): void
Returns
void
removeOrientationListener
▸ removeOrientationListener(callback
): void
Parameters
Name | Type |
---|---|
callback | (orientation : orientation ) => void |
Returns
void
removeSpecificOrientationListener
▸ removeSpecificOrientationListener(callback
): void
Parameters
Name | Type |
---|---|
callback | (specificOrientation : specificOrientation ) => void |
Returns
void
unlockAllOrientations
▸ unlockAllOrientations(): void
Returns
void
Interfaces
Interface: AppData
Properties
user
• user: Object
Type declaration
Name | Type |
---|---|
colorScheme | ColorSchemeName |
colors | any |
inset | EdgeInsets |
profile | { basicProfile : { app_avatar_url : string ; department : string ; department_id : string ; head_pic_url : string ; max_role_level : number ; message : string ; name : string ; status : number } ; entireProfile : IEntireProfileResponse } |
profile.basicProfile | { app_avatar_url : string ; department : string ; department_id : string ; head_pic_url : string ; max_role_level : number ; message : string ; name : string ; status : number } |
profile.basicProfile.app_avatar_url | string |
profile.basicProfile.department | string |
profile.basicProfile.department_id | string |
profile.basicProfile.head_pic_url | string |
profile.basicProfile.max_role_level | number |
profile.basicProfile.message | string |
profile.basicProfile.name | string |
profile.basicProfile.status | number |
profile.entireProfile | IEntireProfileResponse |
token | string |
Interface: Base_info
Properties
csd
• csd: Csd
csrq
• csrq: string
dzyx
• dzyx: string
gb
• gb: Gb
jg
• jg: Jg
jhkh
• jhkh: string
mz
• mz: Mz
pyfs
• pyfs: Pyf
• qq: string
qsh
• qsh: string
rxny
• rxny: string
sfzh
• sfzh: string
xb
• xb: Xb
xh
• xh: string
xm
• xm: string
xslb
• xslb: Xslb
xx
• xx: Xx
yddh
• yddh: string
zzmm
• zzmm: Zzmm
Interface: Clipboard
Clipboard
gives you an interface for setting and getting content from Clipboard on both iOS and Android
Methods
addListener
▸ addListener(callback
): Object
(iOS and Android Only) Adds a listener to get notifications when the clipboard has changed. If this is the first listener, turns on clipboard notifications on the native side. It returns EmitterSubscription where you can call "remove" to remove listener
const listener = () => console.log("changed!");
Clipboard.addListener(listener);
Parameters
Name | Type |
---|---|
callback | () => void |
Returns
Object
Name | Type |
---|---|
remove | () => void |
getImage
▸ getImage(): Promise
<string
>
Returns
Promise
<string
>
getImageJPG
▸ getImageJPG(): Promise
<string
>
Get clipboard image as JPG in base64, this method returns a Promise
, so you can use following code to get clipboard content
async _getContent() \{
var content = await Clipboard.getImageJPG();
}
Returns
Promise
<string
>
getImagePNG
▸ getImagePNG(): Promise
<string
>
Get clipboard image as PNG in base64, this method returns a Promise
, so you can use following code to get clipboard content
async _getContent() \{
var content = await Clipboard.getImagePNG();
}
Returns
Promise
<string
>
getString
▸ getString(): Promise
<string
>
Get content of string type, this method returns a Promise
, so you can use following code to get clipboard content
async _getContent() \{
var content = await Clipboard.getString();
}
Returns
Promise
<string
>
hasImage
▸ hasImage(): any
Returns whether the clipboard has an image or is empty.
This method returns a Promise
, so you can use following code to check clipboard content
async _hasContent() \{
var hasContent = await Clipboard.hasImage();
}
Returns
any
hasNumber
▸ hasNumber(): any
(IOS 14+ Only)
Returns whether the clipboard has a Number(UIPasteboardDetectionPatternNumber) content. Can check
if there is a Number content in clipboard without triggering PasteBoard notification for iOS 14+
This method returns a Promise
, so you can use following code to check for Number content in clipboard.
async _hasNumber() \{
var hasNumber = await Clipboard.hasNumber();
}
Returns
any
hasString
▸ hasString(): any
Returns whether the clipboard has content or is empty.
This method returns a Promise
, so you can use following code to get clipboard content
async _hasContent() \{
var hasContent = await Clipboard.hasString();
}
Returns
any
hasURL
▸ hasURL(): any
(IOS Only)
Returns whether the clipboard has a URL content. Can check
if there is a URL content in clipboard without triggering PasteBoard notification for iOS 14+
This method returns a Promise
, so you can use following code to check for url content in clipboard.
async _hasURL() \{
var hasURL = await Clipboard.hasURL();
}
Returns
any
hasWebURL
▸ hasWebURL(): any
(IOS 14+ Only)
Returns whether the clipboard has a WebURL(UIPasteboardDetectionPatternProbableWebURL) content. Can check
if there is a WebURL content in clipboard without triggering PasteBoard notification for iOS 14+
This method returns a Promise
, so you can use following code to check for WebURL content in clipboard.
async _hasWebURL() \{
var hasWebURL = await Clipboard.hasWebURL();
}
Returns
any
removeAllListeners
▸ removeAllListeners(): void
(iOS and Android Only) Removes all previously registered listeners and turns off notifications on the native side.
Clipboard.removeAllListeners();
Returns
void
setImage
▸ setImage(content
): void
Set content of base64 image type. You can use following code to set clipboard content
_setContent() \{
Clipboard.setImage(...);
}
iOS only
Parameters
Name | Type |
---|---|
content | string |
Returns
void
setString
▸ setString(content
): void
Set content of string type. You can use following code to set clipboard content
_setContent() \{
Clipboard.setString('hello world');
}
Parameters
Name | Type |
---|---|
content | string |
Returns
void
Interface: DeviceInfo
Hierarchy
-
ExposedNativeMethods
↳
DeviceInfo
Properties
getAndroidId
• getAndroidId: () => Promise
<string
>
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Inherited from
ExposedNativeMethods.getAndroidId
getAndroidIdSync
• getAndroidIdSync: () => string
Type declaration
▸ (): string
Returns
string
Inherited from
ExposedNativeMethods.getAndroidIdSync
getApiLevel
• getApiLevel: () => Promise
<number
>
Type declaration
▸ (): Promise
<number
>
Returns
Promise
<number
>
Inherited from
ExposedNativeMethods.getApiLevel
getApiLevelSync
• getApiLevelSync: () => number
Type declaration
▸ (): number
Returns
number
Inherited from
ExposedNativeMethods.getApiLevelSync
getApplicationName
• getApplicationName: () => string
Type declaration
▸ (): string
Returns
string
getAvailableLocationProviders
• getAvailableLocationProviders: () => Promise
<LocationProviderInfo
>
Type declaration
▸ (): Promise
<LocationProviderInfo
>
Returns
Promise
<LocationProviderInfo
>
Inherited from
ExposedNativeMethods.getAvailableLocationProviders
getAvailableLocationProvidersSync
• getAvailableLocationProvidersSync: () => LocationProviderInfo
Type declaration
▸ (): LocationProviderInfo
Returns
LocationProviderInfo
Inherited from
ExposedNativeMethods.getAvailableLocationProvidersSync
getBaseOs
• getBaseOs: () => Promise
<string
>
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Inherited from
ExposedNativeMethods.getBaseOs
getBaseOsSync
• getBaseOsSync: () => string
Type declaration
▸ (): string
Returns
string
Inherited from
ExposedNativeMethods.getBaseOsSync
getBatteryLevel
• getBatteryLevel: () => Promise
<number
>
Type declaration
▸ (): Promise
<number
>
Returns
Promise
<number
>
Inherited from
ExposedNativeMethods.getBatteryLevel
getBatteryLevelSync
• getBatteryLevelSync: () => number
Type declaration
▸ (): number
Returns
number
Inherited from
ExposedNativeMethods.getBatteryLevelSync
getBootloader
• getBootloader: () => Promise
<string
>
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Inherited from
ExposedNativeMethods.getBootloader
getBootloaderSync
• getBootloaderSync: () => string
Type declaration
▸ (): string
Returns
string
Inherited from
ExposedNativeMethods.getBootloaderSync
getBrand
• getBrand: () => string
Type declaration
▸ (): string
Returns
string
getBrightness
• getBrightness: () => Promise
<number
>
Type declaration
▸ (): Promise
<number
>
Returns
Promise
<number
>
Inherited from
ExposedNativeMethods.getBrightness
getBrightnessSync
• getBrightnessSync: () => number
Type declaration
▸ (): number
Returns
number
Inherited from
ExposedNativeMethods.getBrightnessSync
getBuildId
• getBuildId: () => Promise
<string
>
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Inherited from
ExposedNativeMethods.getBuildId
getBuildIdSync
• getBuildIdSync: () => string
Type declaration
▸ (): string
Returns
string
Inherited from
ExposedNativeMethods.getBuildIdSync
getBuildNumber
• getBuildNumber: () => string
Type declaration
▸ (): string
Returns
string
getBundleId
• getBundleId: () => string
Type declaration
▸ (): string
Returns
string
getCarrier
• getCarrier: () => Promise
<string
>
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Inherited from
ExposedNativeMethods.getCarrier
getCarrierSync
• getCarrierSync: () => string
Type declaration
▸ (): string
Returns
string
Inherited from
ExposedNativeMethods.getCarrierSync
getCodename
• getCodename: () => Promise
<string
>
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Inherited from
ExposedNativeMethods.getCodename
getCodenameSync
• getCodenameSync: () => string
Type declaration
▸ (): string
Returns
string
Inherited from
ExposedNativeMethods.getCodenameSync
getDevice
• getDevice: () => Promise
<string
>
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Inherited from
ExposedNativeMethods.getDevice
getDeviceId
• getDeviceId: () => string
Type declaration
▸ (): string
Returns
string
getDeviceName
• getDeviceName: () => Promise
<string
>
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Inherited from
ExposedNativeMethods.getDeviceName
getDeviceNameSync
• getDeviceNameSync: () => string
Type declaration
▸ (): string
Returns
string
Inherited from
ExposedNativeMethods.getDeviceNameSync
getDeviceSync
• getDeviceSync: () => string
Type declaration
▸ (): string
Returns
string
Inherited from
ExposedNativeMethods.getDeviceSync
getDeviceToken
• getDeviceToken: () => Promise
<string
>
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Inherited from
ExposedNativeMethods.getDeviceToken
getDeviceType
• getDeviceType: () => string
Type declaration
▸ (): string
Returns
string
getDisplay
• getDisplay: () => Promise
<string
>
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Inherited from
ExposedNativeMethods.getDisplay
getDisplaySync
• getDisplaySync: () => string
Type declaration
▸ (): string
Returns
string
Inherited from
ExposedNativeMethods.getDisplaySync
getFingerprint
• getFingerprint: () => Promise
<string
>
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Inherited from
ExposedNativeMethods.getFingerprint
getFingerprintSync
• getFingerprintSync: () => string
Type declaration
▸ (): string
Returns
string
Inherited from
ExposedNativeMethods.getFingerprintSync
getFirstInstallTime
• getFirstInstallTime: () => Promise
<number
>
Type declaration
▸ (): Promise
<number
>
Returns
Promise
<number
>
Inherited from
ExposedNativeMethods.getFirstInstallTime
getFirstInstallTimeSync
• getFirstInstallTimeSync: () => number
Type declaration
▸ (): number
Returns
number
Inherited from
ExposedNativeMethods.getFirstInstallTimeSync
getFontScale
• getFontScale: () => Promise
<number
>
Type declaration
▸ (): Promise
<number
>
Returns
Promise
<number
>
Inherited from
ExposedNativeMethods.getFontScale
getFontScaleSync
• getFontScaleSync: () => number
Type declaration
▸ (): number
Returns
number
Inherited from
ExposedNativeMethods.getFontScaleSync
getFreeDiskStorage
• getFreeDiskStorage: () => Promise
<number
>
Type declaration
▸ (): Promise
<number
>
Returns
Promise
<number
>
Inherited from
ExposedNativeMethods.getFreeDiskStorage
getFreeDiskStorageOld
• getFreeDiskStorageOld: () => Promise
<number
>
Type declaration
▸ (): Promise
<number
>
Returns
Promise
<number
>
Inherited from
ExposedNativeMethods.getFreeDiskStorageOld
getFreeDiskStorageOldSync
• getFreeDiskStorageOldSync: () => number
Type declaration
▸ (): number
Returns
number
Inherited from
ExposedNativeMethods.getFreeDiskStorageOldSync
getFreeDiskStorageSync
• getFreeDiskStorageSync: () => number
Type declaration
▸ (): number
Returns
number
Inherited from
ExposedNativeMethods.getFreeDiskStorageSync
getHardware
• getHardware: () => Promise
<string
>
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Inherited from
ExposedNativeMethods.getHardware
getHardwareSync
• getHardwareSync: () => string
Type declaration
▸ (): string
Returns
string
Inherited from
ExposedNativeMethods.getHardwareSync
getHost
• getHost: () => Promise
<string
>
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Inherited from
ExposedNativeMethods.getHost
getHostSync
• getHostSync: () => string
Type declaration
▸ (): string
Returns
string
Inherited from
ExposedNativeMethods.getHostSync
getIncremental
• getIncremental: () => Promise
<string
>
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Inherited from
ExposedNativeMethods.getIncremental
getIncrementalSync
• getIncrementalSync: () => string
Type declaration
▸ (): string
Returns
string
Inherited from
ExposedNativeMethods.getIncrementalSync
getInstallReferrer
• getInstallReferrer: () => Promise
<string
>
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Inherited from
ExposedNativeMethods.getInstallReferrer
getInstallReferrerSync
• getInstallReferrerSync: () => string
Type declaration
▸ (): string
Returns
string
Inherited from
ExposedNativeMethods.getInstallReferrerSync
getInstallerPackageName
• getInstallerPackageName: () => Promise
<string
>
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Inherited from
ExposedNativeMethods.getInstallerPackageName
getInstallerPackageNameSync
• getInstallerPackageNameSync: () => string
Type declaration
▸ (): string
Returns
string
Inherited from
ExposedNativeMethods.getInstallerPackageNameSync
getInstanceId
• getInstanceId: () => Promise
<string
>
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Inherited from
ExposedNativeMethods.getInstanceId
getInstanceIdSync
• getInstanceIdSync: () => string
Type declaration
▸ (): string
Returns
string
Inherited from
ExposedNativeMethods.getInstanceIdSync
getIpAddress
• getIpAddress: () => Promise
<string
>
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Inherited from
ExposedNativeMethods.getIpAddress
getIpAddressSync
• getIpAddressSync: () => string
Type declaration
▸ (): string
Returns
string
Inherited from
ExposedNativeMethods.getIpAddressSync
getLastUpdateTime
• getLastUpdateTime: () => Promise
<number
>
Type declaration
▸ (): Promise
<number
>
Returns
Promise
<number
>
Inherited from
ExposedNativeMethods.getLastUpdateTime
getLastUpdateTimeSync
• getLastUpdateTimeSync: () => number
Type declaration
▸ (): number
Returns
number
Inherited from
ExposedNativeMethods.getLastUpdateTimeSync
getMacAddress
• getMacAddress: () => Promise
<string
>
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Inherited from
ExposedNativeMethods.getMacAddress
getMacAddressSync
• getMacAddressSync: () => string
Type declaration
▸ (): string
Returns
string
Inherited from
ExposedNativeMethods.getMacAddressSync
getManufacturer
• getManufacturer: () => Promise
<string
>
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
getManufacturerSync
• getManufacturerSync: () => string
Type declaration
▸ (): string
Returns
string
getMaxMemory
• getMaxMemory: () => Promise
<number
>
Type declaration
▸ (): Promise
<number
>
Returns
Promise
<number
>
Inherited from
ExposedNativeMethods.getMaxMemory
getMaxMemorySync
• getMaxMemorySync: () => number
Type declaration
▸ (): number
Returns
number
Inherited from
ExposedNativeMethods.getMaxMemorySync
getModel
• getModel: () => string
Type declaration
▸ (): string
Returns
string
getPhoneNumber
• getPhoneNumber: () => Promise
<string
>
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Inherited from
ExposedNativeMethods.getPhoneNumber
getPhoneNumberSync
• getPhoneNumberSync: () => string
Type declaration
▸ (): string
Returns
string
Inherited from
ExposedNativeMethods.getPhoneNumberSync
getPowerState
• getPowerState: () => Promise
<Partial
<PowerState
>>
Type declaration
▸ (): Promise
<Partial
<PowerState
>>
Returns
Promise
<Partial
<PowerState
>>
getPowerStateSync
• getPowerStateSync: () => Partial
<PowerState
>
Type declaration
▸ (): Partial
<PowerState
>
Returns
Partial
<PowerState
>
getPreviewSdkInt
• getPreviewSdkInt: () => Promise
<number
>
Type declaration
▸ (): Promise
<number
>
Returns
Promise
<number
>
Inherited from
ExposedNativeMethods.getPreviewSdkInt
getPreviewSdkIntSync
• getPreviewSdkIntSync: () => number
Type declaration
▸ (): number
Returns
number
Inherited from
ExposedNativeMethods.getPreviewSdkIntSync
getProduct
• getProduct: () => Promise
<string
>
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Inherited from
ExposedNativeMethods.getProduct
getProductSync
• getProductSync: () => string
Type declaration
▸ (): string
Returns
string
Inherited from
ExposedNativeMethods.getProductSync
getReadableVersion
• getReadableVersion: () => string
Type declaration
▸ (): string
Returns
string
getSecurityPatch
• getSecurityPatch: () => Promise
<string
>
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Inherited from
ExposedNativeMethods.getSecurityPatch
getSecurityPatchSync
• getSecurityPatchSync: () => string
Type declaration
▸ (): string
Returns
string
Inherited from
ExposedNativeMethods.getSecurityPatchSync
getSerialNumber
• getSerialNumber: () => Promise
<string
>
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Inherited from
ExposedNativeMethods.getSerialNumber
getSerialNumberSync
• getSerialNumberSync: () => string
Type declaration
▸ (): string
Returns
string
Inherited from
ExposedNativeMethods.getSerialNumberSync
getSystemAvailableFeatures
• getSystemAvailableFeatures: () => Promise
<string
[]>
Type declaration
▸ (): Promise
<string
[]>
Returns
Promise
<string
[]>
Inherited from
ExposedNativeMethods.getSystemAvailableFeatures
getSystemAvailableFeaturesSync
• getSystemAvailableFeaturesSync: () => string
[]
Type declaration
▸ (): string
[]
Returns
string
[]
Inherited from
ExposedNativeMethods.getSystemAvailableFeaturesSync
getSystemName
• getSystemName: () => string
Type declaration
▸ (): string
Returns
string
getSystemVersion
• getSystemVersion: () => string
Type declaration
▸ (): string
Returns
string
getTags
• getTags: () => Promise
<string
>
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Inherited from
ExposedNativeMethods.getTags
getTagsSync
• getTagsSync: () => string
Type declaration
▸ (): string
Returns
string
Inherited from
ExposedNativeMethods.getTagsSync
getTotalDiskCapacity
• getTotalDiskCapacity: () => Promise
<number
>
Type declaration
▸ (): Promise
<number
>
Returns
Promise
<number
>
Inherited from
ExposedNativeMethods.getTotalDiskCapacity
getTotalDiskCapacityOld
• getTotalDiskCapacityOld: () => Promise
<number
>
Type declaration
▸ (): Promise
<number
>
Returns
Promise
<number
>
Inherited from
ExposedNativeMethods.getTotalDiskCapacityOld
getTotalDiskCapacityOldSync
• getTotalDiskCapacityOldSync: () => number
Type declaration
▸ (): number
Returns
number
Inherited from
ExposedNativeMethods.getTotalDiskCapacityOldSync
getTotalDiskCapacitySync
• getTotalDiskCapacitySync: () => number
Type declaration
▸ (): number
Returns
number
Inherited from
ExposedNativeMethods.getTotalDiskCapacitySync
getTotalMemory
• getTotalMemory: () => Promise
<number
>
Type declaration
▸ (): Promise
<number
>
Returns
Promise
<number
>
Inherited from
ExposedNativeMethods.getTotalMemory
getTotalMemorySync
• getTotalMemorySync: () => number
Type declaration
▸ (): number
Returns
number
Inherited from
ExposedNativeMethods.getTotalMemorySync
getType
• getType: () => Promise
<string
>
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Inherited from
ExposedNativeMethods.getType
getTypeSync
• getTypeSync: () => string
Type declaration
▸ (): string
Returns
string
Inherited from
ExposedNativeMethods.getTypeSync
getUniqueId
• getUniqueId: () => Promise
<string
>
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Overrides
ExposedNativeMethods.getUniqueId
getUniqueIdSync
• getUniqueIdSync: () => string
Type declaration
▸ (): string
Returns
string
Overrides
ExposedNativeMethods.getUniqueIdSync
getUsedMemory
• getUsedMemory: () => Promise
<number
>
Type declaration
▸ (): Promise
<number
>
Returns
Promise
<number
>
Inherited from
ExposedNativeMethods.getUsedMemory
getUsedMemorySync
• getUsedMemorySync: () => number
Type declaration
▸ (): number
Returns
number
Inherited from
ExposedNativeMethods.getUsedMemorySync
getUserAgent
• getUserAgent: () => Promise
<string
>
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Inherited from
ExposedNativeMethods.getUserAgent
getUserAgentSync
• getUserAgentSync: () => string
Type declaration
▸ (): string
Returns
string
Inherited from
ExposedNativeMethods.getUserAgentSync
getVersion
• getVersion: () => string
Type declaration
▸ (): string
Returns
string
hasGms
• hasGms: () => Promise
<boolean
>
Type declaration
▸ (): Promise
<boolean
>
Returns
Promise
<boolean
>
Inherited from
ExposedNativeMethods.hasGms
hasGmsSync
• hasGmsSync: () => boolean
Type declaration
▸ (): boolean
Returns
boolean
Inherited from
ExposedNativeMethods.hasGmsSync
hasHms
• hasHms: () => Promise
<boolean
>
Type declaration
▸ (): Promise
<boolean
>
Returns
Promise
<boolean
>
Inherited from
ExposedNativeMethods.hasHms
hasHmsSync
• hasHmsSync: () => boolean
Type declaration
▸ (): boolean
Returns
boolean
Inherited from
ExposedNativeMethods.hasHmsSync
hasNotch
• hasNotch: () => boolean
Type declaration
▸ (): boolean
Returns
boolean
hasSystemFeature
• hasSystemFeature: (feature
: string
) => Promise
<boolean
>
Type declaration
▸ (feature
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
feature | string |
Returns
Promise
<boolean
>
Overrides
ExposedNativeMethods.hasSystemFeature
hasSystemFeatureSync
• hasSystemFeatureSync: (feature
: string
) => boolean
Type declaration
▸ (feature
): boolean
Parameters
Name | Type |
---|---|
feature | string |
Returns
boolean
Overrides
ExposedNativeMethods.hasSystemFeatureSync
isAirplaneMode
• isAirplaneMode: () => Promise
<boolean
>
Type declaration
▸ (): Promise
<boolean
>
Returns
Promise
<boolean
>
Inherited from
ExposedNativeMethods.isAirplaneMode
isAirplaneModeSync
• isAirplaneModeSync: () => boolean
Type declaration
▸ (): boolean
Returns
boolean
Inherited from
ExposedNativeMethods.isAirplaneModeSync
isBatteryCharging
• isBatteryCharging: () => Promise
<boolean
>
Type declaration
▸ (): Promise
<boolean
>
Returns
Promise
<boolean
>
Inherited from
ExposedNativeMethods.isBatteryCharging
isBatteryChargingSync
• isBatteryChargingSync: () => boolean
Type declaration
▸ (): boolean
Returns
boolean
Inherited from
ExposedNativeMethods.isBatteryChargingSync
isCameraPresent
• isCameraPresent: () => Promise
<boolean
>
Type declaration
▸ (): Promise
<boolean
>
Returns
Promise
<boolean
>
Inherited from
ExposedNativeMethods.isCameraPresent
isCameraPresentSync
• isCameraPresentSync: () => boolean
Type declaration
▸ (): boolean
Returns
boolean
Inherited from
ExposedNativeMethods.isCameraPresentSync
isEmulator
• isEmulator: () => Promise
<boolean
>
Type declaration
▸ (): Promise
<boolean
>
Returns
Promise
<boolean
>
Inherited from
ExposedNativeMethods.isEmulator
isEmulatorSync
• isEmulatorSync: () => boolean
Type declaration
▸ (): boolean
Returns
boolean
Inherited from
ExposedNativeMethods.isEmulatorSync
isHeadphonesConnected
• isHeadphonesConnected: () => Promise
<boolean
>
Type declaration
▸ (): Promise
<boolean
>
Returns
Promise
<boolean
>
Inherited from
ExposedNativeMethods.isHeadphonesConnected
isHeadphonesConnectedSync
• isHeadphonesConnectedSync: () => boolean
Type declaration
▸ (): boolean
Returns
boolean
Inherited from
ExposedNativeMethods.isHeadphonesConnectedSync
isKeyboardConnected
• isKeyboardConnected: () => Promise
<boolean
>
Type declaration
▸ (): Promise
<boolean
>
Returns
Promise
<boolean
>
Inherited from
ExposedNativeMethods.isKeyboardConnected
isKeyboardConnectedSync
• isKeyboardConnectedSync: () => boolean
Type declaration
▸ (): boolean
Returns
boolean
Inherited from
ExposedNativeMethods.isKeyboardConnectedSync
isLandscape
• isLandscape: () => Promise
<boolean
>
Type declaration
▸ (): Promise
<boolean
>
Returns
Promise
<boolean
>
isLandscapeSync
• isLandscapeSync: () => boolean
Type declaration
▸ (): boolean
Returns
boolean
isLocationEnabled
• isLocationEnabled: () => Promise
<boolean
>
Type declaration
▸ (): Promise
<boolean
>
Returns
Promise
<boolean
>
Inherited from
ExposedNativeMethods.isLocationEnabled
isLocationEnabledSync
• isLocationEnabledSync: () => boolean
Type declaration
▸ (): boolean
Returns
boolean
Inherited from
ExposedNativeMethods.isLocationEnabledSync
isMouseConnected
• isMouseConnected: () => Promise
<boolean
>
Type declaration
▸ (): Promise
<boolean
>
Returns
Promise
<boolean
>
Inherited from
ExposedNativeMethods.isMouseConnected
isMouseConnectedSync
• isMouseConnectedSync: () => boolean
Type declaration
▸ (): boolean
Returns
boolean
Inherited from
ExposedNativeMethods.isMouseConnectedSync
isPinOrFingerprintSet
• isPinOrFingerprintSet: () => Promise
<boolean
>
Type declaration
▸ (): Promise
<boolean
>
Returns
Promise
<boolean
>
Inherited from
ExposedNativeMethods.isPinOrFingerprintSet
isPinOrFingerprintSetSync
• isPinOrFingerprintSetSync: () => boolean
Type declaration
▸ (): boolean
Returns
boolean
Inherited from
ExposedNativeMethods.isPinOrFingerprintSetSync
isTablet
• isTablet: () => boolean
Type declaration
▸ (): boolean
Returns
boolean
isTabletMode
• isTabletMode: () => Promise
<boolean
>
Type declaration
▸ (): Promise
<boolean
>
Returns
Promise
<boolean
>
Inherited from
ExposedNativeMethods.isTabletMode
supported32BitAbis
• supported32BitAbis: () => Promise
<string
[]>
Type declaration
▸ (): Promise
<string
[]>
Returns
Promise
<string
[]>
supported32BitAbisSync
• supported32BitAbisSync: () => string
[]
Type declaration
▸ (): string
[]
Returns
string
[]
supported64BitAbis
• supported64BitAbis: () => Promise
<string
[]>
Type declaration
▸ (): Promise
<string
[]>
Returns
Promise
<string
[]>
supported64BitAbisSync
• supported64BitAbisSync: () => string
[]
Type declaration
▸ (): string
[]
Returns
string
[]
supportedAbis
• supportedAbis: () => Promise
<string
[]>
Type declaration
▸ (): Promise
<string
[]>
Returns
Promise
<string
[]>
supportedAbisSync
• supportedAbisSync: () => string
[]
Type declaration
▸ (): string
[]
Returns
string
[]
syncUniqueId
• syncUniqueId: () => Promise
<string
>
Type declaration
▸ (): Promise
<string
>
Returns
Promise
<string
>
Inherited from
ExposedNativeMethods.syncUniqueId
useBatteryLevel
• useBatteryLevel: () => number
Type declaration
▸ (): number
Returns
number
useBatteryLevelIsLow
• useBatteryLevelIsLow: () => number
Type declaration
▸ (): number
Returns
number
useBrightness
• useBrightness: () => number
Type declaration
▸ (): number
Returns
number
useDeviceName
• useDeviceName: () => AsyncHookResult
<string
>
Type declaration
▸ (): AsyncHookResult
<string
>
Returns
AsyncHookResult
<string
>
useFirstInstallTime
• useFirstInstallTime: () => AsyncHookResult
<number
>
Type declaration
▸ (): AsyncHookResult
<number
>
Returns
AsyncHookResult
<number
>
useHasSystemFeature
• useHasSystemFeature: (feature
: string
) => AsyncHookResult
<boolean
>
Type declaration
▸ (feature
): AsyncHookResult
<boolean
>
Parameters
Name | Type |
---|---|
feature | string |
Returns
AsyncHookResult
<boolean
>
useIsEmulator
• useIsEmulator: () => AsyncHookResult
<boolean
>
Type declaration
▸ (): AsyncHookResult
<boolean
>
Returns
AsyncHookResult
<boolean
>
useIsHeadphonesConnected
• useIsHeadphonesConnected: () => AsyncHookResult
<boolean
>
Type declaration
▸ (): AsyncHookResult
<boolean
>
Returns
AsyncHookResult
<boolean
>
useManufacturer
• useManufacturer: () => AsyncHookResult
<string
>
Type declaration
▸ (): AsyncHookResult
<string
>
Returns
AsyncHookResult
<string
>
usePowerState
• usePowerState: () => Partial
<PowerState
>
Type declaration
▸ (): Partial
<PowerState
>
Returns
Partial
<PowerState
>
Interface: EdgeInsets
Properties
bottom
• bottom: number
left
• left: number
right
• right: number
top
• top: number
Interface: INativeFuncs
Properties
Auth
• Auth: Object
Type declaration
Name | Type |
---|---|
login | (data : { password : string ; username : string }) => number |
refreshToken | () => { token : string } |
Clipboard
• Clipboard: Clipboard
DeviceInfo
• DeviceInfo: DeviceInfo
Linking
• Linking: RNLinking
NetInfo
• NetInfo: NetInfo
Orientation
• Orientation: typeof Orientation
Since
iNCU 5.9.7+
Portal
• Portal: Object
Type declaration
Name | Type |
---|---|
remove | (id : number ) => void |
Share
• Share: Object
Type declaration
Name | Type |
---|---|
openShareMenu | () => void |
setShareConfig | (config : ShareConfig ) => void |
StatusBar
• StatusBar: Object
Type declaration
Name | Type |
---|---|
setBarStyle | (style : StatusBarStyle , animated? : boolean ) => void |
Storage
• Storage: Object
Type declaration
Name | Type |
---|---|
getItem | (key : string ) => any |
remove | (key : string ) => void |
reset | () => void |
setItem | (key : string , value : any ) => void |
Toast
• Toast: Object
Index signature
▪ [key: string
]: (title
: string
, during
: number
) => number
ToastAndroid
• ToastAndroid: ToastAndroidStatic
Vibration
• Vibration: VibrationStatic
Webview
• Webview: Object
Type declaration
Name | Type |
---|---|
bindBackPress | (value : boolean ) => void |
disableAutoSetTitle | () => void |
exitWebView | () => void |
handleShowHeader | (value? : boolean ) => boolean |
toScreen | (e : NavConfig ) => void |
Interface: NavConfig
Properties
params
• Optional
params: object
screen
• screen: string
Interface: NetInfo
Properties
addEventListener
• addEventListener: (listener
: NetInfoChangeHandler
) => NetInfoSubscription
Type declaration
▸ (listener
): NetInfoSubscription
Parameters
Name | Type |
---|---|
listener | NetInfoChangeHandler |
Returns
NetInfoSubscription
configure
• configure: (configuration
: Partial
<NetInfoConfiguration
>) => void
Type declaration
▸ (configuration
): void
Parameters
Name | Type |
---|---|
configuration | Partial <NetInfoConfiguration > |
Returns
void
fetch
• fetch: (requestedInterface?
: string
) => Promise
<NetInfoState
>
Type declaration
▸ (requestedInterface?
): Promise
<NetInfoState
>
Parameters
Name | Type |
---|---|
requestedInterface? | string |
Returns
Promise
<NetInfoState
>
refresh
• refresh: () => Promise
<NetInfoState
>
Type declaration
▸ (): Promise
<NetInfoState
>
Returns
Promise
<NetInfoState
>
useNetInfo
• useNetInfo: (configuration?
: Partial
<NetInfoConfiguration
>) => NetInfoState
Type declaration
▸ (configuration?
): NetInfoState
Parameters
Name | Type |
---|---|
configuration? | Partial <NetInfoConfiguration > |
Returns
NetInfoState
Interface: RNLinking
Properties
canOpenURL
• canOpenURL: (url
: string
) => Promise
<boolean
>
Type declaration
▸ (url
): Promise
<boolean
>
Determine whether or not an installed app can handle a given URL. NOTE: For web URLs, the protocol ("http://", "https://") must be set accordingly! NOTE: As of iOS 9, your app needs to provide the LSApplicationQueriesSchemes key inside Info.plist.
Parameters
Name | Type |
---|---|
url | string |
Returns
Promise
<boolean
>
getInitialURL
• getInitialURL: () => Promise
<string
>
Type declaration
▸ (): Promise
<string
>
If the app launch was triggered by an app link with, it will give the link url, otherwise it will give null NOTE: To support deep linking on Android, refer http://developer.android.com/training/app-indexing/deep-linking.html#handling-intents (opens in a new tab)
Returns
Promise
<string
>
openSettings
• openSettings: () => Promise
<void
>
Type declaration
▸ (): Promise
<void
>
Open the Settings app and displays the app’s custom settings, if it has any.
Returns
Promise
<void
>
openURL
• openURL: (url
: string
) => Promise
<any
>
Type declaration
▸ (url
): Promise
<any
>
Try to open the given url with any of the installed apps. You can use other URLs, like a location (e.g. "geo:37.484847,-122.148386"), a contact, or any other URL that can be opened with the installed apps. NOTE: This method will fail if the system doesn't know how to open the specified URL. If you're passing in a non-http(s) URL, it's best to check {@code canOpenURL} first. NOTE: For web URLs, the protocol ("http://", "https://") must be set accordingly!
Parameters
Name | Type |
---|---|
url | string |
Returns
Promise
<any
>
Methods
sendIntent
▸ sendIntent(action
, extras?
): Promise
<void
>
Sends an Android Intent - a broad surface to express Android functions. Useful for deep-linking to settings pages, opening an SMS app with a message draft in place, and more. See https://developer.android.com/reference/kotlin/android/content/Intent?hl=en (opens in a new tab)
Parameters
Name | Type |
---|---|
action | string |
extras? | { key : string ; value : string | number | boolean }[] |
Returns
Promise
<void
>
Interface: ShareConfig
Properties
imageUrl
• Optional
imageUrl: string
title
• Optional
title: string
url
• Optional
url: string
Interface: ToastAndroidStatic
This exposes the native ToastAndroid module as a JS module. This has a function 'show' which takes the following parameters:
- String message: A string with the text to toast
- int duration: The duration of the toast. May be ToastAndroid.SHORT or ToastAndroid.LONG
There is also a function showWithGravity
to specify the layout gravity. May be
ToastAndroid.TOP, ToastAndroid.BOTTOM, ToastAndroid.CENTER
Properties
BOTTOM
• BOTTOM: number
CENTER
• CENTER: number
LONG
• LONG: number
SHORT
• SHORT: number
TOP
• TOP: number
show
• show: (message
: string
, duration
: number
) => void
Type declaration
▸ (message
, duration
): void
String message: A string with the text to toast int duration: The duration of the toast. May be ToastAndroid.SHORT or ToastAndroid.LONG
Parameters
Name | Type |
---|---|
message | string |
duration | number |
Returns
void
showWithGravity
• showWithGravity: (message
: string
, duration
: number
, gravity
: number
) => void
Type declaration
▸ (message
, duration
, gravity
): void
gravity
may be ToastAndroid.TOP, ToastAndroid.BOTTOM, ToastAndroid.CENTER
Parameters
Name | Type |
---|---|
message | string |
duration | number |
gravity | number |
Returns
void
showWithGravityAndOffset
• showWithGravityAndOffset: (message
: string
, duration
: number
, gravity
: number
, xOffset
: number
, yOffset
: number
) => void
Type declaration
▸ (message
, duration
, gravity
, xOffset
, yOffset
): void
Parameters
Name | Type |
---|---|
message | string |
duration | number |
gravity | number |
xOffset | number |
yOffset | number |
Returns
void
Interface: VibrationStatic
Methods
cancel
▸ cancel(): void
Stop vibration
Returns
void
vibrate
▸ vibrate(pattern?
, repeat?
): void
Parameters
Name | Type |
---|---|
pattern? | number | number [] |
repeat? | boolean |
Returns
void