diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000..681f41a
--- /dev/null
+++ b/.idea/codeStyles/Project.xml
@@ -0,0 +1,116 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ xmlns:android
+
+ ^$
+
+
+
+
+
+
+
+
+ xmlns:.*
+
+ ^$
+
+
+ BY_NAME
+
+
+
+
+
+
+ .*:id
+
+ http://schemas.android.com/apk/res/android
+
+
+
+
+
+
+
+
+ .*:name
+
+ http://schemas.android.com/apk/res/android
+
+
+
+
+
+
+
+
+ name
+
+ ^$
+
+
+
+
+
+
+
+
+ style
+
+ ^$
+
+
+
+
+
+
+
+
+ .*
+
+ ^$
+
+
+ BY_NAME
+
+
+
+
+
+
+ .*
+
+ http://schemas.android.com/apk/res/android
+
+
+ ANDROID_ATTRIBUTE_ORDER
+
+
+
+
+
+
+ .*
+
+ .*
+
+
+ BY_NAME
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
index 999426f..91d0b88 100644
--- a/.idea/copyright/profiles_settings.xml
+++ b/.idea/copyright/profiles_settings.xml
@@ -1,5 +1,8 @@
+
+
+
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 635999d..ba7052b 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -24,7 +24,7 @@
-
+
diff --git a/app/build.gradle b/app/build.gradle
index 499f9f8..baece1b 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,15 +1,32 @@
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
+
apply plugin: 'com.android.application'
android {
- compileSdkVersion 29
+ compileSdkVersion 26
buildToolsVersion '28.0.3'
defaultConfig {
- applicationId "tomikaa.greeremote"
+ applicationId "hu.czompisoftware.greecontrol"
minSdkVersion 15
- targetSdkVersion 29
+ targetSdkVersion 26
versionCode 1
versionName "1.0"
- testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
@@ -26,15 +43,15 @@ android {
}
dependencies {
- implementation fileTree(include: ['*.jar'], dir: 'libs')
- androidTestCompile('androidx.test.espresso:espresso-core:3.1.0', {
+ compile fileTree(include: ['*.jar'], dir: 'libs')
+ androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
- implementation 'androidx.appcompat:appcompat:1.2.0'
- implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
- implementation 'com.google.android.material:material:1.2.1'
- implementation 'com.google.code.gson:gson:2.8.6'
- implementation 'androidx.legacy:legacy-support-v4:1.0.0'
- implementation 'androidx.recyclerview:recyclerview:1.1.0'
- testImplementation 'junit:junit:4.12'
+ compile 'com.android.support:appcompat-v7:26.1.0'
+ compile 'com.android.support.constraint:constraint-layout:1.0.2'
+ compile 'com.android.support:design:26.1.0'
+ compile 'com.google.code.gson:gson:2.8.0'
+ compile 'com.android.support:support-v4:26.1.0'
+ compile 'com.android.support:recyclerview-v7:26.1.0'
+ testCompile 'junit:junit:4.12'
}
diff --git a/app/debug/output.json b/app/debug/output.json
new file mode 100644
index 0000000..dc2b161
--- /dev/null
+++ b/app/debug/output.json
@@ -0,0 +1 @@
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0","enabled":true,"outputFile":"app-debug.apk","fullName":"debug","baseName":"debug","dirName":""},"path":"app-debug.apk","properties":{}}]
\ No newline at end of file
diff --git a/app/release/output.json b/app/release/output.json
new file mode 100644
index 0000000..fb6688e
--- /dev/null
+++ b/app/release/output.json
@@ -0,0 +1 @@
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release","dirName":""},"path":"app-release.apk","properties":{}}]
\ No newline at end of file
diff --git a/app/src/androidTest/java/hu/czompisoftware/greecontrol/ExampleInstrumentedTest.java b/app/src/androidTest/java/hu/czompisoftware/greecontrol/ExampleInstrumentedTest.java
new file mode 100644
index 0000000..aa8093d
--- /dev/null
+++ b/app/src/androidTest/java/hu/czompisoftware/greecontrol/ExampleInstrumentedTest.java
@@ -0,0 +1,43 @@
+package hu.czompisoftware.greecontrol;
+
+import android.content.Context;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.*;
+
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
+
+/**
+ * Instrumentation test, which will execute on an Android device.
+ *
+ * @see Testing documentation
+ */
+@RunWith(AndroidJUnit4.class)
+public class ExampleInstrumentedTest {
+ @Test
+ public void useAppContext() throws Exception {
+ // Context of the app under test.
+ Context appContext = InstrumentationRegistry.getTargetContext();
+
+ assertEquals("hu.czompisoftware.greecontrol", appContext.getPackageName());
+ }
+}
diff --git a/app/src/androidTest/java/tomikaa/greeremote/ExampleInstrumentedTest.java b/app/src/androidTest/java/tomikaa/greeremote/ExampleInstrumentedTest.java
deleted file mode 100644
index dd6f1bb..0000000
--- a/app/src/androidTest/java/tomikaa/greeremote/ExampleInstrumentedTest.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package tomikaa.greeremote;
-
-import android.content.Context;
-import androidx.test.platform.app.InstrumentationRegistry;
-import androidx.test.ext.junit.runners.AndroidJUnit4;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import static org.junit.Assert.*;
-
-/**
- * Instrumentation test, which will execute on an Android device.
- *
- * @see Testing documentation
- */
-@RunWith(AndroidJUnit4.class)
-public class ExampleInstrumentedTest {
- @Test
- public void useAppContext() throws Exception {
- // Context of the app under test.
- Context appContext = InstrumentationRegistry.getTargetContext();
-
- assertEquals("tomikaa.greeremote", appContext.getPackageName());
- }
-}
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 870339e..af5c2be 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -1,11 +1,25 @@
+
+
+ package="hu.czompisoftware.greecontrol">
-
-
-
@@ -26,11 +40,11 @@
-
+
\ No newline at end of file
diff --git a/app/src/main/java/tomikaa/greeremote/DeviceActivity.java b/app/src/main/java/hu/czompisoftware/greecontrol/DeviceActivity.java
similarity index 83%
rename from app/src/main/java/tomikaa/greeremote/DeviceActivity.java
rename to app/src/main/java/hu/czompisoftware/greecontrol/DeviceActivity.java
index f9e08a8..2c8ee61 100644
--- a/app/src/main/java/tomikaa/greeremote/DeviceActivity.java
+++ b/app/src/main/java/hu/czompisoftware/greecontrol/DeviceActivity.java
@@ -1,28 +1,37 @@
-package tomikaa.greeremote;
+package hu.czompisoftware.greecontrol;
-import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
-import android.util.Log;
-import android.view.LayoutInflater;
+import android.support.v4.content.res.ResourcesCompat;
+import android.support.v7.app.AppCompatActivity;
import android.view.Menu;
-import android.view.MenuItem;
import android.view.View;
import android.widget.ImageButton;
import android.widget.SeekBar;
import android.widget.Switch;
import android.widget.TextView;
-import androidx.annotation.NonNull;
-import androidx.appcompat.app.AlertDialog;
-import androidx.appcompat.app.AppCompatActivity;
-import androidx.core.content.res.ResourcesCompat;
+import hu.czompisoftware.greecontrol.Gree.Device.Device;
+import hu.czompisoftware.greecontrol.Gree.Device.DeviceManager;
+import hu.czompisoftware.greecontrol.Gree.Device.DeviceManagerEventListener;
+import hu.czompisoftware.greecontrol.R;
-import com.google.android.material.textfield.TextInputEditText;
-
-import tomikaa.greeremote.Gree.Device.Device;
-import tomikaa.greeremote.Gree.Device.DeviceManager;
-import tomikaa.greeremote.Gree.Device.DeviceManagerEventListener;
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
/*
* This file is part of GreeRemoteAndroid.
@@ -51,7 +60,7 @@ public class DeviceActivity extends AppCompatActivity {
private Device mDevice;
private DeviceManagerEventListener mDeviceManagerEventListener;
- public static String EXTRA_FEATURE_HELP = "tomikaa.greeremote.FEATURE_HELP";
+ public static String EXTRA_FEATURE_HELP = "hu.czompisoftware.greecontrol.FEATURE_HELP";
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -246,25 +255,6 @@ private boolean isSwitchChecked(int id) {
return false;
}
- @Override
- public boolean onOptionsItemSelected(@NonNull MenuItem item) {
- if(item.getItemId() == R.id.wifi_settings){
- final View usernamePasswordView = LayoutInflater.from(this).inflate(R.layout.username_password_dialog, null);
- new AlertDialog.Builder(this).setView(usernamePasswordView)
- .setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- TextInputEditText name = usernamePasswordView.findViewById(R.id.name);
- TextInputEditText password = usernamePasswordView.findViewById(R.id.password);
- Log.d("uriel",name.getText().toString() + " " + password.getText().toString());
- mDevice.setWifiSsidPassword(name.getText().toString(),password.getText().toString());
- }
- }).create().show();
-
- }
- return true;
- }
-
private void setupFanSpeedSeekBarChangeListener() {
((SeekBar) findViewById(R.id.fanSpeedSeekBar)).setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
diff --git a/app/src/main/java/tomikaa/greeremote/DeviceHelpActivity.java b/app/src/main/java/hu/czompisoftware/greecontrol/DeviceHelpActivity.java
similarity index 75%
rename from app/src/main/java/tomikaa/greeremote/DeviceHelpActivity.java
rename to app/src/main/java/hu/czompisoftware/greecontrol/DeviceHelpActivity.java
index a7ed95f..5315aa4 100644
--- a/app/src/main/java/tomikaa/greeremote/DeviceHelpActivity.java
+++ b/app/src/main/java/hu/czompisoftware/greecontrol/DeviceHelpActivity.java
@@ -1,8 +1,26 @@
-package tomikaa.greeremote;
+package hu.czompisoftware.greecontrol;
+import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
-import androidx.appcompat.app.AppCompatActivity;
+import hu.czompisoftware.greecontrol.R;
+
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
/*
* This file is part of GreeRemoteAndroid.
diff --git a/app/src/main/java/tomikaa/greeremote/DeviceItem.java b/app/src/main/java/hu/czompisoftware/greecontrol/DeviceItem.java
similarity index 65%
rename from app/src/main/java/tomikaa/greeremote/DeviceItem.java
rename to app/src/main/java/hu/czompisoftware/greecontrol/DeviceItem.java
index e0add36..d47526b 100644
--- a/app/src/main/java/tomikaa/greeremote/DeviceItem.java
+++ b/app/src/main/java/hu/czompisoftware/greecontrol/DeviceItem.java
@@ -1,8 +1,25 @@
-package tomikaa.greeremote;
+package hu.czompisoftware.greecontrol;
import java.io.Serializable;
-import tomikaa.greeremote.Gree.Device.Device;
+import hu.czompisoftware.greecontrol.Gree.Device.Device;
+
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
/*
* This file is part of GreeRemoteAndroid.
diff --git a/app/src/main/java/tomikaa/greeremote/DeviceItemFragment.java b/app/src/main/java/hu/czompisoftware/greecontrol/DeviceItemFragment.java
similarity index 81%
rename from app/src/main/java/tomikaa/greeremote/DeviceItemFragment.java
rename to app/src/main/java/hu/czompisoftware/greecontrol/DeviceItemFragment.java
index 4bd8087..fcbf428 100644
--- a/app/src/main/java/tomikaa/greeremote/DeviceItemFragment.java
+++ b/app/src/main/java/hu/czompisoftware/greecontrol/DeviceItemFragment.java
@@ -1,23 +1,23 @@
-package tomikaa.greeremote;
+package hu.czompisoftware.greecontrol;
import android.content.Context;
import android.os.Bundle;
+import android.support.v4.app.Fragment;
+import android.support.v7.widget.DividerItemDecoration;
+import android.support.v7.widget.GridLayoutManager;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
-import androidx.fragment.app.Fragment;
-import androidx.recyclerview.widget.DividerItemDecoration;
-import androidx.recyclerview.widget.GridLayoutManager;
-import androidx.recyclerview.widget.LinearLayoutManager;
-import androidx.recyclerview.widget.RecyclerView;
-
import java.util.ArrayList;
import java.util.List;
-import tomikaa.greeremote.Gree.Device.Device;
-import tomikaa.greeremote.Gree.Device.DeviceManager;
-import tomikaa.greeremote.Gree.Device.DeviceManagerEventListener;
+import hu.czompisoftware.greecontrol.Gree.Device.Device;
+import hu.czompisoftware.greecontrol.Gree.Device.DeviceManager;
+import hu.czompisoftware.greecontrol.Gree.Device.DeviceManagerEventListener;
+import hu.czompisoftware.greecontrol.R;
/*
* This file is part of GreeRemoteAndroid.
@@ -40,6 +40,23 @@
* Created by tomikaa87 on 2017-10-23.
*/
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
+
/**
* A fragment representing a list of Items.
*
diff --git a/app/src/main/java/tomikaa/greeremote/Gree/Crypto.java b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Crypto.java
similarity index 74%
rename from app/src/main/java/tomikaa/greeremote/Gree/Crypto.java
rename to app/src/main/java/hu/czompisoftware/greecontrol/Gree/Crypto.java
index 8abb44a..28d205c 100644
--- a/app/src/main/java/tomikaa/greeremote/Gree/Crypto.java
+++ b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Crypto.java
@@ -1,4 +1,4 @@
-package tomikaa.greeremote.Gree;
+package hu.czompisoftware.greecontrol.Gree;
import android.util.Base64;
import android.util.Log;
@@ -6,6 +6,23 @@
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
+
/*
* This file is part of GreeRemoteAndroid.
*
diff --git a/app/src/main/java/tomikaa/greeremote/Gree/Deserializers/PackDeserializer.java b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Deserializers/PackDeserializer.java
similarity index 66%
rename from app/src/main/java/tomikaa/greeremote/Gree/Deserializers/PackDeserializer.java
rename to app/src/main/java/hu/czompisoftware/greecontrol/Gree/Deserializers/PackDeserializer.java
index 87e1671..57dbe6c 100644
--- a/app/src/main/java/tomikaa/greeremote/Gree/Deserializers/PackDeserializer.java
+++ b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Deserializers/PackDeserializer.java
@@ -1,12 +1,13 @@
-package tomikaa.greeremote.Gree.Deserializers;
-
-import tomikaa.greeremote.Gree.Packs.BindOkPack;
-import tomikaa.greeremote.Gree.Packs.BindPack;
-import tomikaa.greeremote.Gree.Packs.DatPack;
-import tomikaa.greeremote.Gree.Packs.DevicePack;
-import tomikaa.greeremote.Gree.Packs.Pack;
-import tomikaa.greeremote.Gree.Packs.ResultPack;
-import tomikaa.greeremote.Gree.Packs.StatusPack;
+package hu.czompisoftware.greecontrol.Gree.Deserializers;
+
+import hu.czompisoftware.greecontrol.Gree.Packs.BindOkPack;
+import hu.czompisoftware.greecontrol.Gree.Packs.BindPack;
+import hu.czompisoftware.greecontrol.Gree.Packs.DatPack;
+import hu.czompisoftware.greecontrol.Gree.Packs.DevicePack;
+import hu.czompisoftware.greecontrol.Gree.Packs.Pack;
+import hu.czompisoftware.greecontrol.Gree.Packs.ResultPack;
+import hu.czompisoftware.greecontrol.Gree.Packs.StatusPack;
+
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
@@ -15,6 +16,23 @@
import java.lang.reflect.Type;
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
+
/*
* This file is part of GreeRemoteAndroid.
*
diff --git a/app/src/main/java/tomikaa/greeremote/Gree/Device/Device.java b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Device/Device.java
similarity index 77%
rename from app/src/main/java/tomikaa/greeremote/Gree/Device/Device.java
rename to app/src/main/java/hu/czompisoftware/greecontrol/Gree/Device/Device.java
index 2b011a9..60b8a9f 100644
--- a/app/src/main/java/tomikaa/greeremote/Gree/Device/Device.java
+++ b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Device/Device.java
@@ -1,4 +1,21 @@
-package tomikaa.greeremote.Gree.Device;
+package hu.czompisoftware.greecontrol.Gree.Device;
+
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
/*
* This file is part of GreeRemoteAndroid.
@@ -63,64 +80,47 @@ enum VerticalSwingMode {
String getId();
String getName();
-
void setName(String name);
Mode getMode();
-
void setMode(Mode mode);
FanSpeed getFanSpeed();
-
void setFanSpeed(FanSpeed fanSpeed);
int getTemperature();
-
void setTemperature(int value, TemperatureUnit unit);
boolean isPoweredOn();
-
void setPoweredOn(boolean poweredOn);
boolean isLightEnabled();
-
void setLightEnabled(boolean enabled);
boolean isQuietModeEnabled();
-
void setQuietModeEnabled(boolean enabled);
boolean isTurboModeEnabled();
-
void setTurboModeEnabled(boolean enabled);
boolean isHealthModeEnabled();
-
void setHealthModeEnabled(boolean enabled);
boolean isAirModeEnabled();
-
void setAirModeEnabled(boolean enabled);
boolean isXfanModeEnabled();
-
void setXfanModeEnabled(boolean enabled);
boolean isSavingModeEnabled();
-
void setSavingModeEnabled(boolean enabled);
boolean isSleepModeEnabled();
-
void setSleepModeEnabled(boolean enabled);
VerticalSwingMode getVerticalSwingMode();
-
void setVerticalSwingMode(VerticalSwingMode mode);
int getParameter(String name);
-
void setParameter(String name, int value);
-
- void setWifiSsidPassword(String ssid, String psw);
}
diff --git a/app/src/main/java/tomikaa/greeremote/Gree/Device/DeviceImpl.java b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Device/DeviceImpl.java
similarity index 82%
rename from app/src/main/java/tomikaa/greeremote/Gree/Device/DeviceImpl.java
rename to app/src/main/java/hu/czompisoftware/greecontrol/Gree/Device/DeviceImpl.java
index ceec4b9..681c821 100644
--- a/app/src/main/java/tomikaa/greeremote/Gree/Device/DeviceImpl.java
+++ b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Device/DeviceImpl.java
@@ -1,13 +1,30 @@
-package tomikaa.greeremote.Gree.Device;
+package hu.czompisoftware.greecontrol.Gree.Device;
import android.util.Log;
import java.util.Map;
-import tomikaa.greeremote.Gree.Packs.DatPack;
-import tomikaa.greeremote.Gree.Packs.DevicePack;
-import tomikaa.greeremote.Gree.Packs.ResultPack;
-import tomikaa.greeremote.Gree.Utils;
+import hu.czompisoftware.greecontrol.Gree.Packs.DatPack;
+import hu.czompisoftware.greecontrol.Gree.Packs.DevicePack;
+import hu.czompisoftware.greecontrol.Gree.Packs.ResultPack;
+import hu.czompisoftware.greecontrol.Gree.Utils;
+
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
/*
* This file is part of GreeRemoteAndroid.
@@ -36,24 +53,25 @@ class DeviceImpl implements Device {
private final String mLogTag;
public enum Parameter {
- POWER("Pow"),
- MODE("Mod"),
- TEMPERATURE("SetTem"),
- TEMPERATURE_UNIT("TemUn"),
- FAN_SPEED("WdSpd"),
- AIR_MODE("Air"),
- XFAN_MODE("Blo"),
- HEALTH_MODE("Health"),
- SLEEP_MODE("SwhSlp"),
- QUIET_MODE("Quiet"),
- TURBO_MODE("Tur"),
- SAVING_MODE("SvSt"),
- LIGHT("Lig"),
- HORIZONTAL_SWING("SwingLfRig"),
- VERTICAL_SWING("SwUpDn"),
- STHT_MODE("StHt"),
- HEAT_COOL_TYPE("HeatCoolType"),
- TEM_REC_MODE("TemRec");
+ POWER ("Pow"),
+ MODE ("Mod"),
+ TEMPERATURE ("SetTem"),
+ TEMPERATURE_UNIT ("TemUn"),
+ FAN_SPEED ("WdSpd"),
+ AIR_MODE ("Air"),
+ XFAN_MODE ("Blo"),
+ HEALTH_MODE ("Health"),
+ SLEEP_MODE ("SwhSlp"),
+ QUIET_MODE ("Quiet"),
+ TURBO_MODE ("Tur"),
+ SAVING_MODE ("SvSt"),
+ LIGHT ("Lig"),
+ HORIZONTAL_SWING ("SwingLfRig"),
+ VERTICAL_SWING ("SwUpDn"),
+ STHT_MODE ("StHt"),
+ HEAT_COOL_TYPE ("HeatCoolType"),
+ TEM_REC_MODE ("TemRec")
+ ;
private final String mParam;
@@ -146,8 +164,8 @@ public int getTemperature() {
@Override
public void setTemperature(int value, TemperatureUnit unit) {
setParameters(
- new Parameter[]{Parameter.TEMPERATURE, Parameter.TEMPERATURE_UNIT},
- new Integer[]{value, unit.ordinal()}
+ new Parameter[] { Parameter.TEMPERATURE, Parameter.TEMPERATURE_UNIT },
+ new Integer[] { value, unit.ordinal() }
);
}
@@ -261,11 +279,6 @@ public void setParameter(String name, int value) {
mDeviceManager.setParameter(this, name, value);
}
- @Override
- public void setWifiSsidPassword(String ssid, String psw) {
- mDeviceManager.setWifi(ssid, psw);
- }
-
@Override
public boolean equals(Object o) {
if (this == o) return true;
diff --git a/app/src/main/java/tomikaa/greeremote/Gree/Device/DeviceManager.java b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Device/DeviceManager.java
similarity index 82%
rename from app/src/main/java/tomikaa/greeremote/Gree/Device/DeviceManager.java
rename to app/src/main/java/hu/czompisoftware/greecontrol/Gree/Device/DeviceManager.java
index 51fef35..2d37c6f 100644
--- a/app/src/main/java/tomikaa/greeremote/Gree/Device/DeviceManager.java
+++ b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Device/DeviceManager.java
@@ -1,4 +1,4 @@
-package tomikaa.greeremote.Gree.Device;
+package hu.czompisoftware.greecontrol.Gree.Device;
import android.util.Log;
@@ -7,20 +7,36 @@
import java.util.HashMap;
import java.util.Map;
-import tomikaa.greeremote.Gree.Network.AsyncCommunicationFinishedListener;
-import tomikaa.greeremote.Gree.Network.AsyncCommunicator;
-import tomikaa.greeremote.Gree.Network.DeviceKeyChain;
-import tomikaa.greeremote.Gree.Packets.AppPacket;
-import tomikaa.greeremote.Gree.Packets.Packet;
-import tomikaa.greeremote.Gree.Packets.ScanPacket;
-import tomikaa.greeremote.Gree.Packs.BindOkPack;
-import tomikaa.greeremote.Gree.Packs.BindPack;
-import tomikaa.greeremote.Gree.Packs.CommandPack;
-import tomikaa.greeremote.Gree.Packs.DatPack;
-import tomikaa.greeremote.Gree.Packs.DevicePack;
-import tomikaa.greeremote.Gree.Packs.ResultPack;
-import tomikaa.greeremote.Gree.Packs.StatusPack;
-import tomikaa.greeremote.Gree.Packs.WifiSettingsPack;
+import hu.czompisoftware.greecontrol.Gree.Network.AsyncCommunicationFinishedListener;
+import hu.czompisoftware.greecontrol.Gree.Network.AsyncCommunicator;
+import hu.czompisoftware.greecontrol.Gree.Network.DeviceKeyChain;
+import hu.czompisoftware.greecontrol.Gree.Packets.AppPacket;
+import hu.czompisoftware.greecontrol.Gree.Packets.Packet;
+import hu.czompisoftware.greecontrol.Gree.Packets.ScanPacket;
+import hu.czompisoftware.greecontrol.Gree.Packs.BindOkPack;
+import hu.czompisoftware.greecontrol.Gree.Packs.BindPack;
+import hu.czompisoftware.greecontrol.Gree.Packs.CommandPack;
+import hu.czompisoftware.greecontrol.Gree.Packs.DatPack;
+import hu.czompisoftware.greecontrol.Gree.Packs.DevicePack;
+import hu.czompisoftware.greecontrol.Gree.Packs.ResultPack;
+import hu.czompisoftware.greecontrol.Gree.Packs.StatusPack;
+
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
/*
* This file is part of GreeRemoteAndroid.
@@ -127,35 +143,6 @@ public void onFinished() {
comm.execute(new Packet[] { packet });
}
-
- public void setWifi(String ssid, String psw){
-
- WifiSettingsPack packet = new WifiSettingsPack();
- packet.psw = psw;
- packet.ssid = ssid;
-
- final AsyncCommunicator comm = new AsyncCommunicator(mKeyChain);
- comm.setCommunicationFinishedListener(new AsyncCommunicationFinishedListener() {
- @Override
- public void onFinished() {
- try {
- final Packet[] responses = comm.get();
-
- for (Packet response : responses) {
- if (mDevices.containsKey(response.cid)) {
- mDevices.get(response.cid).updateWithResultPack((ResultPack) response.pack);
- }
- }
-
- sendEvent(DeviceManagerEventListener.Event.DEVICE_STATUS_UPDATED);
- } catch (Exception e) {
- Log.e(LOG_TAG, "Failed to get response of command. Error: " + e.getMessage());
- }
- }
- });
- comm.execute(new Packet[] { packet });
- }
-
public void discoverDevices() {
Log.i(LOG_TAG, "Device discovery running...");
diff --git a/app/src/main/java/tomikaa/greeremote/Gree/Device/DeviceManagerEventListener.java b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Device/DeviceManagerEventListener.java
similarity index 55%
rename from app/src/main/java/tomikaa/greeremote/Gree/Device/DeviceManagerEventListener.java
rename to app/src/main/java/hu/czompisoftware/greecontrol/Gree/Device/DeviceManagerEventListener.java
index 03b2abd..3e1c631 100644
--- a/app/src/main/java/tomikaa/greeremote/Gree/Device/DeviceManagerEventListener.java
+++ b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Device/DeviceManagerEventListener.java
@@ -1,4 +1,21 @@
-package tomikaa.greeremote.Gree.Device;
+package hu.czompisoftware.greecontrol.Gree.Device;
+
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
/*
* This file is part of GreeRemoteAndroid.
diff --git a/app/src/main/java/tomikaa/greeremote/Gree/Network/AsyncCommunicationFinishedListener.java b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Network/AsyncCommunicationFinishedListener.java
similarity index 53%
rename from app/src/main/java/tomikaa/greeremote/Gree/Network/AsyncCommunicationFinishedListener.java
rename to app/src/main/java/hu/czompisoftware/greecontrol/Gree/Network/AsyncCommunicationFinishedListener.java
index 70bb5f0..a67ba70 100644
--- a/app/src/main/java/tomikaa/greeremote/Gree/Network/AsyncCommunicationFinishedListener.java
+++ b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Network/AsyncCommunicationFinishedListener.java
@@ -1,4 +1,21 @@
-package tomikaa.greeremote.Gree.Network;
+package hu.czompisoftware.greecontrol.Gree.Network;
+
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
/*
* This file is part of GreeRemoteAndroid.
diff --git a/app/src/main/java/tomikaa/greeremote/Gree/Network/AsyncCommunicator.java b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Network/AsyncCommunicator.java
similarity index 83%
rename from app/src/main/java/tomikaa/greeremote/Gree/Network/AsyncCommunicator.java
rename to app/src/main/java/hu/czompisoftware/greecontrol/Gree/Network/AsyncCommunicator.java
index ac377c9..2a4944e 100644
--- a/app/src/main/java/tomikaa/greeremote/Gree/Network/AsyncCommunicator.java
+++ b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Network/AsyncCommunicator.java
@@ -1,7 +1,6 @@
-package tomikaa.greeremote.Gree.Network;
+package hu.czompisoftware.greecontrol.Gree.Network;
import android.os.AsyncTask;
-import android.provider.ContactsContract;
import android.util.Log;
import java.io.IOException;
@@ -12,9 +11,26 @@
import java.net.SocketException;
import java.util.ArrayList;
-import tomikaa.greeremote.Gree.Packets.AppPacket;
-import tomikaa.greeremote.Gree.Packets.Packet;
-import tomikaa.greeremote.Gree.Utils;
+import hu.czompisoftware.greecontrol.Gree.Packets.AppPacket;
+import hu.czompisoftware.greecontrol.Gree.Packets.Packet;
+import hu.czompisoftware.greecontrol.Gree.Utils;
+
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
/*
* This file is part of GreeRemoteAndroid.
diff --git a/app/src/main/java/tomikaa/greeremote/Gree/Network/DeviceKeyChain.java b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Network/DeviceKeyChain.java
similarity index 65%
rename from app/src/main/java/tomikaa/greeremote/Gree/Network/DeviceKeyChain.java
rename to app/src/main/java/hu/czompisoftware/greecontrol/Gree/Network/DeviceKeyChain.java
index eea2f13..c12f01d 100644
--- a/app/src/main/java/tomikaa/greeremote/Gree/Network/DeviceKeyChain.java
+++ b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Network/DeviceKeyChain.java
@@ -1,7 +1,24 @@
-package tomikaa.greeremote.Gree.Network;
+package hu.czompisoftware.greecontrol.Gree.Network;
import java.util.HashMap;
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
+
/*
* This file is part of GreeRemoteAndroid.
*
diff --git a/app/src/main/java/tomikaa/greeremote/Gree/Packets/AppPacket.java b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packets/AppPacket.java
similarity index 56%
rename from app/src/main/java/tomikaa/greeremote/Gree/Packets/AppPacket.java
rename to app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packets/AppPacket.java
index ead7394..b7ba82b 100644
--- a/app/src/main/java/tomikaa/greeremote/Gree/Packets/AppPacket.java
+++ b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packets/AppPacket.java
@@ -1,4 +1,21 @@
-package tomikaa.greeremote.Gree.Packets;
+package hu.czompisoftware.greecontrol.Gree.Packets;
+
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
/*
* This file is part of GreeRemoteAndroid.
diff --git a/app/src/main/java/tomikaa/greeremote/Gree/Packets/Packet.java b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packets/Packet.java
similarity index 57%
rename from app/src/main/java/tomikaa/greeremote/Gree/Packets/Packet.java
rename to app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packets/Packet.java
index ecc676f..25ee675 100644
--- a/app/src/main/java/tomikaa/greeremote/Gree/Packets/Packet.java
+++ b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packets/Packet.java
@@ -1,8 +1,26 @@
-package tomikaa.greeremote.Gree.Packets;
+package hu.czompisoftware.greecontrol.Gree.Packets;
+
+import hu.czompisoftware.greecontrol.Gree.Packs.Pack;
-import tomikaa.greeremote.Gree.Packs.Pack;
import com.google.gson.annotations.SerializedName;
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
+
/*
* This file is part of GreeRemoteAndroid.
*
diff --git a/app/src/main/java/tomikaa/greeremote/Gree/Packets/ScanPacket.java b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packets/ScanPacket.java
similarity index 54%
rename from app/src/main/java/tomikaa/greeremote/Gree/Packets/ScanPacket.java
rename to app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packets/ScanPacket.java
index a01be1a..5256535 100644
--- a/app/src/main/java/tomikaa/greeremote/Gree/Packets/ScanPacket.java
+++ b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packets/ScanPacket.java
@@ -1,4 +1,21 @@
-package tomikaa.greeremote.Gree.Packets;
+package hu.czompisoftware.greecontrol.Gree.Packets;
+
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
/*
* This file is part of GreeRemoteAndroid.
diff --git a/app/src/main/java/tomikaa/greeremote/Gree/Packs/BindOkPack.java b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packs/BindOkPack.java
similarity index 58%
rename from app/src/main/java/tomikaa/greeremote/Gree/Packs/BindOkPack.java
rename to app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packs/BindOkPack.java
index 27b2743..199e3a1 100644
--- a/app/src/main/java/tomikaa/greeremote/Gree/Packs/BindOkPack.java
+++ b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packs/BindOkPack.java
@@ -1,7 +1,24 @@
-package tomikaa.greeremote.Gree.Packs;
+package hu.czompisoftware.greecontrol.Gree.Packs;
import com.google.gson.annotations.SerializedName;
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
+
/*
* This file is part of GreeRemoteAndroid.
*
diff --git a/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packs/BindPack.java b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packs/BindPack.java
new file mode 100644
index 0000000..f444edf
--- /dev/null
+++ b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packs/BindPack.java
@@ -0,0 +1,49 @@
+package hu.czompisoftware.greecontrol.Gree.Packs;
+
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
+
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
+
+/**
+ * Created by tomikaa87 on 2017-11-26.
+ */
+
+public class BindPack extends Pack {
+ public static String TYPE = "bind";
+
+ public int uid;
+
+ public BindPack() {
+ type = TYPE;
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/tomikaa/greeremote/Gree/Packs/CommandPack.java b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packs/CommandPack.java
similarity index 58%
rename from app/src/main/java/tomikaa/greeremote/Gree/Packs/CommandPack.java
rename to app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packs/CommandPack.java
index 4c73a39..076b12c 100644
--- a/app/src/main/java/tomikaa/greeremote/Gree/Packs/CommandPack.java
+++ b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packs/CommandPack.java
@@ -1,7 +1,24 @@
-package tomikaa.greeremote.Gree.Packs;
+package hu.czompisoftware.greecontrol.Gree.Packs;
import com.google.gson.annotations.SerializedName;
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
+
/*
* This file is part of GreeRemoteAndroid.
*
diff --git a/app/src/main/java/tomikaa/greeremote/Gree/Packs/DatPack.java b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packs/DatPack.java
similarity index 59%
rename from app/src/main/java/tomikaa/greeremote/Gree/Packs/DatPack.java
rename to app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packs/DatPack.java
index 7aa73c7..77ed902 100644
--- a/app/src/main/java/tomikaa/greeremote/Gree/Packs/DatPack.java
+++ b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packs/DatPack.java
@@ -1,7 +1,24 @@
-package tomikaa.greeremote.Gree.Packs;
+package hu.czompisoftware.greecontrol.Gree.Packs;
import com.google.gson.annotations.SerializedName;
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
+
/*
* This file is part of GreeRemoteAndroid.
*
diff --git a/app/src/main/java/tomikaa/greeremote/Gree/Packs/DevicePack.java b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packs/DevicePack.java
similarity index 62%
rename from app/src/main/java/tomikaa/greeremote/Gree/Packs/DevicePack.java
rename to app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packs/DevicePack.java
index 7de6847..5616398 100644
--- a/app/src/main/java/tomikaa/greeremote/Gree/Packs/DevicePack.java
+++ b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packs/DevicePack.java
@@ -1,7 +1,24 @@
-package tomikaa.greeremote.Gree.Packs;
+package hu.czompisoftware.greecontrol.Gree.Packs;
import com.google.gson.annotations.SerializedName;
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
+
/*
* This file is part of GreeRemoteAndroid.
*
diff --git a/app/src/main/java/tomikaa/greeremote/Gree/Packs/Pack.java b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packs/Pack.java
similarity index 55%
rename from app/src/main/java/tomikaa/greeremote/Gree/Packs/Pack.java
rename to app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packs/Pack.java
index 44045d1..caa99e7 100644
--- a/app/src/main/java/tomikaa/greeremote/Gree/Packs/Pack.java
+++ b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packs/Pack.java
@@ -1,7 +1,24 @@
-package tomikaa.greeremote.Gree.Packs;
+package hu.czompisoftware.greecontrol.Gree.Packs;
import com.google.gson.annotations.SerializedName;
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
+
/*
* This file is part of GreeRemoteAndroid.
*
diff --git a/app/src/main/java/tomikaa/greeremote/Gree/Packs/ResultPack.java b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packs/ResultPack.java
similarity index 59%
rename from app/src/main/java/tomikaa/greeremote/Gree/Packs/ResultPack.java
rename to app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packs/ResultPack.java
index a3209a1..9ab545e 100644
--- a/app/src/main/java/tomikaa/greeremote/Gree/Packs/ResultPack.java
+++ b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packs/ResultPack.java
@@ -1,7 +1,24 @@
-package tomikaa.greeremote.Gree.Packs;
+package hu.czompisoftware.greecontrol.Gree.Packs;
import com.google.gson.annotations.SerializedName;
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
+
/*
* This file is part of GreeRemoteAndroid.
*
diff --git a/app/src/main/java/tomikaa/greeremote/Gree/Packs/StatusPack.java b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packs/StatusPack.java
similarity index 57%
rename from app/src/main/java/tomikaa/greeremote/Gree/Packs/StatusPack.java
rename to app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packs/StatusPack.java
index 645177b..b94f492 100644
--- a/app/src/main/java/tomikaa/greeremote/Gree/Packs/StatusPack.java
+++ b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Packs/StatusPack.java
@@ -1,7 +1,24 @@
-package tomikaa.greeremote.Gree.Packs;
+package hu.czompisoftware.greecontrol.Gree.Packs;
import com.google.gson.annotations.SerializedName;
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
+
/*
* This file is part of GreeRemoteAndroid.
*
diff --git a/app/src/main/java/tomikaa/greeremote/Gree/Utils.java b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Utils.java
similarity index 75%
rename from app/src/main/java/tomikaa/greeremote/Gree/Utils.java
rename to app/src/main/java/hu/czompisoftware/greecontrol/Gree/Utils.java
index 2f5fc9a..cc47d2b 100644
--- a/app/src/main/java/tomikaa/greeremote/Gree/Utils.java
+++ b/app/src/main/java/hu/czompisoftware/greecontrol/Gree/Utils.java
@@ -1,4 +1,4 @@
-package tomikaa.greeremote.Gree;
+package hu.czompisoftware.greecontrol.Gree;
import android.util.Log;
@@ -8,11 +8,28 @@
import java.util.HashMap;
import java.util.Map;
-import tomikaa.greeremote.Gree.Deserializers.PackDeserializer;
-import tomikaa.greeremote.Gree.Network.DeviceKeyChain;
-import tomikaa.greeremote.Gree.Packets.Packet;
-import tomikaa.greeremote.Gree.Packs.DatPack;
-import tomikaa.greeremote.Gree.Packs.Pack;
+import hu.czompisoftware.greecontrol.Gree.Deserializers.PackDeserializer;
+import hu.czompisoftware.greecontrol.Gree.Network.DeviceKeyChain;
+import hu.czompisoftware.greecontrol.Gree.Packets.Packet;
+import hu.czompisoftware.greecontrol.Gree.Packs.DatPack;
+import hu.czompisoftware.greecontrol.Gree.Packs.Pack;
+
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
/*
* This file is part of GreeRemoteAndroid.
@@ -74,7 +91,7 @@ public static String serializePacket(Packet packet, DeviceKeyChain deviceKeyChai
if (packet.pack != null) {
String key = getKey(deviceKeyChain, packet);
String plainPack = gson.toJson(packet.pack);
- packet.encryptedPack = tomikaa.greeremote.Gree.Crypto.encrypt(plainPack, key);
+ packet.encryptedPack = Crypto.encrypt(plainPack, key);
}
return gson.toJson(packet);
diff --git a/app/src/main/java/tomikaa/greeremote/MainActivity.java b/app/src/main/java/hu/czompisoftware/greecontrol/MainActivity.java
similarity index 71%
rename from app/src/main/java/tomikaa/greeremote/MainActivity.java
rename to app/src/main/java/hu/czompisoftware/greecontrol/MainActivity.java
index 0a9e637..4aede03 100644
--- a/app/src/main/java/tomikaa/greeremote/MainActivity.java
+++ b/app/src/main/java/hu/czompisoftware/greecontrol/MainActivity.java
@@ -1,18 +1,34 @@
-package tomikaa.greeremote;
+package hu.czompisoftware.greecontrol;
import android.content.Intent;
import android.os.Bundle;
+import android.support.design.widget.FloatingActionButton;
+import android.support.design.widget.Snackbar;
+import android.support.v7.app.AppCompatActivity;
+import android.support.v7.widget.Toolbar;
+import android.view.View;
import android.view.Menu;
import android.view.MenuItem;
-import android.view.View;
-
-import androidx.appcompat.app.AppCompatActivity;
-import androidx.appcompat.widget.Toolbar;
-import com.google.android.material.floatingactionbutton.FloatingActionButton;
-import com.google.android.material.snackbar.Snackbar;
+import hu.czompisoftware.greecontrol.Gree.Device.DeviceManager;
+import hu.czompisoftware.greecontrol.R;
-import tomikaa.greeremote.Gree.Device.DeviceManager;
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
/*
* This file is part of GreeRemoteAndroid.
@@ -38,7 +54,7 @@
public class MainActivity extends AppCompatActivity
implements DeviceItemFragment.OnListFragmentInteractionListener {
- public static String EXTRA_DEVICE_ITEM = "tomikaa.greeremote.DEVICEITEM";
+ public static String EXTRA_DEVICE_ITEM = "hu.czompisoftware.greecontrol.DEVICEITEM";
@Override
protected void onCreate(Bundle savedInstanceState) {
diff --git a/app/src/main/java/tomikaa/greeremote/MyDeviceItemRecyclerViewAdapter.java b/app/src/main/java/hu/czompisoftware/greecontrol/MyDeviceItemRecyclerViewAdapter.java
similarity index 82%
rename from app/src/main/java/tomikaa/greeremote/MyDeviceItemRecyclerViewAdapter.java
rename to app/src/main/java/hu/czompisoftware/greecontrol/MyDeviceItemRecyclerViewAdapter.java
index abb2ee2..f9c4d03 100644
--- a/app/src/main/java/tomikaa/greeremote/MyDeviceItemRecyclerViewAdapter.java
+++ b/app/src/main/java/hu/czompisoftware/greecontrol/MyDeviceItemRecyclerViewAdapter.java
@@ -1,17 +1,16 @@
-package tomikaa.greeremote;
+package hu.czompisoftware.greecontrol;
+import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
-import androidx.recyclerview.widget.RecyclerView;
+import hu.czompisoftware.greecontrol.R;
import java.util.List;
-import tomikaa.greeremote.DeviceItemFragment.OnListFragmentInteractionListener;
-
/*
* This file is part of GreeRemoteAndroid.
*
@@ -33,17 +32,34 @@
* Created by tomikaa87 on 2017-10-23.
*/
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
+
/**
* {@link RecyclerView.Adapter} that can display a {@link DeviceItem} and makes a call to the
- * specified {@link OnListFragmentInteractionListener}.
+ * specified {@link DeviceItemFragment.OnListFragmentInteractionListener}.
* TODO: Replace the implementation with code for your data type.
*/
public class MyDeviceItemRecyclerViewAdapter extends RecyclerView.Adapter {
private final List mValues;
- private final OnListFragmentInteractionListener mListener;
+ private final DeviceItemFragment.OnListFragmentInteractionListener mListener;
- public MyDeviceItemRecyclerViewAdapter(List items, OnListFragmentInteractionListener listener) {
+ public MyDeviceItemRecyclerViewAdapter(List items, DeviceItemFragment.OnListFragmentInteractionListener listener) {
mValues = items;
mListener = listener;
}
diff --git a/app/src/main/java/tomikaa/greeremote/Gree/Packs/WifiSettingsPack.java b/app/src/main/java/tomikaa/greeremote/Gree/Packs/WifiSettingsPack.java
deleted file mode 100644
index d624834..0000000
--- a/app/src/main/java/tomikaa/greeremote/Gree/Packs/WifiSettingsPack.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package tomikaa.greeremote.Gree.Packs;
-
-import com.google.gson.annotations.SerializedName;
-
-import tomikaa.greeremote.Gree.Packets.Packet;
-
-/*
- * This file is part of GreeRemoteAndroid.
- *
- * GreeRemoteAndroid is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * GreeRemoteAndroid is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GreeRemoteAndroid. If not, see .
- */
-
-/**
- * Created by tomikaa87 on 2017-11-26.
- */
-
-//{"psw": "","ssid": "","t": "wlan"}
-
-public class WifiSettingsPack extends Packet {
- public static String TYPE = "wlan";
-
- @SerializedName("psw")
- public String psw;
-
- @SerializedName("ssid")
- public String ssid;
-
- public WifiSettingsPack() {
- type = TYPE;
- }
-}
\ No newline at end of file
diff --git a/app/src/main/res/drawable/ic_button_minus.xml b/app/src/main/res/drawable/ic_button_minus.xml
index 7331b9a..74a5614 100644
--- a/app/src/main/res/drawable/ic_button_minus.xml
+++ b/app/src/main/res/drawable/ic_button_minus.xml
@@ -1,3 +1,20 @@
+
+
diff --git a/app/src/main/res/drawable/ic_button_plus.xml b/app/src/main/res/drawable/ic_button_plus.xml
index ca5f26d..6efee2b 100644
--- a/app/src/main/res/drawable/ic_button_plus.xml
+++ b/app/src/main/res/drawable/ic_button_plus.xml
@@ -1,3 +1,20 @@
+
+
diff --git a/app/src/main/res/drawable/ic_button_power.xml b/app/src/main/res/drawable/ic_button_power.xml
index d43704c..8261b6a 100644
--- a/app/src/main/res/drawable/ic_button_power.xml
+++ b/app/src/main/res/drawable/ic_button_power.xml
@@ -1,3 +1,20 @@
+
+
diff --git a/app/src/main/res/drawable/ic_feature_air.xml b/app/src/main/res/drawable/ic_feature_air.xml
index 86c6d67..a0ddd3c 100644
--- a/app/src/main/res/drawable/ic_feature_air.xml
+++ b/app/src/main/res/drawable/ic_feature_air.xml
@@ -1,3 +1,20 @@
+
+
diff --git a/app/src/main/res/drawable/ic_feature_health.xml b/app/src/main/res/drawable/ic_feature_health.xml
index cc6920e..30195e6 100644
--- a/app/src/main/res/drawable/ic_feature_health.xml
+++ b/app/src/main/res/drawable/ic_feature_health.xml
@@ -1,3 +1,20 @@
+
+
diff --git a/app/src/main/res/drawable/ic_feature_light.xml b/app/src/main/res/drawable/ic_feature_light.xml
index 1cc2670..f233304 100644
--- a/app/src/main/res/drawable/ic_feature_light.xml
+++ b/app/src/main/res/drawable/ic_feature_light.xml
@@ -1,3 +1,20 @@
+
+
diff --git a/app/src/main/res/drawable/ic_feature_quiet.xml b/app/src/main/res/drawable/ic_feature_quiet.xml
index 5b8fc87..1f30390 100644
--- a/app/src/main/res/drawable/ic_feature_quiet.xml
+++ b/app/src/main/res/drawable/ic_feature_quiet.xml
@@ -1,3 +1,20 @@
+
+
diff --git a/app/src/main/res/drawable/ic_feature_saving.xml b/app/src/main/res/drawable/ic_feature_saving.xml
index 8160697..f01fc7e 100644
--- a/app/src/main/res/drawable/ic_feature_saving.xml
+++ b/app/src/main/res/drawable/ic_feature_saving.xml
@@ -1,3 +1,20 @@
+
+
diff --git a/app/src/main/res/drawable/ic_feature_sleep.xml b/app/src/main/res/drawable/ic_feature_sleep.xml
index a1a5bd8..458cd57 100644
--- a/app/src/main/res/drawable/ic_feature_sleep.xml
+++ b/app/src/main/res/drawable/ic_feature_sleep.xml
@@ -1,3 +1,20 @@
+
+
diff --git a/app/src/main/res/drawable/ic_feature_turbo.xml b/app/src/main/res/drawable/ic_feature_turbo.xml
index 6885b27..44d4ab4 100644
--- a/app/src/main/res/drawable/ic_feature_turbo.xml
+++ b/app/src/main/res/drawable/ic_feature_turbo.xml
@@ -1,3 +1,20 @@
+
+
diff --git a/app/src/main/res/drawable/ic_magnifying_glass.xml b/app/src/main/res/drawable/ic_magnifying_glass.xml
index a63f251..6ba2b39 100644
--- a/app/src/main/res/drawable/ic_magnifying_glass.xml
+++ b/app/src/main/res/drawable/ic_magnifying_glass.xml
@@ -1,3 +1,20 @@
+
+
diff --git a/app/src/main/res/drawable/ic_mode_auto.xml b/app/src/main/res/drawable/ic_mode_auto.xml
index 3137afb..0535726 100644
--- a/app/src/main/res/drawable/ic_mode_auto.xml
+++ b/app/src/main/res/drawable/ic_mode_auto.xml
@@ -15,6 +15,23 @@
~ along with GreeRemoteAndroid. If not, see .
-->
+
+
diff --git a/app/src/main/res/drawable/ic_mode_cool.xml b/app/src/main/res/drawable/ic_mode_cool.xml
index 3d16492..4184b33 100644
--- a/app/src/main/res/drawable/ic_mode_cool.xml
+++ b/app/src/main/res/drawable/ic_mode_cool.xml
@@ -15,6 +15,23 @@
~ along with GreeRemoteAndroid. If not, see .
-->
+
+
diff --git a/app/src/main/res/drawable/ic_mode_dry.xml b/app/src/main/res/drawable/ic_mode_dry.xml
index 3a6cef0..15b63b1 100644
--- a/app/src/main/res/drawable/ic_mode_dry.xml
+++ b/app/src/main/res/drawable/ic_mode_dry.xml
@@ -15,6 +15,23 @@
~ along with GreeRemoteAndroid. If not, see .
-->
+
+
diff --git a/app/src/main/res/drawable/ic_mode_fan.xml b/app/src/main/res/drawable/ic_mode_fan.xml
index b2c514b..3eba25f 100644
--- a/app/src/main/res/drawable/ic_mode_fan.xml
+++ b/app/src/main/res/drawable/ic_mode_fan.xml
@@ -15,6 +15,23 @@
~ along with GreeRemoteAndroid. If not, see .
-->
+
+
diff --git a/app/src/main/res/drawable/ic_mode_heat.xml b/app/src/main/res/drawable/ic_mode_heat.xml
index 9d05d46..2922b38 100644
--- a/app/src/main/res/drawable/ic_mode_heat.xml
+++ b/app/src/main/res/drawable/ic_mode_heat.xml
@@ -15,6 +15,23 @@
~ along with GreeRemoteAndroid. If not, see .
-->
+
+
diff --git a/app/src/main/res/font/thin.xml b/app/src/main/res/font/thin.xml
index b9788bc..f5ac3ff 100644
--- a/app/src/main/res/font/thin.xml
+++ b/app/src/main/res/font/thin.xml
@@ -1,4 +1,21 @@
+
+
diff --git a/app/src/main/res/layout/activity_device.xml b/app/src/main/res/layout/activity_device.xml
index 7b528bd..d68fbd1 100644
--- a/app/src/main/res/layout/activity_device.xml
+++ b/app/src/main/res/layout/activity_device.xml
@@ -1,10 +1,27 @@
-.
+ -->
+
+
@@ -196,7 +213,7 @@
tools:layout_constraintLeft_creator="1"
tools:layout_constraintRight_creator="1">
-
@@ -539,7 +556,7 @@
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:checked="false" />
-
+
-
+
diff --git a/app/src/main/res/layout/activity_device_help.xml b/app/src/main/res/layout/activity_device_help.xml
index a96c835..f1bc763 100644
--- a/app/src/main/res/layout/activity_device_help.xml
+++ b/app/src/main/res/layout/activity_device_help.xml
@@ -1,9 +1,26 @@
-.
+ -->
+
+
+ tools:context="hu.czompisoftware.greecontrol.DeviceHelpActivity">
-
+
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 2cc8b7e..fa2ca7e 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -1,28 +1,45 @@
-.
+ -->
+
+
+ tools:context="hu.czompisoftware.greecontrol.MainActivity">
-
-
-
+
-
-
+
diff --git a/app/src/main/res/layout/content_main.xml b/app/src/main/res/layout/content_main.xml
index e9d9c36..2b50628 100644
--- a/app/src/main/res/layout/content_main.xml
+++ b/app/src/main/res/layout/content_main.xml
@@ -1,16 +1,33 @@
-.
+ -->
+
+
-
+
diff --git a/app/src/main/res/layout/device_list_item_2.xml b/app/src/main/res/layout/device_list_item_2.xml
index c165dcf..8eb0fcb 100644
--- a/app/src/main/res/layout/device_list_item_2.xml
+++ b/app/src/main/res/layout/device_list_item_2.xml
@@ -1,4 +1,21 @@
+
+
-.
+ -->
+
+
-
+
diff --git a/app/src/main/res/layout/fragment_deviceitem_list.xml b/app/src/main/res/layout/fragment_deviceitem_list.xml
index e7cbd5b..7b6fe74 100644
--- a/app/src/main/res/layout/fragment_deviceitem_list.xml
+++ b/app/src/main/res/layout/fragment_deviceitem_list.xml
@@ -1,14 +1,31 @@
-.
+ -->
+
+
diff --git a/app/src/main/res/layout/username_password_dialog.xml b/app/src/main/res/layout/username_password_dialog.xml
deleted file mode 100644
index 2cf2b7f..0000000
--- a/app/src/main/res/layout/username_password_dialog.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/menu/menu_device.xml b/app/src/main/res/menu/menu_device.xml
index cd36a51..6e2b1a2 100644
--- a/app/src/main/res/menu/menu_device.xml
+++ b/app/src/main/res/menu/menu_device.xml
@@ -1,12 +1,29 @@
+
+
\ No newline at end of file
diff --git a/app/src/main/res/menu/menu_main.xml b/app/src/main/res/menu/menu_main.xml
index 86da5d6..b32a976 100644
--- a/app/src/main/res/menu/menu_main.xml
+++ b/app/src/main/res/menu/menu_main.xml
@@ -1,10 +1,27 @@
+
+
diff --git a/app/src/main/res/values-en/strings.xml b/app/src/main/res/values-en/strings.xml
new file mode 100644
index 0000000..5ce07ff
--- /dev/null
+++ b/app/src/main/res/values-en/strings.xml
@@ -0,0 +1,57 @@
+
+
+
+ Gree Control
+ Settings
+ Automatic
+ Cool
+ Fan
+ Dry
+ Heat
+ Mode:
+ Temperature:
+ Health
+ Turbo
+ Air
+ Quiet
+ Energy saving
+ Dry/X-Fan
+ Sleep
+ Light
+ Help:
+ Air
+ Health
+ Dry
+ Sleep
+ Quiet
+ Turbo
+ Energy saving
+ Light
+ °C
+ Scanning devices on local network...
+ Scan is already running. Please wait.
+ Auto
+ Max
+
+ Automatic
+ Cool
+ Dry
+ Fan
+ Heat
+
+
diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml
new file mode 100644
index 0000000..ba34e9a
--- /dev/null
+++ b/app/src/main/res/values-hu/strings.xml
@@ -0,0 +1,57 @@
+
+
+
+ Gree Control
+ Beállítások
+ Automatikus
+ Hűtés
+ Ventillátor
+ Párátlanítás
+ Fűtés
+ Üzemmód:
+ Hőmérséklet:
+ Egészséges
+ Turbó
+ Levegő
+ Csöndes
+ Energiatakarékos
+ Szárítás (X-Fan)
+ Alvás
+ Világítás
+ Súgó ehhez:
+ Levegő
+ Egészséges
+ Párátlanítás
+ Alvás
+ Csöndes
+ Turbó
+ Energiatakarékos
+ Világítás
+ °C
+ Eszközök keresése a helyi hálózaton...
+ Kérem várjon, a keresés még folyamatban van.
+ Auto
+ Max
+
+ Automatikus
+ Hűtés
+ Párátlanítás
+ Ventillátor
+ Fűtés
+
+
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index 8d9b3c2..7444da5 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -1,4 +1,21 @@
+
+
#00bcd4#0097A7
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
index ef77d84..235d1e9 100644
--- a/app/src/main/res/values/dimens.xml
+++ b/app/src/main/res/values/dimens.xml
@@ -1,3 +1,20 @@
+
+
16dp16dp
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 7c8ba16..e209e0a 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1,7 +1,23 @@
+
+
- Gree Remote
- OK
- WiFi settings
+ Gree Control
+ SettingsAutomaticCoolFan
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 098d543..f30da17 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -1,3 +1,20 @@
+
+
diff --git a/app/src/main/java/tomikaa/greeremote/Gree/Packs/BindPack.java b/app/src/test/java/hu/czompisoftware/greecontrol/ExampleUnitTest.java
similarity index 65%
rename from app/src/main/java/tomikaa/greeremote/Gree/Packs/BindPack.java
rename to app/src/test/java/hu/czompisoftware/greecontrol/ExampleUnitTest.java
index 5e02150..a844e0d 100644
--- a/app/src/main/java/tomikaa/greeremote/Gree/Packs/BindPack.java
+++ b/app/src/test/java/hu/czompisoftware/greecontrol/ExampleUnitTest.java
@@ -1,4 +1,8 @@
-package tomikaa.greeremote.Gree.Packs;
+package hu.czompisoftware.greecontrol;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
/*
* This file is part of GreeRemoteAndroid.
@@ -18,15 +22,13 @@
*/
/**
- * Created by tomikaa87 on 2017-11-26.
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see Testing documentation
*/
-
-public class BindPack extends Pack {
- public static String TYPE = "bind";
-
- public int uid;
-
- public BindPack() {
- type = TYPE;
+public class ExampleUnitTest {
+ @Test
+ public void addition_isCorrect() throws Exception {
+ assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
diff --git a/app/src/test/java/tomikaa/greeremote/ExampleUnitTest.java b/app/src/test/java/tomikaa/greeremote/ExampleUnitTest.java
deleted file mode 100644
index d2889f1..0000000
--- a/app/src/test/java/tomikaa/greeremote/ExampleUnitTest.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package tomikaa.greeremote;
-
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * Example local unit test, which will execute on the development machine (host).
- *
- * @see Testing documentation
- */
-public class ExampleUnitTest {
- @Test
- public void addition_isCorrect() throws Exception {
- assertEquals(4, 2 + 2);
- }
-}
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 39ff539..0c6890d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,3 +1,20 @@
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
+
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
@@ -9,7 +26,7 @@ buildscript {
google()
}
dependencies {
- classpath 'com.android.tools.build:gradle:4.1.1'
+ classpath 'com.android.tools.build:gradle:3.6.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
diff --git a/gradle.properties b/gradle.properties
index 9e6fce1..d714222 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,3 +1,20 @@
+#
+# This file is part of GreeRemoteAndroid.
+#
+# GreeRemoteAndroid is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# GreeRemoteAndroid is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GreeRemoteAndroid. If not, see .
+#
+
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
@@ -9,8 +26,6 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
-android.enableJetifier=true
-android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 30c0d60..c91e568 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,23 @@
-#Sat Jan 16 19:08:36 IST 2021
+#
+# This file is part of GreeRemoteAndroid.
+#
+# GreeRemoteAndroid is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# GreeRemoteAndroid is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GreeRemoteAndroid. If not, see .
+#
+
+#Fri Oct 27 18:57:59 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
diff --git a/settings.gradle b/settings.gradle
index e7b4def..e484955 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1 +1,18 @@
+/*
+ * This file is part of GreeRemoteAndroid.
+ *
+ * GreeRemoteAndroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GreeRemoteAndroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GreeRemoteAndroid. If not, see .
+ */
+
include ':app'