#Ronit
1 messages · Page 1 of 1 (latest)
Hi! Let me help you with this.
There's a function to get the battery level, you will need to write a loop to check it regularly: https://stripe.dev/stripe-terminal-android/external/com.stripe.stripeterminal.external.models/-reader/battery-level.html
can you provide me for ios
can you provide me example which have sample code for get status during regular interval for ios
I am not that familiar with Swift, but it should be just a normal loop with a timeout, nothing Stripe-specific.
ohk thanks let me try that
Something like this:
// Define the interval time in seconds
let interval = 10.0
// Create the timer object
var timer = Timer()
// Define the function to be executed by the timer
@objc func runCheckStatus() {
checkStatus()
}
// Schedule the timer to run the function at regular intervals
timer = Timer.scheduledTimer(timeInterval: interval, target: self, selector: #selector(runCheckStatus), userInfo: nil, repeats: true)
yes i am working same like this
does stripe have any method for check low battery level
Battery status give you "low": https://stripe.dev/stripe-terminal-ios/docs/Classes/SCPReader.html#/c:objc(cs)SCPReader(py)batteryStatus
thanks is worked and now i am working on update installation for that install software method is used right ?
What do you mean exactly?
how can i install software of reader when it's available
Are you following some guide?
yes
Which one?
You should be able to call this function: https://stripe.dev/stripe-terminal-ios/docs/Classes/SCPTerminal.html#/c:objc(cs)SCPTerminal(im)installAvailableUpdate