Skip to content

Commit 2726909

Browse files
authored
Add minimum Android version requirements to MediaElement.md (#513)
Add minimum Android Version requirements to MediaElement.md As seen in [this](CommunityToolkit/Maui#2485) bug ticket. This configuration can prevent this exception: Java.Lang.AbstractMethodError Message=abstract method "void androidx.media3.common.Player$Listener.onSurfaceSizeChanged(int, int)"
1 parent 840c2b6 commit 2726909

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docs/maui/views/MediaElement.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,13 @@ public class MainActivity : MauiAppCompatActivity
8888
</service>
8989
```
9090

91-
#### 3. Add the following permissions to `AndroidManifest.xml`
91+
#### 3. Update the minimum android API version
92+
In the project's `.csproj` file, update the minimum android API version to 26.
93+
```xml
94+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">26.0</SupportedOSPlatformVersion>
95+
```
96+
97+
#### 4. Add the following permissions to `AndroidManifest.xml`
9298

9399
```csharp
94100
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

0 commit comments

Comments
 (0)