Device log function

Functional Overview

Get device flash, battery, overheating and other logs

DeviceLogInterface

Attributes

getLogIng

Is the log being obtained?

logDirPath

Get all log directory addresses (return: /xx/../ido_sdk/devices/{macAddress}/device_logs)

method

startGet(types:timeOut:progress:completion:)

Start getting logs

  • Parameters:
    • types: log type collection
    • timeOut: timeout for getting logs
    • progress: log acquisition progress (0-100)
    • completion: log acquisition completion callback

cancel(completion:)

Cancel fetching logs

  • Parameters:
    • completion: completion callback

Example

Swift

   sdk.deviceLog.startGet(types: [.general], timeOut: 60) { progress in
       //Get flash log progress
   } completion: { success in
       //Get completed
       if (success) { //success
         Get logs through logDirPath
       }else {
         //fail
       }

   }

Kotlin

   sdk.deviceLog.startGet(mutableListOf(), 60, { progress ->
     //Get flash log progress
   }) { success ->
     //Get completed
       if (success) { //success
         Get logs through logDirPath
       } else {
         //fail
       }
   }
Copyright © 2023-2024 IDO. All rights reserved. all right reserved,powered by Gitbook修改日期: 2024-04-25 17:06:59

results matching ""

    No results matching ""