use html and clickable links for the about and privacy policy pages

pull/11/head
Ahmet Inan 2024-05-07 14:03:13 +02:00
rodzic 1de7e40330
commit fbf8f51fdf
2 zmienionych plików z 29 dodań i 17 usunięć

Wyświetl plik

@ -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();
}

Wyświetl plik

@ -59,19 +59,26 @@
<string name="disable">Disable</string>
<string name="close">Close</string>
<string name="privacy_policy">Privacy Policy</string>
<string name="privacy_policy_text">Microphone Access:
\n\nThis app requires access to your device\'s microphone to decode Slow Scan Television (SSTV) signals.
<string name="privacy_policy_text"><![CDATA[
<p><h1>Privacy Policy</h1></p>
<p><h5>Microphone Access</h5>
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.
</p>
<p><h5>Data Handling</h5>
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.</string>
The app <b>does not</b> store the raw audio captured from the microphone.
Only the <b>decoded images</b> resulting from the SSTV process are saved on your device\'s storage.
</p>
]]></string>
<string name="about">About Robot36</string>
<string name="about_text">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.</string>
<string name="about_text"><![CDATA[
<p><h1>Robot36 %1$s</h1>Copyright 2024 Ahmet Inan</p>
<p>Please read DISCLAIMER at the bottom of this page</p>
<p><h5>Description</h5>Decodes Slow Scan Television images from audio</p>
<p><h5>Implementation</h5><a href="https://github.com/xdsopl/robot36">Robot36 on GitHub</a><br />BSD Zero Clause License</p>
<p><h5>Mode specifications</h5><a href="http://www.barberdsp.com/downloads/Dayton%%20Paper.pdf">Dayton Paper</a><br />by JL Barber - 2000<br /></p>
<p><h5>DISCLAIMER</h5>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.</p>
]]></string>
</resources>