mirror of
https://github.com/samsonjs/media.git
synced 2026-04-05 11:15:46 +00:00
Provide a helper Composable for remembering the state instance and launching the listening coroutine that observes the changes in the Player Add an example to demo-compose of using PlayPauseButtonState inside a PlayPauseButton Composable. The smart State object has been deemed a preferred solution over collecting Flows due to queuing/timing/buffering limitations. Instead, it uses the new `Player.listen` suspending extension function to catch the relevant events. PiperOrigin-RevId: 691879975
35 lines
1.3 KiB
XML
35 lines
1.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- Copyright (C) 2024 The Android Open Source Project
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
https://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
|
|
<manifest package="androidx.media3.ui.compose.test"
|
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
|
<uses-sdk/>
|
|
|
|
<application>
|
|
<!--
|
|
Setting a base ComponentActivity as the test app's main activity.
|
|
The androidx.compose.ui.test.junit4.createComposeRule() defaults to this
|
|
activity, so in order for the runner to resolve it, it must be defined here.
|
|
-->
|
|
<activity android:name="androidx.activity.ComponentActivity"
|
|
android:exported="true">
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.MAIN" />
|
|
<category android:name="android.intent.category.LAUNCHER" />
|
|
</intent-filter>
|
|
</activity>
|
|
</application>
|
|
</manifest>
|