diff --git a/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/Credits.java b/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/Credits.java index 22608e0..22633cf 100644 --- a/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/Credits.java +++ b/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/Credits.java @@ -5,6 +5,7 @@ import android.os.Bundle; import android.view.View; +import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import com.mikepenz.aboutlibraries.LibsBuilder; @@ -15,7 +16,7 @@ public class Credits extends AppCompatActivity { @Override - protected void onCreate(Bundle savedInstanceState) { + protected void onCreate(@NonNull Bundle savedInstanceState) { super.onCreate(savedInstanceState); View aboutPage = new AboutPage(this) diff --git a/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/EndUserConsent.java b/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/EndUserConsent.java index d58ba5e..c748954 100644 --- a/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/EndUserConsent.java +++ b/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/EndUserConsent.java @@ -1,5 +1,6 @@ package com.thegreek.niko.logviewer_for_openHAB; +import android.annotation.SuppressLint; import android.app.AlertDialog; import android.app.Dialog; import android.content.DialogInterface; @@ -18,15 +19,19 @@ import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatDialogFragment; +import org.jetbrains.annotations.NotNull; + import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; +import java.util.Objects; public class EndUserConsent extends AppCompatDialogFragment { + @NotNull @Override public Dialog onCreateDialog(Bundle savedInstanceState) { - SharedPreferences mySPR = getActivity().getSharedPreferences("Speicherstand", 0); + SharedPreferences mySPR = Objects.requireNonNull(getActivity()).getSharedPreferences("Safe", 0); final SharedPreferences.Editor editor = mySPR.edit(); SpannableString ss = new SpannableString(getString(R.string.end_user_consent_message)); @@ -70,17 +75,17 @@ public void onClick(@NonNull View view) { public void onClick(DialogInterface dialogInterface, int i) { MainActivity.firebaseAnalytics.setAnalyticsCollectionEnabled(true); Date date = Calendar.getInstance().getTime(); - SimpleDateFormat sDF = new SimpleDateFormat("dd.MM.yyyy"); - SimpleDateFormat sDF2 = new SimpleDateFormat("HH:mm:ss"); - editor.putString("datum", sDF.format(date)); - editor.putString("uhrzeit", sDF2.format(date)); + @SuppressLint("SimpleDateFormat") SimpleDateFormat sDF = new SimpleDateFormat("dd.MM.yyyy"); + @SuppressLint("SimpleDateFormat") SimpleDateFormat sDF2 = new SimpleDateFormat("HH:mm:ss"); + editor.putString("date", sDF.format(date)); + editor.putString("time", sDF2.format(date)); editor.putBoolean("firstStart", false).apply(); } }) .setNegativeButton(getString(R.string.end_user_consent_button_2), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { - System.exit(0); + Objects.requireNonNull(getActivity()).finish(); } }); diff --git a/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/EndUserConsent2.java b/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/EndUserConsent2.java index b1faa56..897ed9f 100644 --- a/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/EndUserConsent2.java +++ b/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/EndUserConsent2.java @@ -18,18 +18,20 @@ import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatDialogFragment; +import java.util.Objects; + public class EndUserConsent2 extends AppCompatDialogFragment { @NonNull @Override public Dialog onCreateDialog(Bundle savedInstanceState) { - SharedPreferences mySPR = getActivity().getSharedPreferences("Speicherstand", 0); + SharedPreferences mySPR = Objects.requireNonNull(getActivity()).getSharedPreferences("Safe", 0); final SharedPreferences.Editor editor = mySPR.edit(); editor.apply(); String message = getString(R.string.end_user_consent2_message_1); - message += mySPR.getString("datum", "") + getString(R.string.end_user_consent2_message_2) + mySPR.getString("uhrzeit", ""); + message += mySPR.getString("date", "") + getString(R.string.end_user_consent2_message_2) + mySPR.getString("time", ""); SpannableString spannableString = new SpannableString(message); diff --git a/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/IconCredits.java b/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/IconCredits.java index c38bc29..de4e65e 100644 --- a/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/IconCredits.java +++ b/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/IconCredits.java @@ -20,25 +20,21 @@ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_icon_credits); - TextView textView5 = findViewById(R.id.credits_icons_1); - TextView textView6 = findViewById(R.id.credits_icons_2); - TextView textView7 = findViewById(R.id.credits_icons_3); - TextView textView8 = findViewById(R.id.credits_icons_4); - TextView textView9 = findViewById(R.id.credits_icons_5); - TextView textView10 = findViewById(R.id.credits_icons_6); - TextView textView11 = findViewById(R.id.credits_icons_7); - TextView textView12 = findViewById(R.id.credits_icons_8); - TextView textView13 = findViewById(R.id.credits_icons_9); - - setSpans(textView5, getString(R.string.credits_icons_1), "https://www.flaticon.com/authors/dave-gandy", 24, 34); - setSpans(textView6, getString(R.string.credits_icons_2), "https://www.flaticon.com/authors/smartline", 21, 30); - setSpans(textView7, getString(R.string.credits_icons_3), "https://www.flaticon.com/authors/those-icons", 20, 31); - setSpans(textView8, getString(R.string.credits_icons_4), "https://www.flaticon.com/authors/those-icons", 20, 31); - setSpans(textView9, getString(R.string.credits_icons_5), "https://www.flaticon.com/authors/lyolya", 26, 32); - setSpans(textView10, getString(R.string.credits_icons_6), "https://www.flaticon.com/authors/those-icons", 24, 35); - setSpans(textView11, getString(R.string.credits_icons_7), "https://www.flaticon.com/authors/freepik", 27, 34); - setSpans(textView12, getString(R.string.credits_icons_8), "https://www.flaticon.com/authors/freepik", 20, 27); - setSpans(textView13, getString(R.string.credits_icons_9), "https://www.flaticon.com/authors/freepik", 24, 31); + TextView[] textViews = new TextView[9]; + + for (int i = 1; i <= 9; i++) { + textViews[i-1] = findViewById(getResources().getIdentifier("credits_icons_" + i, "id", getPackageName())); + } + + setSpans(textViews[0], getString(R.string.credits_icons_1), getString(R.string.credits_icons_links_5), 24, 34); + setSpans(textViews[1], getString(R.string.credits_icons_2), getString(R.string.credits_icons_links_4), 21, 30); + setSpans(textViews[2], getString(R.string.credits_icons_3), getString(R.string.credits_icons_links_2), 20, 31); + setSpans(textViews[3], getString(R.string.credits_icons_4), getString(R.string.credits_icons_links_2), 20, 31); + setSpans(textViews[4], getString(R.string.credits_icons_5), getString(R.string.credits_icons_links_3), 26, 32); + setSpans(textViews[5], getString(R.string.credits_icons_6), getString(R.string.credits_icons_links_2), 24, 35); + setSpans(textViews[6], getString(R.string.credits_icons_7), getString(R.string.credits_icons_links_1), 27, 34); + setSpans(textViews[7], getString(R.string.credits_icons_8), getString(R.string.credits_icons_links_1), 20, 27); + setSpans(textViews[8], getString(R.string.credits_icons_9), getString(R.string.credits_icons_links_1), 24, 31); } void setSpans(TextView textView, String string, final String link, int startChar, int endChar) { diff --git a/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/MainActivity.java b/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/MainActivity.java index b6d477f..eda088d 100644 --- a/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/MainActivity.java +++ b/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/MainActivity.java @@ -29,14 +29,14 @@ protected void onCreate(Bundle savedInstanceState) { setContentView(R.layout.activity_main); firebaseAnalytics = FirebaseAnalytics.getInstance(this); - mySPR = this.getSharedPreferences("Speicherstand", 0); + mySPR = this.getSharedPreferences("Safe", 0); editor = mySPR.edit(); editor.apply(); Toasty.Config.getInstance().allowQueue(false).apply(); getSupportFragmentManager().beginTransaction().replace(R.id.start, new MainFragment()).commit(); - if (mySPR.getBoolean("firstStart", true) || mySPR.getString("datum", "").equals("")) { + if (mySPR.getBoolean("firstStart", true) || mySPR.getString("date", "").equals("")) { EndUserConsent endUserConsent = new EndUserConsent(); endUserConsent.setCancelable(false); endUserConsent.show(getSupportFragmentManager(), "Endnutzer-Einwilligung"); @@ -59,33 +59,27 @@ public void onResponse(String response) { int neuesterVersionCode = Integer.parseInt(parts2[0]); parts = parts2[1].split("\""); parts2 = parts[1].split("\""); - editor.putString("neuesteVersion", parts2[0]); + editor.putString("newestVersion", parts2[0]); editor.apply(); if (BuildConfig.VERSION_CODE != neuesterVersionCode) { - System.out.println("----------\nUpdate verfügbar: " + mySPR.getString("neuesteVersion", "") + "\n----------"); - UpdateDialog updateDialog = new UpdateDialog(); updateDialog.setCancelable(false); updateDialog.show(getSupportFragmentManager(), "Update-Dialog"); ActivityCompat.requestPermissions(activity , new String[]{Manifest.permission.INTERNET, Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.REQUEST_INSTALL_PACKAGES}, 1); - } else { - System.out.println("----------\nApp auf dem neuesten Stand\n----------"); } } - @Override public void onError(ANError anError) { - System.out.println("----------\nUpdate-Abfrage fehlgeschlagen: " + anError.getErrorBody() + "\n----------"); } }); } @Override public void onBackPressed() { - System.exit(0); + finish(); } static void changeOrientation(Activity activity, int orientation) { diff --git a/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/MainFragment.java b/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/MainFragment.java index cb47d5f..b69082d 100644 --- a/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/MainFragment.java +++ b/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/MainFragment.java @@ -59,8 +59,9 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa TextView versionView = v.findViewById(R.id.version_view); ImageView settings = v.findViewById(R.id.imageView); - mySPR = v.getContext().getSharedPreferences("Speicherstand", 0); + mySPR = v.getContext().getSharedPreferences("Safe", 0); editor = mySPR.edit(); + editor.apply(); statusWiederherstellung(); versionView.setText(BuildConfig.VERSION_NAME); @@ -114,6 +115,7 @@ public void onClick(View view) { connectButton.setText(getString(R.string.connect_button_2)); } else { + assert getFragmentManager() != null; getFragmentManager().beginTransaction() .replace(R.id.start, new WebViewFragment()) .addToBackStack(null) @@ -121,6 +123,7 @@ public void onClick(View view) { if (view != null) { InputMethodManager imm = (InputMethodManager) view.getContext().getApplicationContext().getSystemService(Context.INPUT_METHOD_SERVICE); + assert imm != null; imm.hideSoftInputFromWindow(view.getWindowToken(), 0); } @@ -194,6 +197,7 @@ private void statusWiederherstellung() { connectCheck.setChecked(mySPR.getBoolean("connectCheck", false)); if (mySPR.getBoolean("autoStart", false) && connectCheck.isChecked()) { + assert getFragmentManager() != null; getFragmentManager().beginTransaction() .replace(R.id.start, new WebViewFragment()) .addToBackStack(null) diff --git a/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/PrivacyPolicy.java b/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/PrivacyPolicy.java index f6e623f..3f46aeb 100644 --- a/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/PrivacyPolicy.java +++ b/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/PrivacyPolicy.java @@ -4,6 +4,7 @@ import android.net.Uri; import android.os.Bundle; import android.view.View; +import android.widget.TextView; import androidx.appcompat.app.AppCompatActivity; @@ -16,6 +17,13 @@ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_privacy_policy); + TextView[] textViews = new TextView[21]; + + for (int i = 1; i <= 21; i++) { + textViews[i-1] = findViewById(getResources().getIdentifier("textView" + i, "id", getPackageName())); + textViews[i-1].setText(getResources().getStringArray(R.array.privacy_policy)[i-1]); + } + FloatingActionButton fab = findViewById(R.id.fab); fab.setOnClickListener(new View.OnClickListener() { @Override diff --git a/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/TermsOfUse.java b/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/TermsOfUse.java index 4930fd1..7354dfc 100644 --- a/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/TermsOfUse.java +++ b/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/TermsOfUse.java @@ -4,6 +4,7 @@ import android.net.Uri; import android.os.Bundle; import android.view.View; +import android.widget.TextView; import androidx.appcompat.app.AppCompatActivity; @@ -16,6 +17,13 @@ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_terms_of_use); + TextView[] textViews = new TextView[7]; + + for (int i = 1; i <= 7; i++) { + textViews[i-1] = findViewById(getResources().getIdentifier("textView" + i, "id", getPackageName())); + textViews[i-1].setText(getResources().getStringArray(R.array.terms_of_use)[i-1]); + } + FloatingActionButton fab = findViewById(R.id.fab); fab.setOnClickListener(new View.OnClickListener() { @Override diff --git a/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/UpdateDialog.java b/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/UpdateDialog.java index b92b6e2..01f2f8c 100644 --- a/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/UpdateDialog.java +++ b/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/UpdateDialog.java @@ -25,6 +25,8 @@ import androidx.appcompat.app.AppCompatDialogFragment; import androidx.core.content.ContextCompat; +import java.util.Objects; + import es.dmoral.toasty.Toasty; import static android.content.Context.DOWNLOAD_SERVICE; @@ -34,7 +36,7 @@ public class UpdateDialog extends AppCompatDialogFragment { @NonNull @Override public Dialog onCreateDialog(Bundle savedInstanceState) { - final SharedPreferences mySPR = getActivity().getSharedPreferences("Speicherstand", 0); + final SharedPreferences mySPR = Objects.requireNonNull(getActivity()).getSharedPreferences("Safe", 0); final SharedPreferences.Editor editor = mySPR.edit(); editor.apply(); @@ -57,8 +59,8 @@ public void onClick(@NonNull View view) { startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/nikothegreek/logviewer-for-openhab-app/releases/latest"))); } }; - String message = String.format(getString(R.string.update_dialog_message), mySPR.getString("neuesteVersion", ""), BuildConfig.VERSION_NAME); - String index = "changelog"; + String message = String.format(getString(R.string.update_dialog_message), mySPR.getString("newestVersion", ""), BuildConfig.VERSION_NAME); + String index = getString(R.string.update_dialog_changelog); SpannableString spannableString = new SpannableString(message); spannableString.setSpan(clickableSpan, message.indexOf(index), message.indexOf(index) + index.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); messageView.setText(spannableString); @@ -70,14 +72,15 @@ public void onClick(@NonNull View view) { .setPositiveButton(getString(R.string.update_dialog_button_1), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { - if (ContextCompat.checkSelfPermission(getContext(), Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED) { - String link = "https://github.com/nikothegreek/logviewer-for-openhab-app/releases/download/v" + mySPR.getString("neuesteVersion", "") + "/LogViewerforopenHAB_" + - mySPR.getString("neuesteVersion", "") + ".apk"; + if (ContextCompat.checkSelfPermission(Objects.requireNonNull(getContext()), Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED) { + String link = "https://github.com/nikothegreek/logviewer-for-openhab-app/releases/download/v" + mySPR.getString("newestVersion", "") + "/LogViewerforopenHAB_" + + mySPR.getString("newestVersion", "") + ".apk"; DownloadManager.Request request = new DownloadManager.Request(Uri.parse(link)) .setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, URLUtil.guessFileName(link, null, null)) .setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); - DownloadManager downloadManager = (DownloadManager) getActivity().getSystemService(DOWNLOAD_SERVICE); + DownloadManager downloadManager = (DownloadManager) Objects.requireNonNull(getActivity()).getSystemService(DOWNLOAD_SERVICE); + assert downloadManager != null; downloadManager.enqueue(request); } else { Toasty.error(getContext(), getString(R.string.update_dialog_error), Toasty.LENGTH_LONG).show(); diff --git a/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/WebViewFragment.java b/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/WebViewFragment.java index 3d7ea87..756dfcc 100644 --- a/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/WebViewFragment.java +++ b/app/src/main/java/com/thegreek/niko/logviewer_for_openHAB/WebViewFragment.java @@ -1,5 +1,6 @@ package com.thegreek.niko.logviewer_for_openHAB; +import android.annotation.SuppressLint; import android.content.DialogInterface; import android.content.SharedPreferences; import android.graphics.Typeface; @@ -23,6 +24,8 @@ import org.adw.library.widgets.discreteseekbar.DiscreteSeekBar; +import java.util.Objects; + import es.dmoral.toasty.Toasty; public class WebViewFragment extends Fragment { @@ -32,6 +35,7 @@ public class WebViewFragment extends Fragment { private boolean viewLocked = true; + @SuppressLint("SetJavaScriptEnabled") @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { @@ -42,7 +46,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, final FloatingActionButton backButton = v.findViewById(R.id.back_utton); webView = v.findViewById(R.id.webview); - final SharedPreferences mySPR = this.getActivity().getSharedPreferences("Speicherstand", 0); + final SharedPreferences mySPR = Objects.requireNonNull(this.getActivity()).getSharedPreferences("Safe", 0); editor = mySPR.edit(); final WebSettings webSettings = webView.getSettings(); @@ -129,6 +133,7 @@ public void onClick(DialogInterface dialogInterface, int i) { public void onClick(View view) { final boolean autoStartTemp = mySPR.getBoolean("autoStart", false); editor.putBoolean("autoStart", false).apply(); + assert getFragmentManager() != null; getFragmentManager().beginTransaction().replace(R.id.start, new MainFragment()).commit(); final Handler handler2 = new Handler(); @@ -189,6 +194,7 @@ public void onSequenceCanceled(TapTarget lastTarget) { return v; } + @SuppressLint("ClickableViewAccessibility") private void setTouchable(boolean b) { if (b) { webView.setOnTouchListener(new View.OnTouchListener() { diff --git a/app/src/main/res/drawable-v24/icon_arrow_left.webp b/app/src/main/res/drawable-v24/icon_arrow_left.webp new file mode 100644 index 0000000..1784840 Binary files /dev/null and b/app/src/main/res/drawable-v24/icon_arrow_left.webp differ diff --git a/app/src/main/res/drawable-v24/icon_auto_orientation.png b/app/src/main/res/drawable-v24/icon_auto_orientation.png deleted file mode 100644 index b995da2..0000000 Binary files a/app/src/main/res/drawable-v24/icon_auto_orientation.png and /dev/null differ diff --git a/app/src/main/res/drawable-v24/icon_auto_orientation.webp b/app/src/main/res/drawable-v24/icon_auto_orientation.webp new file mode 100644 index 0000000..4f5de0f Binary files /dev/null and b/app/src/main/res/drawable-v24/icon_auto_orientation.webp differ diff --git a/app/src/main/res/drawable-v24/icon_font.webp b/app/src/main/res/drawable-v24/icon_font.webp new file mode 100644 index 0000000..91105b1 Binary files /dev/null and b/app/src/main/res/drawable-v24/icon_font.webp differ diff --git a/app/src/main/res/drawable-v24/icon_libraries.png b/app/src/main/res/drawable-v24/icon_libraries.png deleted file mode 100644 index 8fdd372..0000000 Binary files a/app/src/main/res/drawable-v24/icon_libraries.png and /dev/null differ diff --git a/app/src/main/res/drawable-v24/icon_libraries.webp b/app/src/main/res/drawable-v24/icon_libraries.webp new file mode 100644 index 0000000..59a2a22 Binary files /dev/null and b/app/src/main/res/drawable-v24/icon_libraries.webp differ diff --git a/app/src/main/res/drawable-v24/icon_lock.png b/app/src/main/res/drawable-v24/icon_lock.png deleted file mode 100644 index 8c2c840..0000000 Binary files a/app/src/main/res/drawable-v24/icon_lock.png and /dev/null differ diff --git a/app/src/main/res/drawable-v24/icon_lock.webp b/app/src/main/res/drawable-v24/icon_lock.webp new file mode 100644 index 0000000..1682329 Binary files /dev/null and b/app/src/main/res/drawable-v24/icon_lock.webp differ diff --git a/app/src/main/res/drawable-v24/icon_lock_2.png b/app/src/main/res/drawable-v24/icon_lock_2.png deleted file mode 100644 index 678347b..0000000 Binary files a/app/src/main/res/drawable-v24/icon_lock_2.png and /dev/null differ diff --git a/app/src/main/res/drawable-v24/icon_lock_2.webp b/app/src/main/res/drawable-v24/icon_lock_2.webp new file mode 100644 index 0000000..bc80745 Binary files /dev/null and b/app/src/main/res/drawable-v24/icon_lock_2.webp differ diff --git a/app/src/main/res/drawable-v24/icon_question.png b/app/src/main/res/drawable-v24/icon_question.png deleted file mode 100644 index 17210c3..0000000 Binary files a/app/src/main/res/drawable-v24/icon_question.png and /dev/null differ diff --git a/app/src/main/res/drawable-v24/icon_question.webp b/app/src/main/res/drawable-v24/icon_question.webp new file mode 100644 index 0000000..ee1e75a Binary files /dev/null and b/app/src/main/res/drawable-v24/icon_question.webp differ diff --git a/app/src/main/res/drawable/icon_arrow_left.png b/app/src/main/res/drawable/icon_arrow_left.png deleted file mode 100644 index 8099148..0000000 Binary files a/app/src/main/res/drawable/icon_arrow_left.png and /dev/null differ diff --git a/app/src/main/res/drawable/icon_font.png b/app/src/main/res/drawable/icon_font.png deleted file mode 100644 index 6e21325..0000000 Binary files a/app/src/main/res/drawable/icon_font.png and /dev/null differ diff --git a/app/src/main/res/layout-port/fragment_main.xml b/app/src/main/res/layout-port/fragment_main.xml index 093b997..487b461 100644 --- a/app/src/main/res/layout-port/fragment_main.xml +++ b/app/src/main/res/layout-port/fragment_main.xml @@ -169,7 +169,7 @@ android:layout_height="wrap_content" android:layout_marginBottom="8dp" android:layout_marginStart="8dp" - android:text="@string/credits" + android:text="@string/about" android:textColor="#FF6600" android:textSize="16sp" android:textStyle="bold" diff --git a/app/src/main/res/layout/activity_privacy_policy.xml b/app/src/main/res/layout/activity_privacy_policy.xml index d1fc015..4f67691 100644 --- a/app/src/main/res/layout/activity_privacy_policy.xml +++ b/app/src/main/res/layout/activity_privacy_policy.xml @@ -12,6 +12,7 @@ android:layout_height="wrap_content" android:layout_gravity="bottom|end" android:layout_margin="16dp" + app:backgroundTint="@color/colorAccent" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:srcCompat="@android:drawable/ic_dialog_email" /> @@ -36,9 +37,7 @@ android:layout_height="match_parent" android:layout_marginStart="8dp" android:layout_marginTop="16dp" - android:layout_marginEnd="8dp" - android:text="@string/privacy_policy_1" - android:textAlignment="center" + android:layout_marginEnd="8dp" android:textAlignment="center" android:textSize="24sp" android:textStyle="bold" app:layout_constraintEnd_toEndOf="parent" @@ -51,9 +50,7 @@ android:layout_height="wrap_content" android:layout_marginStart="8dp" android:layout_marginTop="8dp" - android:layout_marginEnd="8dp" - android:text="@string/privacy_policy_2" - android:textSize="16sp" + android:layout_marginEnd="8dp" android:textSize="16sp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/textView1" /> @@ -64,9 +61,7 @@ android:layout_height="wrap_content" android:layout_marginStart="8dp" android:layout_marginTop="16dp" - android:layout_marginEnd="8dp" - android:text="@string/privacy_policy_3" - android:textAlignment="center" + android:layout_marginEnd="8dp" android:textAlignment="center" android:textSize="18sp" android:textStyle="bold" app:layout_constraintEnd_toEndOf="parent" @@ -79,9 +74,7 @@ android:layout_height="wrap_content" android:layout_marginStart="8dp" android:layout_marginEnd="8dp" - android:autoLink="web" - android:text="@string/privacy_policy_4" - android:textSize="16sp" + android:autoLink="web" android:textSize="16sp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/textView3" /> @@ -92,9 +85,7 @@ android:layout_height="wrap_content" android:layout_marginStart="8dp" android:layout_marginTop="16dp" - android:layout_marginEnd="8dp" - android:text="@string/privacy_policy_5" - android:textAlignment="center" + android:layout_marginEnd="8dp" android:textAlignment="center" android:textSize="18sp" android:textStyle="bold" app:layout_constraintEnd_toEndOf="parent" @@ -106,9 +97,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="8dp" - android:layout_marginEnd="8dp" - android:text="@string/privacy_policy_6" - android:textSize="16sp" + android:layout_marginEnd="8dp" android:textSize="16sp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/textView5" /> @@ -119,9 +108,7 @@ android:layout_height="wrap_content" android:layout_marginStart="8dp" android:layout_marginTop="16dp" - android:layout_marginEnd="8dp" - android:text="@string/privacy_policy_7" - android:textAlignment="center" + android:layout_marginEnd="8dp" android:textAlignment="center" android:textSize="18sp" android:textStyle="bold" app:layout_constraintEnd_toEndOf="parent" @@ -133,9 +120,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="8dp" - android:layout_marginEnd="8dp" - android:text="@string/privacy_policy_8" - android:textSize="16sp" + android:layout_marginEnd="8dp" android:textSize="16sp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/textView7" /> @@ -146,9 +131,7 @@ android:layout_height="wrap_content" android:layout_marginStart="8dp" android:layout_marginTop="16dp" - android:layout_marginEnd="8dp" - android:text="@string/privacy_policy_9" - android:textAlignment="center" + android:layout_marginEnd="8dp" android:textAlignment="center" android:textSize="18sp" android:textStyle="bold" app:layout_constraintEnd_toEndOf="parent" @@ -162,7 +145,6 @@ android:layout_marginStart="8dp" android:layout_marginEnd="8dp" android:autoLink="web" - android:text="@string/privacy_policy_10" android:textSize="16sp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -175,7 +157,6 @@ android:layout_marginStart="8dp" android:layout_marginTop="16dp" android:layout_marginEnd="8dp" - android:text="@string/privacy_policy_11" android:textAlignment="center" android:textSize="18sp" android:textStyle="bold" @@ -189,7 +170,6 @@ android:layout_height="wrap_content" android:layout_marginStart="8dp" android:layout_marginEnd="8dp" - android:text="@string/privacy_policy_12" android:textSize="16sp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -202,7 +182,6 @@ android:layout_marginStart="8dp" android:layout_marginTop="16dp" android:layout_marginEnd="8dp" - android:text="@string/privacy_policy_13" android:textAlignment="center" android:textSize="18sp" android:textStyle="bold" @@ -216,7 +195,6 @@ android:layout_height="wrap_content" android:layout_marginStart="8dp" android:layout_marginEnd="8dp" - android:text="@string/privacy_policy_14" android:textSize="16sp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -229,7 +207,6 @@ android:layout_marginStart="8dp" android:layout_marginTop="16dp" android:layout_marginEnd="8dp" - android:text="@string/privacy_policy_15" android:textAlignment="center" android:textSize="18sp" android:textStyle="bold" @@ -243,7 +220,6 @@ android:layout_height="wrap_content" android:layout_marginStart="8dp" android:layout_marginEnd="8dp" - android:text="@string/privacy_policy_16" android:textSize="16sp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -256,7 +232,6 @@ android:layout_marginStart="8dp" android:layout_marginTop="16dp" android:layout_marginEnd="8dp" - android:text="@string/privacy_policy_17" android:textAlignment="center" android:textSize="18sp" android:textStyle="bold" @@ -270,7 +245,6 @@ android:layout_height="wrap_content" android:layout_marginStart="8dp" android:layout_marginEnd="8dp" - android:text="@string/privacy_policy_18" android:textSize="16sp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -283,7 +257,6 @@ android:layout_marginStart="8dp" android:layout_marginTop="16dp" android:layout_marginEnd="8dp" - android:text="@string/privacy_policy_19" android:textAlignment="center" android:textSize="18sp" android:textStyle="bold" @@ -298,7 +271,6 @@ android:layout_marginStart="8dp" android:layout_marginEnd="8dp" android:autoLink="email" - android:text="@string/privacy_policy_20" android:textSize="16sp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -319,7 +291,6 @@ android:layout_marginStart="8dp" android:layout_marginEnd="8dp" android:autoLink="web" - android:text="@string/privacy_policy_21" android:textAlignment="center" android:textSize="16sp" app:layout_constraintEnd_toEndOf="parent" diff --git a/app/src/main/res/layout/activity_terms_of_use.xml b/app/src/main/res/layout/activity_terms_of_use.xml index ef499cc..9ce471b 100644 --- a/app/src/main/res/layout/activity_terms_of_use.xml +++ b/app/src/main/res/layout/activity_terms_of_use.xml @@ -12,6 +12,7 @@ android:layout_height="wrap_content" android:layout_gravity="bottom|end" android:layout_margin="16dp" + app:backgroundTint="@color/colorAccent" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:srcCompat="@android:drawable/ic_dialog_email" /> @@ -37,7 +38,6 @@ android:layout_marginStart="8dp" android:layout_marginTop="16dp" android:layout_marginEnd="8dp" - android:text="@string/terms_of_use_1" android:textAlignment="center" android:textSize="24sp" android:textStyle="bold" @@ -53,7 +53,6 @@ android:layout_marginTop="8dp" android:layout_marginEnd="8dp" android:autoLink="web" - android:text="@string/terms_of_use_2" android:textSize="16sp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -66,7 +65,6 @@ android:layout_marginStart="8dp" android:layout_marginTop="8dp" android:layout_marginEnd="8dp" - android:text="@string/terms_of_use_3" android:textAlignment="center" android:textSize="18sp" android:textStyle="bold" @@ -80,7 +78,6 @@ android:layout_height="wrap_content" android:layout_marginStart="8dp" android:layout_marginEnd="8dp" - android:text="@string/terms_of_use_4" android:textSize="16sp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -93,7 +90,6 @@ android:layout_marginStart="8dp" android:layout_marginTop="8dp" android:layout_marginEnd="8dp" - android:text="@string/terms_of_use_5" android:textAlignment="center" android:textSize="18sp" android:textStyle="bold" @@ -107,7 +103,6 @@ android:layout_height="wrap_content" android:layout_marginStart="8dp" android:layout_marginEnd="8dp" - android:text="@string/terms_of_use_6" android:textSize="16sp" android:autoLink="email" app:layout_constraintEnd_toEndOf="parent" @@ -129,7 +124,6 @@ android:layout_marginStart="8dp" android:layout_marginEnd="8dp" android:autoLink="web" - android:text="@string/terms_of_use_7" android:textAlignment="center" android:textSize="16sp" app:layout_constraintEnd_toEndOf="parent" diff --git a/app/src/main/res/layout/fragment_main.xml b/app/src/main/res/layout/fragment_main.xml index 939ab76..643574e 100644 --- a/app/src/main/res/layout/fragment_main.xml +++ b/app/src/main/res/layout/fragment_main.xml @@ -172,12 +172,12 @@ android:layout_height="wrap_content" android:layout_marginStart="8dp" android:layout_marginBottom="8dp" - android:text="@string/credits" + android:text="@string/about" android:textColor="#FF6600" android:textSize="16sp" android:textStyle="bold" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintBottom_toBottomOf="parent" /> + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" /> The update \'%1$s\' is available for download!\nCurrently installed version: \'%2$s\'\n\nRead the changelog to know about the new features. Download Cancel - Changelog + Changelog Missing permission, give it on next app start This is a simple and easy to use android app to simplify the mobile access to the log of an openHAB instance (running frontail) on your tablet or your @@ -37,6 +37,11 @@ \"Orientation icon\" made by Freepik from flaticon.com \"Book icon\" made by Freepik from flaticon.com \"Question icon\" made by Freepik from flaticon.com + https://www.flaticon.com/authors/freepik + https://www.flaticon.com/authors/those-icons + https://www.flaticon.com/authors/lyolya + https://www.flaticon.com/authors/smartline + https://www.flaticon.com/authors/dave-gandy Hostname / IP address (e.g. 192.168.178.10) @@ -62,75 +67,68 @@ Send me a mail… - Privacy Policy - I built the LogViewer for openHAB app as a Free app. This SERVICE is provided by me at no cost and is intended for use as is. + + Privacy Policy + I built the LogViewer for openHAB app as a Free app. This SERVICE is provided by me at no cost and is intended for use as is. \n\nThis page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use this Service. \n\nIf you choose to use this Service, then you agree to the collection and use of information in relation to this policy. \nThe Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy. - \n\nThe terms used in this Privacy Policy have the same meanings as in our Terms of Use, which is accessible at LogViewer for openHAB. - - Information Collection and Use - For a better experience, while using my Service, I may require you to provide me with certain personally identifiable information, including but not limited to - Device Information, Usage Time, Country, Gender and Interests. + \n\nThe terms used in this Privacy Policy have the same meanings as in our Terms of Use, which is accessible at LogViewer for openHAB. + Information Collection and Use + For a better experience, while using my Service, I may require you to provide me with certain personally identifiable information, including but not limited to Device Information, + Usage Time, Country, Gender and Interests. \n\nThe app does use third party services that may collect information used to identify you. \nLink to the third party service providers used by the app: - \n - Google Firebase (firebase.google.com) - - Log Data - I want to inform you that whenever you use my Service, I collect data and information (through third party products) on your phone called Log Data. This Log Data - may include information such as your device Internet Protocol (“IP”) address, device name, operating system version, the configuration of the app when utilizing my Service, the time and date - of your use of the Service, and other statistics. - - Cookies - Cookies are files with a small amount of data that are commonly used as anonymous unique identifiers. These are sent to your browser from the websites that you - visit and are stored on your device\'s internal memory. - \n\nThis Service does not use these “cookies” explicitly. However, the app may use third party code and libraries that use “cookies” to collect information and improve their services. - - Service Providers - I may employ third-party companies and individuals due to the following reasons: + \n - Google Firebase (firebase.google.com) + Log Data + I want to inform you that whenever you use my Service, I collect data and information (through third party products) on your phone called Log Data. This Log Data may include + information such as your device Internet Protocol (“IP”) address, device name, operating system version, the configuration of the app when utilizing my Service, the time and date of your + use of the Service, and other statistics. + Cookies + Cookies are files with a small amount of data that are commonly used as anonymous unique identifiers. These are sent to your browser from the websites that you visit and are stored on + your device\'s internal memory. + \n\nThis Service does not use these “cookies” explicitly. However, the app may use third party code and libraries that use “cookies” to collect information and improve their services. + Service Providers + I may employ third-party companies and individuals due to the following reasons: \n - To facilitate our Service \n - To provide the Service on our behalf \n - To perform Service-related services \n - To assist us in analyzing how our Service is used \n\nI want to inform users of this Service that these third parties have access to your Personal Information. The reason is to perform the tasks assigned to them on our behalf. However, they - are obligated not to disclose or use the information for any other purpose. - - Security - I value your trust in providing me your Personal Information, thus we are striving to use commercially acceptable means of protecting it. But remember that no - method of transmission over the internet, or method of electronic storage is 100% secure and reliable, and I cannot guarantee its absolute security. - - Links to Websites - This Service may contain links to other sites. If you click on a third-party link, you will be directed to that site. Note that not every of these external - sites are operated by me. Therefore, I strongly advise you to review the Privacy Policy of these websites. I have no control over and assume no responsibility for the content, privacy - policies, or practices of any third-party sites or services. - - Children\’s Privacy - This Service does not address anyone under the age of 13. I do not knowingly collect personally identifiable information from children under 13. - Changes to this Privacy Policy - I may update this Privacy Policy from time to time. Thus, you are advised to review this page periodically for any changes. I will notify you of any changes - by posting the new Privacy Policy on this page. These changes are effective immediately after they are posted on this page. - \nThis policy is effective as of 2020-04-24. - - Contact Me - If you have any questions or suggestions about my Privacy Policy, do not hesitate to contact me at nikodiamond3@gmail.com. - This privacy policy page was created at privacypolicytemplate.net and modified/generated by App Privacy Policy Generator - (app-privacy-policy-generator.firebaseapp.com) and me. - + are obligated not to disclose or use the information for any other purpose. + Security + I value your trust in providing me your Personal Information, thus we are striving to use commercially acceptable means of protecting it. But remember that no method of transmission + over the internet, or method of electronic storage is 100% secure and reliable, and I cannot guarantee its absolute security. + Links to Websites + This Service may contain links to other sites. If you click on a third-party link, you will be directed to that site. Note that not every of these external sites are operated by me. + Therefore, I strongly advise you to review the Privacy Policy of these websites. I have no control over and assume no responsibility for the content, privacy policies, or practices of any + third-party sites or services. + Children\’s Privacy + This Service does not address anyone under the age of 13. I do not knowingly collect personally identifiable information from children under 13. + Changes to this Privacy Policy + I may update this Privacy Policy from time to time. Thus, you are advised to review this page periodically for any changes. I will notify you of any changes by posting the new Privacy + Policy on this page. These changes are effective immediately after they are posted on this page. + \nThis policy is effective as of 2020-04-24 + Contact me + If you have any questions or suggestions about my Privacy Policy, do not hesitate to contact me at nikodiamond3@gmail.com. + This privacy policy page was created at privacypolicytemplate.net and modified/generated by App Privacy Policy Generator (app-privacy-policy-generator.firebaseapp.com) and me. + // Terms of Use - Terms of Use - By downloading or using the app, these terms will automatically apply to you – you should make sure therefore that you read them carefully before using the app. - You\'re not allowed to copy, or modify the app, any part of the app. You\'re not allowed to attempt to extract the source code of the app or make derivative versions. + + Terms of Use + By downloading or using the app, these terms will automatically apply to you – you should make sure therefore that you read them carefully before using the app. You\'re not allowed to + copy, or modify the app, any part of the app. You\'re not allowed to attempt to extract the source code of the app or make derivative versions. \nThe app itself, and all the database rights and other intellectual property rights related to it, still belong to me. - \n\nI am committed to ensuring that the app is as useful and efficient as possible. For that reason, I reserve the right to make changes to the app or to charge for its services, - at any time and for any reason. I will never charge you for the app or its services without making it very clear to you exactly what you\'re paying for. - \n\nThe LogViewer for openHAB app stores and processes personal data that you have provided to us, in order to provide my Service. It\'s your responsibility to keep your phone and access - to the app secure. We therefore recommend that you do not jailbreak or root your phone, which is the process of removing software restrictions and limitations imposed by the official - operating system of your device. It could make your phone vulnerable to malware/viruses/malicious programs, compromise your phone\'s security features and it could mean that the - LogViewer for openHAB app won\'t work properly or at all. + \n\nI am committed to ensuring that the app is as useful and efficient as possible. For that reason, I reserve the right to make changes to the app or to charge for its services, at any + time and for any reason. I will never charge you for the app or its services without making it very clear to you exactly what you\'re paying for. + \n\nThe LogViewer for openHAB app stores and processes personal data that you have provided to us, in order to provide my Service. It\'s your responsibility to keep your phone and access to + the app secure. We therefore recommend that you do not jailbreak or root your phone, which is the process of removing software restrictions and limitations imposed by the official operating + system of your device. It could make your phone vulnerable to malware/viruses/malicious programs, compromise your phone\'s security features and it could mean that the LogViewer for openHAB + app won\'t work properly or at all. \nThe app does use third party services that declare their own Terms and Conditions. \nLink to Terms and Conditions of third party service providers used by the app: - \n - Google Analytics for Firebase (firebase.google.com/terms/analytics) + \n - Google Analytics for Firebase (firebase.google.com/terms/analytics) \n\nYou should be aware that there are certain things that I will not take responsibility for. Certain functions of the app will require the app to have an active internet connection. The connection can be Wi-Fi, or provided by your mobile network provider, but I cannot take responsibility for the app not working at full functionality if you don\'t have any of your data allowance left. @@ -146,14 +144,13 @@ \n\nAt some point, I may wish to update the app. The app is currently available on Android – the requirements for system (and for any additional systems I decide to extend the availability of the app to) may change, and you\'ll need to download the updates if you want to keep using the app. I do not promise that I will always update the app so that it is relevant to you and/or works with the Android version that you have installed on your device. However, you promise to always accept updates to the application when offered to you, I may also wish to stop - providing the app, and may terminate use of it at any time without giving notice of termination to you. - - Changes to this Terms of Use - I may update these Terms of Use from time to time. Thus, you are advised to review this page periodically for any changes. I will notify you of any changes by + providing the app, and may terminate use of it at any time without giving notice of termination to you. + Changes to this Terms of Use + I may update these Terms of Use from time to time. Thus, you are advised to review this page periodically for any changes. I will notify you of any changes by posting the new Terms of Use on this page. - \nThese Terms of Use are effective as of 2020-04-24. - - Contact Me - If you have any questions or suggestions about my Terms of Use, do not hesitate to contact me at nikodiamond3@gmail.com. - This Terms of Use page was generated by App Privacy Policy Generator (app-privacy-policy-generator.firebaseapp.com) and modified by me. + \nThese Terms of Use are effective as of 2020-04-24. + Contact Me + If you have any questions or suggestions about my Terms of Use, do not hesitate to contact me at nikodiamond3@gmail.com. + This Terms of Use page was generated by App Privacy Policy Generator (app-privacy-policy-generator.firebaseapp.com) and modified by me. +