Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我写了一个根据模式振动的应用程序:
vib.vibrate(..., -1);
我想知道手机何时结束振动。有什么方法可以知道我触发该方法后它是否仍在振动?
谢谢
不确定您是否真的可以轮询手机以查看它是否在振动,但您可以使用此方法在特定时间段内振动并简单地跟踪它或将其输入 Handler/Timer 以回调它已完成?