Skip to content

Commit

Permalink
Merge pull request #150 from grammatek/v1.3.x
Browse files Browse the repository at this point in the history
V1.3.x: merge latest changes to master
  • Loading branch information
lumpidu authored Jan 29, 2024
2 parents 56d7141 + 8276128 commit 137aa6f
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 15 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ android {
minSdkVersion 26
compileSdkVersion 33
targetSdkVersion 33
versionCode 27
versionName "1.3.0"
versionCode 30
versionName "1.3.1"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove"/>

<queries>
<intent>
<action android:name="android.intent.action.SENDTO" />
<data android:scheme="*" />
</intent>
</queries>

<application
android:name=".App"
android:allowBackup="false"
Expand Down
20 changes: 12 additions & 8 deletions app/src/main/java/com/grammatek/simaromur/EmailFeedback.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,26 @@ public void onCreate(Bundle savedInstanceState) {

protected void sendEmail() {
Log.v(LOG_TAG, "Send email");
String recipientEmail = "[email protected]";
String subject = getString(R.string.email_subject);
String msg = getString(R.string.email_message);
final String recipientEmail = "[email protected]";
final String subject = getString(R.string.email_subject);
final String msg = getString(R.string.email_message);
Intent emailIntent = new Intent(Intent.ACTION_SENDTO);
emailIntent.setData(Uri.parse("mailto:" + recipientEmail));
emailIntent.setData(Uri.parse("mailto:"));
emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[] {recipientEmail});
emailIntent.putExtra(Intent.EXTRA_SUBJECT, subject);
emailIntent.putExtra(Intent.EXTRA_TEXT, msg);

String sendMsg = getString(R.string.send_message);
final String sendMsg = getString(R.string.send_message);
try {
startActivity(Intent.createChooser(emailIntent, sendMsg));
finish();
if (emailIntent.resolveActivity(getPackageManager()) != null) {
startActivity(Intent.createChooser(emailIntent, sendMsg));
} else {
Toast.makeText(this, R.string.no_email_client, Toast.LENGTH_LONG).show();
}
Log.i("Finished sending email...", "");
} catch (android.content.ActivityNotFoundException ex) {
Toast.makeText(EmailFeedback.this, "There is no email client installed.", Toast.LENGTH_SHORT).show();
Toast.makeText(this, R.string.no_email_client, Toast.LENGTH_LONG).show();
}
finish();
}
}
3 changes: 1 addition & 2 deletions app/src/main/java/com/grammatek/simaromur/VoiceInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,8 @@ class DownloadObserver implements DownloadVoiceManager.Observer {

@Override
public void hasFinished(boolean success) {

// hide from the UI whether the download is a success or not.
findViewById(R.id.ccProgressBar).setVisibility(View.GONE);
runOnUiThread(() -> findViewById(R.id.ccProgressBar).setVisibility(View.GONE));
if (!success) {
runOnUiThread(() -> {
mProgressBar.setProgress(0);
Expand Down
8 changes: 5 additions & 3 deletions app/src/main/res/layout/activity_voice_info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -193,19 +193,20 @@
<Button
android:id="@+id/speak_button"
style="?attr/materialButtonOutlinedStyle"
app:strokeColor="@color/white"
app:strokeWidth="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:layout_marginBottom="16dp"
android:contentDescription="@string/speak_button"
android:text="@string/speak_voice_title"
android:textAppearance="@android:style/TextAppearance.Large"
android:textColor="@color/colorTextPrimary"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/speakable_text" />
app:layout_constraintTop_toBottomOf="@+id/speakable_text"
app:strokeColor="@color/white"
app:strokeWidth="5dp" />

<ProgressBar
android:id="@+id/progressBarPlay"
Expand All @@ -214,6 +215,7 @@
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:contentDescription="@string/speak_progress"
android:indeterminate="true"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="@+id/speak_button"
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values-is-rIS/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<string name="tts_settings_label">Stillingar fyrir talgervil</string>
<string name="voice_list_update">Sækja lista af röddum</string>
<string name="speak_button">Spila</string>
<string name="speak_progress">spilar</string>
<string name="voice_lang_title">Tungumál</string>
<string name="voice_name_title">Nafn</string>
<string name="voice_gender_title">Kyn</string>
Expand Down Expand Up @@ -84,4 +85,5 @@
<string name="voice_deletion_title">Eyða rödd</string>
<string name="voice_deletion_q">Virkilega eyða rödd?</string>
<string name="voice_deletion_not_possible">Þú getur ekki eytt röddinni sem er valin, vinsamlegast veldu aðra rödd og reyndu aftur</string>
<string name="no_email_client">Það er ekkert tölvupóstforrit uppsett</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<string name="tts_settings_label">TTS Settings</string>
<string name="voice_list_update">Download Voice List</string>
<string name="speak_button">Play</string>
<string name="speak_progress">playing</string>
<string name="voice_test_text_network">Þetta er netrödd. Texti til lestrar er sendur á netþjón, sem sendir upplesturinn til baka á snjallsímann. Netraddirnar eru enn sem komið er hraðvirkari en raddirnar á símanum sjálfum.</string>
<string name="voice_test_text_on_device">Þessi rödd er mynduð á snjallsímanum þínum. Enn sem komið er tekur raddmyndun á síma frekar langan tíma, en því öflugri sem síminn þinn er, því styttri tíma tekur að mynda röddina.</string>
<string name="voice_test_text_on_device_fast">Þetta er hröð rödd af heldur minni gæðum en aðrar raddir í Símarómi.</string>
Expand Down Expand Up @@ -84,4 +85,5 @@
<string name="voice_deletion_title">Delete voice</string>
<string name="voice_deletion_q">Really delete voice?</string>
<string name="voice_deletion_not_possible">You cannot delete the voice you are currently using, please select a different voice and try again</string>
<string name="no_email_client">There is no email client installed</string>
</resources>

0 comments on commit 137aa6f

Please sign in to comment.