0
一旦我的应用程序开始播放并显示VideoCastControllerActivity,硬件返回按钮将不会将其返回到我的活动。操作栏后退按钮工作得很好。我没有看到日志或任何错误,看着VideoCastControllerActivity我没有看到任何明显的尝试捕获后退按钮的行为或任何东西。要开始它,我打电话给startCastControllerActivity
。如何让VideoCastControllerActivity上的硬件返回按钮正常工作?
这里是我的清单的声明它的块:
<activity
android:name="com.google.sample.castcompanionlibrary.cast.player.VideoCastControllerActivity"
android:label="@string/app_name"
android:launchMode="singleTask"
android:parentActivityName="com.mypackage.myactivity"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.mypackage.myactivity" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
感谢。
发现错误'super.onKeyDown(keyCode,event);'因为'mVolumeIncrement'检查而没有被调用。 – casolorz
你的意思是CCL或你的代码中的错误? –
我更新了CCL以确保用户是否未为VOLUME_INCREMENT设置值,该活动中的默认逻辑会正确处理该值;文档也会更新。 –