24 | * Created by Markus on 11.11.2015.
25 | */
26 | public class ExternalAppConstants {
27 |
28 | /**
29 | * Private Constructor
30 | *
31 | * @throws UnsupportedOperationException because this class cannot be instantiated.
32 | */
33 | private ExternalAppConstants() {
34 | throw new UnsupportedOperationException("This class is non-instantiable");
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/Shared/src/main/java/eu/power_switch/shared/constants/PermissionConstants.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.shared.constants;
20 |
21 | /**
22 | * Created by Markus on 22.12.2015.
23 | */
24 | public class PermissionConstants {
25 |
26 | public static final String KEY_REQUEST_CODE = "requestCode";
27 | public static final String KEY_RESULTS = "results";
28 |
29 | public static final int REQUEST_CODE_STORAGE_PERMISSION = 123;
30 | public static final int REQUEST_CODE_LOCATION_PERMISSION = 124;
31 | public static final int REQUEST_CODE_PHONE_PERMISSION = 125;
32 |
33 | /**
34 | * Private Constructor
35 | *
36 | * @throws UnsupportedOperationException because this class cannot be instantiated.
37 | */
38 | private PermissionConstants() {
39 | throw new UnsupportedOperationException("This class is non-instantiable");
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/Shared/src/main/java/eu/power_switch/shared/constants/TimerConstants.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.shared.constants;
20 |
21 | /**
22 | * Class holding constants related to Timers for both Smartphone and Wearable Module
23 | *
24 | * Created by Markus on 11.11.2015.
25 | */
26 | public class TimerConstants {
27 |
28 | // Timer
29 | public static final String TIMER_ACTIVATION_INTENT = "eu.power_switch.alarm";
30 | public static final String TIMER_URI_SCHEME = "timer";
31 |
32 | /**
33 | * Private Constructor
34 | *
35 | * @throws UnsupportedOperationException because this class cannot be instantiated.
36 | */
37 | private TimerConstants() {
38 | throw new UnsupportedOperationException("This class is non-instantiable");
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Shared/src/main/java/eu/power_switch/shared/exception/backup/BackupAlreadyExistsException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.shared.exception.backup;
20 |
21 | /**
22 | * Created by Markus on 16.07.2015.
23 | */
24 | public class BackupAlreadyExistsException extends Exception {
25 |
26 | public BackupAlreadyExistsException() {
27 | super("Backup already exists!");
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Shared/src/main/java/eu/power_switch/shared/exception/backup/BackupNotFoundException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.shared.exception.backup;
20 |
21 | /**
22 | * Created by Markus on 16.07.2015.
23 | */
24 | public class BackupNotFoundException extends Exception {
25 |
26 | public BackupNotFoundException() {
27 | super("Backup not found!");
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Shared/src/main/java/eu/power_switch/shared/exception/backup/CreateBackupException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.shared.exception.backup;
20 |
21 | /**
22 | * Created by Markus on 16.07.2015.
23 | */
24 | public class CreateBackupException extends Exception {
25 |
26 | public CreateBackupException(Exception e) {
27 | super("Error creating Backup!", e);
28 | }
29 |
30 | public CreateBackupException(String description) {
31 | super("Error creating Backup: " + description);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/Shared/src/main/java/eu/power_switch/shared/exception/backup/RemoveBackupException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.shared.exception.backup;
20 |
21 | /**
22 | * Created by Markus on 16.07.2015.
23 | */
24 | public class RemoveBackupException extends Exception {
25 |
26 | public RemoveBackupException(Exception e) {
27 | super("Error removing Backup!", e);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Shared/src/main/java/eu/power_switch/shared/exception/backup/RestoreBackupException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.shared.exception.backup;
20 |
21 | /**
22 | * Created by Markus on 16.07.2015.
23 | */
24 | public class RestoreBackupException extends Exception {
25 |
26 | public RestoreBackupException(Exception e) {
27 | super("Error restoring Backup!", e);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Shared/src/main/java/eu/power_switch/shared/exception/gateway/GatewayAlreadyExistsException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.shared.exception.gateway;
20 |
21 | /**
22 | * Created by Markus on 16.07.2015.
23 | */
24 | public class GatewayAlreadyExistsException extends Exception {
25 |
26 | public long idOfExistingGateway;
27 |
28 | public GatewayAlreadyExistsException(long idOfExistingGateway) {
29 | super("Gateway already exists!");
30 | this.idOfExistingGateway = idOfExistingGateway;
31 | }
32 |
33 | public long getIdOfExistingGateway() {
34 | return idOfExistingGateway;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/Shared/src/main/java/eu/power_switch/shared/exception/gateway/GatewayNotSupportedException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.shared.exception.gateway;
20 |
21 | /**
22 | * Created by Markus on 16.07.2015.
23 | */
24 | public class GatewayNotSupportedException extends Exception {
25 |
26 | public GatewayNotSupportedException() {
27 | super("Gateway found but not supported!");
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Shared/src/main/java/eu/power_switch/shared/exception/gateway/GatewayUnknownException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.shared.exception.gateway;
20 |
21 | public class GatewayUnknownException extends RuntimeException {
22 | private static final long serialVersionUID = 5040868827100944073L;
23 |
24 | public GatewayUnknownException() {
25 | super();
26 | }
27 |
28 | public GatewayUnknownException(String s) {
29 | super(s);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Shared/src/main/java/eu/power_switch/shared/exception/location/AddressNotFoundException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.shared.exception.location;
20 |
21 | /**
22 | * Created by Markus on 25.01.2016.
23 | */
24 | public class AddressNotFoundException extends Exception {
25 |
26 | String coordinates;
27 |
28 | public AddressNotFoundException(String coordinates) {
29 | super("No Address could be found for the given coordinates: " + coordinates);
30 | }
31 |
32 | public String getCoordinates() {
33 | return coordinates;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Shared/src/main/java/eu/power_switch/shared/exception/location/CoordinatesNotFoundException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.shared.exception.location;
20 |
21 | /**
22 | * Created by Markus on 25.01.2016.
23 | */
24 | public class CoordinatesNotFoundException extends Exception {
25 |
26 | String address;
27 |
28 | public CoordinatesNotFoundException(String address) {
29 | super("No Coordinates could be found for the given address: " + address);
30 | }
31 |
32 | public String getAddress() {
33 | return address;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Shared/src/main/java/eu/power_switch/shared/exception/nfc/NfcTagInsufficientMemoryException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.shared.exception.nfc;
20 |
21 | /**
22 | * Created by Markus on 08.04.2016.
23 | */
24 | public class NfcTagInsufficientMemoryException extends Exception {
25 |
26 | public NfcTagInsufficientMemoryException(int available, int requested) {
27 | super("Memory of NFC tag is not sufficient. Available: " + available + " Requested: " + requested);
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/Shared/src/main/java/eu/power_switch/shared/exception/nfc/NfcTagNotWritableException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.shared.exception.nfc;
20 |
21 | /**
22 | * Created by Markus on 08.04.2016.
23 | */
24 | public class NfcTagNotWritableException extends Exception {
25 |
26 | public NfcTagNotWritableException() {
27 | super();
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/Shared/src/main/java/eu/power_switch/shared/exception/permission/MissingPermissionException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.shared.exception.permission;
20 |
21 | /**
22 | * Created by Markus on 25.01.2016.
23 | */
24 | public class MissingPermissionException extends Exception {
25 |
26 | String permission;
27 |
28 | public MissingPermissionException(String permission) {
29 | super("Missing permission: " + permission);
30 | this.permission = permission;
31 | }
32 |
33 | public String getPermission() {
34 | return permission;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/Shared/src/main/java/eu/power_switch/shared/exception/receiver/ActionNotSupportedException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.shared.exception.receiver;
20 |
21 | /**
22 | * Created by Markus on 11.09.2015.
23 | */
24 | public class ActionNotSupportedException extends Exception {
25 |
26 | public ActionNotSupportedException(String action) {
27 | super("Action not supported by receiver: " + action);
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/Shared/src/main/java/eu/power_switch/shared/exception/receiver/ReceiverAlreadyExistsException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.shared.exception.receiver;
20 |
21 | /**
22 | * Created by Markus on 16.07.2015.
23 | */
24 | public class ReceiverAlreadyExistsException extends Exception {
25 |
26 | public ReceiverAlreadyExistsException() {
27 | super("Receiver already exists!");
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Shared/src/main/res/drawable/button_shape_default_dark.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
23 |
24 |
26 |
27 |
29 |
30 |
33 |
34 |
--------------------------------------------------------------------------------
/Shared/src/main/res/drawable/button_shape_default_light.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
23 |
24 |
26 |
27 |
29 |
30 |
33 |
34 |
--------------------------------------------------------------------------------
/Shared/src/main/res/drawable/button_shape_pressed.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
23 |
24 |
26 |
27 |
29 |
30 |
--------------------------------------------------------------------------------
/Shared/src/main/res/drawable/button_shape_selector_light.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Shared/src/main/res/values-de/strings_action.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 | Aktion entfernt
23 | Aktion gespeichert
24 |
25 |
--------------------------------------------------------------------------------
/Shared/src/main/res/values-de/strings_api.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 | Ungültige Argumente
23 | Fehler beim Ausführen der Aktion: %1$s
24 |
25 |
--------------------------------------------------------------------------------
/Shared/src/main/res/values-de/strings_donate.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 | Spenden
23 |
24 | Spende dem Entwickler von PowerSwitch per Play Store In-App
25 | Kauf\n\nWeitere Wege zum Spenden findest du auf unserer Webseite
26 |
27 | Vielen Dank! :-)
28 |
29 |
--------------------------------------------------------------------------------
/Shared/src/main/res/values-de/strings_nfc.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 | NFC Tag beschreiben
23 | {gmi-nfc} NFC Tag beschreiben
24 |
25 | Warte auf NFC Tag…
26 | NFC Tag erkannt\nSchreibe Daten…
27 | NFC Tag erfolgreich beschrieben
28 | Fehler beim Beschreiben des NFC Tags\nBitte versuche es erneut
29 |
30 |
--------------------------------------------------------------------------------
/Shared/src/main/res/values-de/strings_phone.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 | Telefon
23 | Anruf
24 |
25 | Kontakte
26 |
27 | Das Anrufereignis wird für immer verloren sein!
28 | Anruf gelöscht
29 | Telefonnummer hinzufügen
30 |
31 |
--------------------------------------------------------------------------------
/Shared/src/main/res/values-de/strings_room.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 | Räume
24 |
25 |
26 | Raum einrichten
27 | Raum existiert bereits
28 | Der Raum wird für immer verloren sein!
29 | Raum gespeichert
30 | Raum gelöscht
31 |
32 | Reihenfolge
33 |
34 | Bitte gib einen Namen ein
35 |
36 |
--------------------------------------------------------------------------------
/Shared/src/main/res/values-de/strings_special.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 | Frohe Weihnacht! ☃
23 | Frohes Neues! ☺
24 | Süßes oder Saures! ⛤
25 | Frohe Ostern! ❀
26 |
27 |
--------------------------------------------------------------------------------
/Shared/src/main/res/values-de/strings_wear.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 | Fehler beim Ausführen der Wear Aktion
23 |
24 |
--------------------------------------------------------------------------------
/Shared/src/main/res/values/strings_action.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 | Action removed
23 | Action saved
24 |
25 |
--------------------------------------------------------------------------------
/Shared/src/main/res/values/strings_api.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 | Invalid arguments
23 | Error executing Action: %1$s
24 |
25 |
--------------------------------------------------------------------------------
/Shared/src/main/res/values/strings_donate.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 | Donate
23 |
24 | Donate to the Developer of PowerSwitch using Play Store In-App
25 | Purchases\n\nYou can find more ways to donate on our homepage
26 |
27 | Thank you! :-)
28 |
29 |
--------------------------------------------------------------------------------
/Shared/src/main/res/values/strings_nfc.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 | NFC
23 | Write NFC Tag
24 | {gmi-nfc} Write NFC Tag
25 |
26 | Waiting for NFC Tag…
27 | NFC Tag discovered\nWriting data…
28 | NFC Tag written successfully
29 | Error writing NFC Tag\nPlease try again
30 |
31 |
--------------------------------------------------------------------------------
/Shared/src/main/res/values/strings_phone.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 | Phone
23 | Call
24 | SMS
25 |
26 | Contacts
27 |
28 | Call event will be gone forever!
29 | Call deleted
30 | Add phone number
31 |
32 |
--------------------------------------------------------------------------------
/Shared/src/main/res/values/strings_room.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 | Rooms
24 |
25 |
26 | Configure Room
27 | Room already exists
28 | Room will be gone forever!
29 | Room saved
30 | Room deleted
31 |
32 | Order
33 |
34 | Please enter name
35 |
36 |
--------------------------------------------------------------------------------
/Shared/src/main/res/values/strings_special.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 | Merry Christmas! ☃
23 | Happy New Year! ☺
24 | Happy Halloween! ⛤
25 | Happy Easter! ❀
26 |
27 |
--------------------------------------------------------------------------------
/Shared/src/main/res/values/strings_wear.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 | Error while executing Wear action
23 |
24 |
--------------------------------------------------------------------------------
/Smartphone/lint.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Smartphone/notes/database_signals_network_draft.xoj:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Power-Switch/PowerSwitch_Android/54400f74230bb78f87b19cc89c0f174e080a3fa7/Smartphone/notes/database_signals_network_draft.xoj
--------------------------------------------------------------------------------
/Smartphone/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in F:\Android SDK for Android Studio/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | -dontobfuscate
20 | -keep class eu.power_switch.obj.** {
21 | *;
22 | }
23 | -keep class .R
24 | -keep class **.R$* {
25 | ;
26 | }
--------------------------------------------------------------------------------
/Smartphone/src/androidTest/java/eu/power_switch/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch;
20 |
21 | import android.app.Application;
22 | import android.test.ApplicationTestCase;
23 |
24 | /**
25 | * Testing Fundamentals
26 | */
27 | public abstract class ApplicationTest extends ApplicationTestCase {
28 |
29 | public ApplicationTest() {
30 | super(Application.class);
31 | }
32 |
33 | }
--------------------------------------------------------------------------------
/Smartphone/src/androidTest/java/eu/power_switch/obj/gateways/ConnAirTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.obj.gateways;
20 |
21 | import org.junit.Assert;
22 | import org.junit.Test;
23 |
24 | import java.util.Collections;
25 |
26 | import eu.power_switch.obj.gateway.ConnAir;
27 |
28 | public class ConnAirTest {
29 | /***
30 | * This test is not really useful because it test a constant.
31 | * But we use it to test if our testframework works.
32 | *
33 | * @throws Exception
34 | */
35 | @Test
36 | public void testGetModelAsString() throws Exception {
37 | ConnAir connAir = new ConnAir((long) 0, true, "Gateway", "Firmware", "10.10.10.10", 1234, "wanAddress", 49880, Collections.emptySet());
38 | String model = connAir.getModel();
39 | Assert.assertEquals("ConnAir", model);
40 | }
41 | }
--------------------------------------------------------------------------------
/Smartphone/src/main/java/eu/power_switch/database/handler/ButtonHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.database.handler;
20 |
21 | /**
22 | * Provides database methods for managing Buttons
23 | */
24 | abstract class ButtonHandler {
25 |
26 | /**
27 | * Private Constructor
28 | *
29 | * @throws UnsupportedOperationException because this class cannot be instantiated.
30 | */
31 | private ButtonHandler() {
32 | throw new UnsupportedOperationException("This class is non-instantiable");
33 | }
34 |
35 | }
--------------------------------------------------------------------------------
/Smartphone/src/main/java/eu/power_switch/google_play_services/playstore/Base64DecoderException.java:
--------------------------------------------------------------------------------
1 | // Copyright 2002, Google, Inc.
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package eu.power_switch.google_play_services.playstore;
16 |
17 | /**
18 | * Exception thrown when encountering an invalid Base64 input character.
19 | *
20 | * @author nelson
21 | */
22 | public class Base64DecoderException extends Exception {
23 | private static final long serialVersionUID = 1L;
24 |
25 | public Base64DecoderException() {
26 | super();
27 | }
28 |
29 | public Base64DecoderException(String s) {
30 | super(s);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Smartphone/src/main/java/eu/power_switch/gui/adapter/ConfigurationDialogTabAdapter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.gui.adapter;
20 |
21 | import android.support.v4.app.FragmentManager;
22 | import android.support.v4.app.FragmentPagerAdapter;
23 |
24 | import eu.power_switch.gui.dialog.ConfigurationDialogTabbedSummaryFragment;
25 |
26 | /**
27 | * Created by Markus on 17.02.2016.
28 | */
29 | public abstract class ConfigurationDialogTabAdapter extends FragmentPagerAdapter {
30 |
31 | public ConfigurationDialogTabAdapter(FragmentManager fm) {
32 | super(fm);
33 | }
34 |
35 | public abstract ConfigurationDialogTabbedSummaryFragment getSummaryFragment();
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/Smartphone/src/main/java/eu/power_switch/gui/adapter/ItemTouchHelperAdapter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.gui.adapter;
20 |
21 | /**
22 | * Created by Markus on 13.10.2015.
23 | */
24 | public interface ItemTouchHelperAdapter {
25 |
26 | void onItemMove(int fromPosition, int toPosition);
27 |
28 | void onItemDismiss(int position);
29 | }
30 |
--------------------------------------------------------------------------------
/Smartphone/src/main/java/eu/power_switch/gui/adapter/ItemTouchHelperViewHolder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.gui.adapter;
20 |
21 | import android.support.v7.widget.helper.ItemTouchHelper;
22 |
23 | /**
24 | * Notifies a View Holder of relevant callbacks from
25 | * {@link ItemTouchHelper.Callback}.
26 | *
27 | * Created by Markus on 29.10.2015.
28 | */
29 | public interface ItemTouchHelperViewHolder {
30 |
31 | /**
32 | * Called when the {@link ItemTouchHelper} first registers an
33 | * item as being moved or swiped.
34 | * Implementations should update the item view to indicate
35 | * it's active state.
36 | */
37 | void onItemSelected();
38 |
39 |
40 | /**
41 | * Called when the {@link ItemTouchHelper} has completed the
42 | * move or swipe, and the active item state should be cleared.
43 | */
44 | void onItemClear();
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/Smartphone/src/main/java/eu/power_switch/gui/adapter/OnStartDragListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.gui.adapter;
20 |
21 | import android.support.v7.widget.RecyclerView;
22 |
23 | /**
24 | * Created by Markus on 25.10.2015.
25 | */
26 | public interface OnStartDragListener {
27 | /**
28 | * Called when a view is requesting a start of a drag.
29 | *
30 | * @param viewHolder The holder of the view to drag.
31 | */
32 | void onStartDrag(RecyclerView.ViewHolder viewHolder);
33 | }
34 |
--------------------------------------------------------------------------------
/Smartphone/src/main/java/eu/power_switch/gui/dialog/ConfigurationDialogFragment.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.gui.dialog;
20 |
21 | import android.content.Intent;
22 | import android.support.v4.app.Fragment;
23 | import android.support.v4.content.LocalBroadcastManager;
24 |
25 | import eu.power_switch.shared.constants.LocalBroadcastConstants;
26 |
27 | /**
28 | * Created by Markus on 25.03.2016.
29 | */
30 | public abstract class ConfigurationDialogFragment extends Fragment {
31 |
32 | /**
33 | * Used to notify parent Dialog that configuration has changed
34 | */
35 | public void notifyConfigurationChanged() {
36 | Intent intent = new Intent(LocalBroadcastConstants.INTENT_CONFIGURATION_DIALOG_CHANGED);
37 | LocalBroadcastManager.getInstance(getActivity()).sendBroadcast(intent);
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/Smartphone/src/main/java/eu/power_switch/gui/dialog/ConfigurationDialogTabbedSummaryFragment.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.gui.dialog;
20 |
21 | /**
22 | * Created by Markus on 29.01.2016.
23 | */
24 | public interface ConfigurationDialogTabbedSummaryFragment {
25 |
26 | /**
27 | * This method is called when the current configuration of a ConfigurationDialog shall be saved to database
28 | */
29 | void saveCurrentConfigurationToDatabase() throws Exception;
30 |
31 | /**
32 | * Checks the Setup page for validity
33 | *
34 | * @return true if valid, false otherwise
35 | */
36 | boolean checkSetupValidity();
37 | }
38 |
--------------------------------------------------------------------------------
/Smartphone/src/main/java/eu/power_switch/network/NetworkResponseCallback.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.network;
20 |
21 | /**
22 | * Interface used to send network response messages (received after request or from a sensor) to the requesting party
23 | *
24 | * Created by Markus on 18.01.2016.
25 | */
26 | public interface NetworkResponseCallback {
27 |
28 | /**
29 | * This Method is called when a response is received after a request has been sent to a gateway
30 | *
31 | * @param message response message
32 | */
33 | void receiveResponse(String message);
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/Smartphone/src/main/java/eu/power_switch/obj/HeatingControl.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.obj;
20 |
21 | /**
22 | * Created by Markus on 15.01.2016.
23 | */
24 | public interface HeatingControl {
25 |
26 | double getTargetTemperature();
27 |
28 | void setTargetTemperature(double targetTemperature) throws Exception;
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/Smartphone/src/main/java/eu/power_switch/obj/button/DownButton.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.obj.button;
20 |
21 | import android.content.Context;
22 |
23 | import eu.power_switch.R;
24 | import eu.power_switch.shared.constants.DatabaseConstants;
25 |
26 | /**
27 | * Created by Markus on 29.02.2016.
28 | */
29 | public class DownButton extends Button {
30 |
31 | /**
32 | * Constructor
33 | *
34 | * @param context any suitable context
35 | * @param receiverId ID of Receiver that this Button is associated with
36 | */
37 | public DownButton(Context context, Long receiverId) {
38 | super(DatabaseConstants.BUTTON_DOWN_ID, context.getString(R.string.down), receiverId);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Smartphone/src/main/java/eu/power_switch/obj/button/OffButton.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.obj.button;
20 |
21 | import android.content.Context;
22 |
23 | import eu.power_switch.R;
24 | import eu.power_switch.shared.constants.DatabaseConstants;
25 |
26 | /**
27 | * Created by Markus on 29.02.2016.
28 | */
29 | public class OffButton extends Button {
30 |
31 | /**
32 | * Constructor
33 | *
34 | * @param context any suitable context
35 | * @param receiverId ID of Receiver that this Button is associated with
36 | */
37 | public OffButton(Context context, Long receiverId) {
38 | super(DatabaseConstants.BUTTON_OFF_ID, context.getString(R.string.off), receiverId);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Smartphone/src/main/java/eu/power_switch/obj/button/OnButton.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.obj.button;
20 |
21 | import android.content.Context;
22 |
23 | import eu.power_switch.R;
24 | import eu.power_switch.shared.constants.DatabaseConstants;
25 |
26 | /**
27 | * Created by Markus on 29.02.2016.
28 | */
29 | public class OnButton extends Button {
30 |
31 | /**
32 | * Constructor
33 | *
34 | * @param context any suitable context
35 | * @param receiverId ID of Receiver that this Button is associated with
36 | */
37 | public OnButton(Context context, Long receiverId) {
38 | super(DatabaseConstants.BUTTON_ON_ID, context.getString(R.string.on), receiverId);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Smartphone/src/main/java/eu/power_switch/obj/button/StopButton.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.obj.button;
20 |
21 | import android.content.Context;
22 |
23 | import eu.power_switch.R;
24 | import eu.power_switch.shared.constants.DatabaseConstants;
25 |
26 | /**
27 | * Created by Markus on 29.02.2016.
28 | */
29 | public class StopButton extends Button {
30 |
31 | /**
32 | * Constructor
33 | *
34 | * @param context any suitable context
35 | * @param receiverId ID of Receiver that this Button is associated with
36 | */
37 | public StopButton(Context context, Long receiverId) {
38 | super(DatabaseConstants.BUTTON_STOP_ID, context.getString(R.string.stop), receiverId);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Smartphone/src/main/java/eu/power_switch/obj/button/UpButton.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.obj.button;
20 |
21 | import android.content.Context;
22 |
23 | import eu.power_switch.R;
24 | import eu.power_switch.shared.constants.DatabaseConstants;
25 |
26 | /**
27 | * Created by Markus on 29.02.2016.
28 | */
29 | public class UpButton extends Button {
30 |
31 | /**
32 | * Constructor
33 | *
34 | * @param context any suitable context
35 | * @param receiverId ID of Receiver that this Button is associated with
36 | */
37 | public UpButton(Context context, Long receiverId) {
38 | super(DatabaseConstants.BUTTON_UP_ID, context.getString(R.string.up), receiverId);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Smartphone/src/main/java/eu/power_switch/obj/gateway/RaspyRFM.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.obj.gateway;
20 |
21 | import java.util.Set;
22 |
23 | /**
24 | * RaspyRFM represents a RasperyPi ConnAir emulator Gateway
25 | */
26 | public class RaspyRFM extends ConnAir {
27 |
28 | /**
29 | * Model constant
30 | */
31 | public static final String MODEL = "RaspyRFM";
32 |
33 | public RaspyRFM(Long id, boolean active, String name, String firmware, String localAddress, int localPort, String wanAddress, int wanPort, Set ssids) {
34 | super(id, active, name, firmware, localAddress, localPort, wanAddress, wanPort, ssids);
35 | model = MODEL;
36 | }
37 |
38 | }
--------------------------------------------------------------------------------
/Smartphone/src/main/java/eu/power_switch/obj/receiver/AutoPairReceiver.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.obj.receiver;
20 |
21 | /**
22 | * Interface all AutoPair Receivers have to implement
23 | */
24 | public interface AutoPairReceiver {
25 |
26 | long getSeed();
27 |
28 | }
--------------------------------------------------------------------------------
/Smartphone/src/main/java/eu/power_switch/obj/receiver/DipReceiver.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.obj.receiver;
20 |
21 | import java.util.LinkedList;
22 | import java.util.List;
23 |
24 | /**
25 | * Interface all Dip Receivers have to implement
26 | */
27 | public interface DipReceiver {
28 |
29 | /**
30 | * Get a list of all Dips
31 | *
32 | * @return list of Dips
33 | */
34 | LinkedList getDips();
35 |
36 | /**
37 | * Get a list of all Dip names
38 | *
39 | * @return list of Dip names
40 | */
41 | List getDipNames();
42 | }
43 |
--------------------------------------------------------------------------------
/Smartphone/src/main/java/eu/power_switch/obj/receiver/device/intertek/Model_1919361.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.obj.receiver.device.intertek;
20 |
21 | import android.content.Context;
22 |
23 | import java.util.LinkedList;
24 |
25 | import eu.power_switch.obj.receiver.DipReceiver;
26 | import eu.power_switch.obj.receiver.Receiver;
27 | import eu.power_switch.obj.receiver.device.elro.AB440SC;
28 |
29 | public class Model_1919361 extends AB440SC implements DipReceiver {
30 |
31 | private static final Brand BRAND = Brand.INTERTEK;
32 | private static final String MODEL = Receiver.getModelName(Model_1919361.class.getCanonicalName());
33 |
34 | public Model_1919361(Context context, Long id, String name, LinkedList dips, Long roomId) {
35 | super(context, id, name, dips, roomId);
36 | brand = BRAND;
37 | model = MODEL;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/Smartphone/src/main/java/eu/power_switch/obj/sensor/Sensor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.obj.sensor;
20 |
21 | /**
22 | * This class represents a network device that is only able to broadcast data to the smartphone application, like a
23 | * temperature sensor, light intensity sensor etc.
24 | *
25 | * Created by Markus on 15.01.2016.
26 | */
27 | public abstract class Sensor {
28 |
29 | /**
30 | * ID of this Sensor
31 | */
32 | Long id;
33 |
34 | /**
35 | * Constructor
36 | *
37 | * @param id ID of this Sensor
38 | */
39 | public Sensor(Long id) {
40 | this.id = id;
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/anim/button_elevation.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
24 |
30 |
31 |
32 |
38 |
39 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/anim/rotate_right_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/anim/slide_in_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
25 |
29 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/anim/slide_out_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
25 |
29 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Power-Switch/PowerSwitch_Android/54400f74230bb78f87b19cc89c0f174e080a3fa7/Smartphone/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Smartphone/src/main/res/drawable-ldpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Power-Switch/PowerSwitch_Android/54400f74230bb78f87b19cc89c0f174e080a3fa7/Smartphone/src/main/res/drawable-ldpi/ic_launcher.png
--------------------------------------------------------------------------------
/Smartphone/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Power-Switch/PowerSwitch_Android/54400f74230bb78f87b19cc89c0f174e080a3fa7/Smartphone/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Smartphone/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Power-Switch/PowerSwitch_Android/54400f74230bb78f87b19cc89c0f174e080a3fa7/Smartphone/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Smartphone/src/main/res/drawable/header_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Power-Switch/PowerSwitch_Android/54400f74230bb78f87b19cc89c0f174e080a3fa7/Smartphone/src/main/res/drawable/header_background.png
--------------------------------------------------------------------------------
/Smartphone/src/main/res/drawable/widget_shape.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
25 |
26 |
27 |
28 |
33 |
34 |
37 |
38 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/layout/default_switch_compat.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/layout/dialog_about.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
29 |
30 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/layout/dialog_add_action.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/layout/dialog_apartment_chooser.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
29 |
30 |
34 |
35 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/layout/dialog_configuration.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
25 |
26 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/layout/dialog_fragment_configure_scene_page_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/layout/fragment_apartment.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/layout/fragment_apartment_geofences.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/layout/fragment_call_events.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/layout/fragment_custom_geofences.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/layout/fragment_rooms.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/layout/fragment_scenes.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/layout/fragment_timers.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/layout/list_footer.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/layout/list_item_folder.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
29 |
30 |
36 |
37 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/layout/list_item_receiver.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
26 |
27 |
34 |
35 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/layout/loading.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
26 |
27 |
32 |
33 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/layout/simple_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/layout/simple_checkbox.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/layout/toolbar.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/layout/widget_receiver_button_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/menu/apartment_fragment_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/menu/apartment_geofences_fragment_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/menu/backup_fragment_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/menu/custom_geofences_fragment_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/menu/gateway_fragment_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/menu/room_fragment_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/menu/scene_fragment_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/menu/sleep_as_android_fragment_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/menu/timer_fragment_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/values-sw1100dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
18 |
19 |
20 |
21 | 3
22 | 3
23 | 3
24 | 3
25 | 3
26 | 3
27 | 3
28 | 3
29 |
30 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/values-sw740dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
18 |
19 |
20 |
21 | 2
22 | 2
23 | 2
24 | 2
25 | 2
26 | 2
27 | 2
28 | 2
29 |
30 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/values-v19/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
25 |
26 |
29 |
30 |
33 |
34 |
37 |
38 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/values/wear.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 | @string/RECEIVER_ACTION_TRIGGER_CAPABILITY_NAME
23 | @string/REQUEST_DATA_UPDATE_CAPABILITY_NAME
24 | @string/DATA_EXCHANGE_CAPABILITY_NAME
25 |
26 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/xml/receiver_widget_info.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/xml/room_widget_info.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
--------------------------------------------------------------------------------
/Smartphone/src/main/res/xml/scene_widget_info.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
--------------------------------------------------------------------------------
/Wearable/lint.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Wearable/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in F:\Android SDK for Android Studio/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | -dontobfuscate
--------------------------------------------------------------------------------
/Wearable/src/main/java/eu/power_switch/obj/Scene.java:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package eu.power_switch.obj;
20 |
21 | import java.io.Serializable;
22 |
23 | /**
24 | * Created by Markus on 11.07.2015.
25 | */
26 | public class Scene implements Serializable {
27 |
28 | private long id;
29 | private String name;
30 |
31 | public Scene(long id, String name) {
32 | this.id = id;
33 | this.name = name;
34 | }
35 |
36 | public long getId() {
37 | return id;
38 | }
39 |
40 | public String getName() {
41 | return name;
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/Wearable/src/main/res/drawable-hdpi/wearable_ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Power-Switch/PowerSwitch_Android/54400f74230bb78f87b19cc89c0f174e080a3fa7/Wearable/src/main/res/drawable-hdpi/wearable_ic_launcher.png
--------------------------------------------------------------------------------
/Wearable/src/main/res/drawable-ldpi/wearable_ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Power-Switch/PowerSwitch_Android/54400f74230bb78f87b19cc89c0f174e080a3fa7/Wearable/src/main/res/drawable-ldpi/wearable_ic_launcher.png
--------------------------------------------------------------------------------
/Wearable/src/main/res/drawable-mdpi/wearable_ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Power-Switch/PowerSwitch_Android/54400f74230bb78f87b19cc89c0f174e080a3fa7/Wearable/src/main/res/drawable-mdpi/wearable_ic_launcher.png
--------------------------------------------------------------------------------
/Wearable/src/main/res/drawable-xhdpi/wearable_ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Power-Switch/PowerSwitch_Android/54400f74230bb78f87b19cc89c0f174e080a3fa7/Wearable/src/main/res/drawable-xhdpi/wearable_ic_launcher.png
--------------------------------------------------------------------------------
/Wearable/src/main/res/layout/activity_receivers__rect.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
28 |
29 |
33 |
34 |
--------------------------------------------------------------------------------
/Wearable/src/main/res/layout/activity_receivers__round.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
28 |
29 |
33 |
34 |
--------------------------------------------------------------------------------
/Wearable/src/main/res/layout/activity_rooms__rect.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
28 |
29 |
30 |
31 |
35 |
36 |
--------------------------------------------------------------------------------
/Wearable/src/main/res/layout/activity_rooms__round.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
28 |
29 |
30 |
31 |
35 |
36 |
--------------------------------------------------------------------------------
/Wearable/src/main/res/layout/activity_scenes__rect.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
28 |
29 |
30 |
31 |
35 |
36 |
--------------------------------------------------------------------------------
/Wearable/src/main/res/layout/activity_scenes__round.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
28 |
29 |
30 |
31 |
35 |
36 |
--------------------------------------------------------------------------------
/Wearable/src/main/res/layout/ambient_mode.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
28 |
29 |
35 |
36 |
--------------------------------------------------------------------------------
/Wearable/src/main/res/layout/list_footer.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
--------------------------------------------------------------------------------
/Wearable/src/main/res/layout/list_item_room.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
--------------------------------------------------------------------------------
/Wearable/src/main/res/layout/standard_button_wear.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
--------------------------------------------------------------------------------
/Wearable/src/main/res/values-v19/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
25 |
26 |
29 |
30 |
33 |
34 |
37 |
38 |
--------------------------------------------------------------------------------
/Wearable/src/main/res/values/dimen.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 | 8dp
23 | 8dp
24 | 32dp
25 | 4dp
26 | 20dp
27 | 8dp
28 | 16dp
29 | 4dp
30 | 40dp
31 | 48dp
32 | 24sp
33 |
34 |
--------------------------------------------------------------------------------
/Wearable/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
18 |
19 |
20 | Smartphone not connected
21 | Please create Receivers on your Smartphone first
22 |
23 | Use Home Button to Exit
24 |
25 |
--------------------------------------------------------------------------------
/Wearable/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/_ressources/database.dia:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Power-Switch/PowerSwitch_Android/54400f74230bb78f87b19cc89c0f174e080a3fa7/_ressources/database.dia
--------------------------------------------------------------------------------
/_ressources/database.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Power-Switch/PowerSwitch_Android/54400f74230bb78f87b19cc89c0f174e080a3fa7/_ressources/database.png
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
20 | buildscript {
21 | repositories {
22 | jcenter()
23 | maven { url "https://jitpack.io" }
24 | }
25 | dependencies {
26 | classpath 'com.android.tools.build:gradle:2.1.0-beta1'
27 | }
28 | }
29 |
30 | allprojects {
31 | repositories {
32 | jcenter()
33 | maven { url "https://jitpack.io" }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #
2 | # PowerSwitch by Max Rosin & Markus Ressel
3 | # Copyright (C) 2015 Markus Ressel
4 | #
5 | # This program is free software: you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation, either version 3 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | #
18 |
19 | #Fri Jan 15 14:13:33 CET 2016
20 | distributionBase=GRADLE_USER_HOME
21 | distributionPath=wrapper/dists
22 | zipStoreBase=GRADLE_USER_HOME
23 | zipStorePath=wrapper/dists
24 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
25 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * PowerSwitch by Max Rosin & Markus Ressel
3 | * Copyright (C) 2015 Markus Ressel
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | include ':library'
20 | project(':library').projectDir = new File(settingsDir, '../MaterialShowcaseView/library')
21 | include ':Shared', ':LocaleApi', ':Wearable', ':Smartphone'
--------------------------------------------------------------------------------