From fbf8f51fdf98f0c8cdf3d6cc8e7734d30c28cdfd Mon Sep 17 00:00:00 2001 From: Ahmet Inan Date: Tue, 7 May 2024 14:03:13 +0200 Subject: [PATCH] use html and clickable links for the about and privacy policy pages --- .../java/xdsopl/robot36/MainActivity.java | 15 ++++++--- app/src/main/res/values/strings.xml | 31 ++++++++++++------- 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/app/src/main/java/xdsopl/robot36/MainActivity.java b/app/src/main/java/xdsopl/robot36/MainActivity.java index 77cb475..519967e 100644 --- a/app/src/main/java/xdsopl/robot36/MainActivity.java +++ b/app/src/main/java/xdsopl/robot36/MainActivity.java @@ -24,10 +24,13 @@ import android.os.Bundle; import android.os.Environment; import android.os.ParcelFileDescriptor; import android.provider.MediaStore; +import android.text.Html; +import android.text.method.LinkMovementMethod; import android.view.Gravity; import android.view.Menu; import android.view.MenuItem; import android.widget.ImageView; +import android.widget.TextView; import android.widget.Toast; import androidx.activity.EdgeToEdge; @@ -558,11 +561,11 @@ public class MainActivity extends AppCompatActivity { return true; } if (id == R.id.action_privacy_policy) { - showTextPage(getString(R.string.privacy_policy), getString(R.string.privacy_policy_text)); + showTextPage(getString(R.string.privacy_policy_text)); return true; } if (id == R.id.action_about) { - showTextPage(getString(R.string.about), getString(R.string.about_text, BuildConfig.VERSION_NAME)); + showTextPage(getString(R.string.about_text, BuildConfig.VERSION_NAME)); return true; } return super.onOptionsItemSelected(item); @@ -614,11 +617,13 @@ public class MainActivity extends AppCompatActivity { createPeakMeter(); } - private void showTextPage(String title, String message) { + private void showTextPage(String message) { + TextView view = new TextView(this); + view.setText(Html.fromHtml(message, Html.FROM_HTML_MODE_LEGACY)); + view.setMovementMethod(LinkMovementMethod.getInstance()); AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.Theme_AlertDialog); builder.setNeutralButton(R.string.close, null); - builder.setTitle(title); - builder.setMessage(message); + builder.setView(view); builder.show(); } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 1d7493e..e8a0b6e 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -59,19 +59,26 @@ Disable Close Privacy Policy - Microphone Access: -\n\nThis app requires access to your device\'s microphone to decode Slow Scan Television (SSTV) signals. +

Privacy Policy

+

Microphone Access
+This app requires access to your device\'s microphone to decode Slow Scan Television (SSTV) signals. The microphone captures the audio containing the SSTV transmission. -\n\nData Handling: -\n\nThe app uses a small temporary buffer in memory to process the audio data in real-time. +

+

Data Handling
+The app uses a small temporary buffer in memory to process the audio data in real-time. This buffer is constantly overwritten with new data as the decoding progresses. -The app does not store the raw audio captured from the microphone. -Only the decoded images resulting from the SSTV process are saved on your device\'s storage.
+The app does not store the raw audio captured from the microphone. +Only the decoded images resulting from the SSTV process are saved on your device\'s storage. +

+]]>
About Robot36 - Robot36 %1$s\nCopyright 2024 Ahmet Inan -\n\nPlease read DISCLAIMER at the bottom of this page. -\n\nRobot36 decodes Slow Scan Television (SSTV) images from audio. -\n\nImplementation:\nhttps://github.com/xdsopl/robot36\nBSD Zero Clause License -\n\nMode specifications:\nhttp://www.barberdsp.com/downloads/Dayton%%20Paper.pdf\nby JL Barber - 2000 -\n\nDISCLAIMER:\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +

Robot36 %1$s

Copyright 2024 Ahmet Inan

+

Please read DISCLAIMER at the bottom of this page

+

Description
Decodes Slow Scan Television images from audio

+

Implementation
Robot36 on GitHub
BSD Zero Clause License

+

Mode specifications
Dayton Paper
by JL Barber - 2000

+

DISCLAIMER
THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

+]]>