|
Post by AnkuLua on Oct 5, 2015 15:32:42 GMT
Fine tune the behavior of volume change Thanks to zpt feedback. Now AnkuLua will avoid to lock volume if not needed. Only following situations will lock the volume. * service started and start/stop script by volume changing activated * script running and after setVolumeDetect(true) called
Volume will be restored to original value when released.
New Methods
setVolumeDetect(boolean) This method is only available in pro version. Enable or disable the volume detection according to the boolean value. Methods isVolumeUp() and isVolumeDown() only reflect the volume changing when detection enable. If disabled, isVolumeUp() and isVolumeDown() always return false. Therefore, the code should be
setVolumeDetect(true)
while (true) do
if (isVolumeUp()) then toast("Volume up") end
if (isVolumeDown()) then toast("Volume down") end
end
setDragDropTiming(downMilliSeconds, upMilliSeconds) The acceptable drag and drop timing may be different for different devices. Try this if needed. The pseudo code of dragDrop(location1, location2) will become
TOUCH_DOWN(point1) wait(downMilliSeconds) MOVE_TO(point2) wait(upMilliSeconds) TOUCH_UP(point2) The default value of downMilliSeconds is 200 ms. And that of upMilliSeconds is 500 ms. Be careful for small value. It will become swipe and the precision is lower. The drag will drop away from where you want to drop.
|
|