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.
我正在为 Intent.ACTION_BATTERY_CHANGED 使用广播接收器。我在我的应用程序中收到此意图的速率是每 5 秒。但我想尽快提高这个速度。
我不知道这是否可能。如果可能,请帮助我。
我不认为这是可能的。原因实际上在于类名,它是一个接收器。当您注册接收器时,它有一个公开的方法,只要系统检测到 ACTION_BATTERY_CHANGED 意图,就会调用该方法。您收到此消息的速率完全取决于系统广播事件的速率。