Type Alias: StartOptions
StartOptions =
object
Defined in: index.ts:339
Properties
autoStart?
optionalautoStart?:boolean
Defined in: index.ts:345
Whether to auto-start binary on app start and device reboot.
Default: false
autoStop?
optionalautoStop?:AutoStopOptions|null
Defined in: index.ts:359
Auto stop options. While technically the binary is stopped and restarted, this effectively auto-pauses and resumes based on device network and battery statuses.
If provided and binary was previously started but not manually stopped, it will monitor device network & battery status and automatically stop the binary when conditions are met. And then restart binary when conditions no longer meet.
To disable use undefined/null
Default: { batteryLevelBelow: 10, networkTypes: ['cellular' ]}
awaitStartDelay?
optionalawaitStartDelay?:number
Defined in: index.ts:369
Duration in milliseconds to wait after invoking start() if status does't change to started.
It will keep checking statups every 100ms up to the maximum duration provided.
Default: 3000
binaryName
binaryName:
string
Defined in: index.ts:378
Name of the binary file to be executed.
The binary file must be available in the jniLibs directory.
For more details, check out the jniLibs Configuration section in the README.md.
env?
optionalenv?:BinaryEnv
Defined in: index.ts:386
Record containing environment varibles to be passed to the binary.
Key: string. environment variable name. Value: EnvEntry variable configuration.
ipcOptions?
optionalipcOptions?:IpcOptions
Defined in: index.ts:395
Options for InterProcess Communication (IPC) from the executed binary to the React Native app.
How this works?
If enabled (by setting a tag), the binary service will monitor each line printed by executed binary and create a notification if matched. See IpcOptions.tag
notification?
optionalnotification?:Partial<NotificationOptions>
Defined in: index.ts:398
Default notification options used with foreground service notification
startupText?
optionalstartupText?:string
Defined in: index.ts:401
Optionally, provide a case-insensitive text to match binary log outputs to confirm successful start
startupTimeout?
optionalstartupTimeout?:number
Defined in: index.ts:409
Startup timeout duration in seconds. If startupText does not appear in the log within this duration, it will be assumed that startup has failed.
Default: 30