setBinOrHex

open fun setBinOrHex(fileType: Int, @NonNull uri: Uri): DfuServiceInitiator

Deprecated

Sets the URI of the BIN or HEX file containing the new firmware. For DFU Bootloader version 0.5 or newer the init file must be specified using one of setInitFile methods.

Return

the builder

Parameters

fileType

the file type, a bit field created from:

uri

the URI of the file


open fun setBinOrHex(fileType: Int, @NonNull path: String): DfuServiceInitiator

Deprecated

Sets the URI of the BIN or HEX file containing the new firmware. For DFU Bootloader version 0.5 or newer the init file must be specified using one of setInitFile methods.

Return

the builder

Parameters

fileType

see setBinOrHex for details

path

path to the file


open fun setBinOrHex(fileType: Int, @Nullable uri: Uri, @Nullable path: String): DfuServiceInitiator

Deprecated

The Distribution packet (ZIP) should be used for DFU Bootloader version 0.5 or newer

Sets the URI or path to the BIN or HEX file containing the new firmware. For DFU Bootloader version 0.5 or newer the init file must be specified using one of setInitFile methods.

Return

the builder

Parameters

fileType

see setBinOrHex for details

uri

the URI of the file

path

path to the file


open fun setBinOrHex(fileType: Int, @RawRes rawResId: Int): DfuServiceInitiator

Deprecated

Sets the resource ID pointing the BIN or HEX file containing the new firmware. The file should be in the /res/raw folder. For DFU Bootloader version 0.5 or newer the init file must be specified using one of setInitFile methods.

Return

the builder

Parameters

fileType

see setBinOrHex for details

rawResId

resource ID