How can one make the PinePhone detect incoming calls on a regular basis using this method? It looks like the code sleeps for minutes at a time, which is ideal for fetching notifications for IM apps etc. but not for detecting incoming calls (which usually last about 30 seconds iirc before timing out/going to voicemail).
I would assume that suspending and waking, say, every 10 seconds could allow for detecting incoming calls but not be as energy efficient (or in the worst case, more detrimental than just keeping the phone on)?
imo I'd implement this by not suspending (except for some kind of 'battery saver' mode) and just keeping the screen at 0% brightness (which I assume is one of the primary consumers of energy from the battery cell)...
That's handy, thanks for letting me know! I assume that applications that are resumed from suspension can then continue checking for incoming phone calls and alert the user when necessary, much like how (from my 'experiments' with the PinePhone) pressing the power button to wake the phone will still allow applications to capture the keypress event.