wifi trigger, memorize most recent ssid
This commit is contained in:
parent
62c97832a9
commit
d5ce04f80b
@ -40,8 +40,9 @@ public class WifiBroadcastReceiver extends BroadcastReceiver
|
||||
{
|
||||
if(newWifiSsid.startsWith("\"") && newWifiSsid.endsWith("\""))
|
||||
newWifiSsid = newWifiSsid.substring(1, newWifiSsid.length()-1);
|
||||
|
||||
WifiBroadcastReceiver.lastWifiSsid = newWifiSsid;
|
||||
|
||||
if(newWifiSsid.length() > 0)
|
||||
WifiBroadcastReceiver.lastWifiSsid = newWifiSsid;
|
||||
}
|
||||
|
||||
public static boolean isWifiListenerActive()
|
||||
|
@ -52,7 +52,7 @@ public class DateTimeListener extends BroadcastReceiver implements AutomationLis
|
||||
Miscellaneous.logEvent("i", "AlarmListener", "Alarm received", 2);
|
||||
|
||||
ArrayList<Rule> allRulesWithNowInTimeFrame = Rule.findRuleCandidates(Trigger_Enum.timeFrame);
|
||||
for(int i=0; i<allRulesWithNowInTimeFrame.size(); i++)
|
||||
for(int i=0; i < allRulesWithNowInTimeFrame.size(); i++)
|
||||
{
|
||||
if(allRulesWithNowInTimeFrame.get(i).getsGreenLight(context))
|
||||
allRulesWithNowInTimeFrame.get(i).activate(automationServiceRef, false);
|
||||
@ -139,7 +139,7 @@ public class DateTimeListener extends BroadcastReceiver implements AutomationLis
|
||||
}
|
||||
|
||||
i++;
|
||||
i=(int)System.currentTimeMillis();
|
||||
i = (int)System.currentTimeMillis();
|
||||
sdf.format(calSetWorkingCopy.getTime());
|
||||
String.valueOf(i);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user