We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Since AndroidAnnotations 3.2
The @WakeLock annotation allows to easily acquire a WakeLock for a method.
@WakeLock
Usage example:
@WakeLock(tag = "MyTag", level = WakeLock.Level.FULL_WAKE_LOCK, flags = WakeLock.Flag.ACQUIRE_CAUSES_WAKEUP) void methodWithWakeLock(String aParam, long anotherParam) { [...] }
When the method gets executed, it has a FULL_WAKE_LOCK and due to the ACQUIRE_CAUSES_WAKEUP flag the screen is turned on.
WakeLocks require the android.permission.WAKE_LOCK permission.
android.permission.WAKE_LOCK
<uses-permission android:name="android.permission.WAKE_LOCK" />
@WakeLock does not work with @Trace if the method returns a value. For methods with no return value @Trace works as expected.
@Trace