Skip to content

Commit

Permalink
Fix: Text-to-speech not working (#186)
Browse files Browse the repository at this point in the history
* Android - TTS | manage permissions

* Article - TTS | mentioning Binding context to the TTS button
  • Loading branch information
bricefriha authored Jan 30, 2025
1 parent 5a4db0c commit 4e7ae8f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions App/Platforms/Android/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@
<action android:name="android.intent.action.VIEW" />
<data android:scheme="https"/>
</intent>
<intent>
<action android:name="android.intent.action.TTS_SERVICE" />
</intent>
</queries>
</manifest>
8 changes: 6 additions & 2 deletions App/Views/ArticlePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,13 @@
<Border Grid.Column="2"
Style="{StaticResource ButtonBorder}"
Padding="0"
BackgroundColor="{Binding TtsColour}">
BackgroundColor="{Binding TtsColour}"
x:Name="TtsButton">
<Border.Behaviors>
<mct:TouchBehavior Command="{Binding PlayTextToSpeech}"/>
<mct:TouchBehavior Command="{Binding PlayTextToSpeech}"
BindingContext="{Binding BindingContext,
Source={x:Reference thy},
x:DataType=ContentPage}"/>
</Border.Behaviors>

<Label TextColor="{StaticResource Primary}"
Expand Down

0 comments on commit 4e7ae8f

Please sign in to comment.