How to test slider views on both iOS and Android?

I am having no luck with testing slider views using appium. I have tried the following commands on both iOS and Android but doest seem to work. On iOS it moves the slider button a little bit no matter what value I send, and on Android the button does not even move.

slider = driver.find_element_by_id(slider_id)
slider.send_keys(0.6)

or

slider.send_keys("0.6")

I am testing it on iOS emulator and android real device.

I ended up with creating my own function using swipe gesture available in appium library.