Closed anasofiagribeiro closed 4 years ago
Thanks for your contribution. SecondScreen does not access the network whatsoever - it doesn't even declare android.permission.INTERNET
in its manifest. So I don't believe that the changes to the SecondScreenIntentService
and the AndroidManifest
are needed.
I am happy to accept the changes to the TaskerConditionReceiver
however, assuming that these changes do not break interop with SecondScreen and Tasker in any way.
SecondScreen's sister app, Taskbar, also has a TaskerConditionReceiver
where similar changes could be made:
This improves the energy efficiency of SecondScreen by applying the Dynamic Retry Delay Energy Pattern and the Cache Energy Pattern for mobile applications.
The energy pattern was applied in SecondScreenIntentService.java and AndroidManifest.xml (for the Dynamic Retry Delay Energy Pattern) and TaskerConditionReceiver.java (for the Cache Energy Pattern). The general idea for the first one is to avoid accessing an internet connection if the connection is down . In particular, a class NetworkStateReceiver will be created in the java file that checks for an internet connection. The general idea for the second one is to avoid performing unnecessary operations by using cache mechanisms. In particular, the operations in method onReceive will only execute if the bundles changes.