the Android platform (4.1.1_r4).
From my understanding, it should be possible to wake the system from suspend so as long as I can
I'm trying to look at the Android platform AlarmManager code; both
Java and native, to try and figure out exactly how I'm supposed to use
this interface.
So far, after looking at
frameworks/base/services/jni/com_android_server_AlarmManagerService.cpp
frameworks/base/services/java/com/android/server/AlarmManagerService.java
I'm now trying to set an alarm using something like
struct timespec ts;
ts.tv_nsec = 0;
ts.tv_sec = 15;
int alarm_fd = open("/dev/alarm", O_RDWR);
int result = ioctl(alarm_fd,
ANDROID_ALARM_SET(ANDROID_
ALARM_ELAPSED_REALTIME), &ts);
However, upon execution, kmsg shows me the following
[ 430.304171] alarm_release: clear alarm, pending 0
I've also confirmed that the device does not wake up from suspend
using the above snippet.
I'm not sure what I'm doing wrong..I've tried to replicate most of what the AlarmMAnagerService.cpp is doing..
I would greatly appreciate it if someone could help me with the Android alarm interface
Thanks