Android Vungle广告不以纵向模式显示
我已经成功地将vungle视频广告集成到我的android应用程序中,但广告仅以横向模式显示,但我希望广告以纵向模式显示 我在清单文件中完成了以下实现Android Vungle广告不以纵向模式显示,android,vungle-ads,Android,Vungle Ads,我已经成功地将vungle视频广告集成到我的android应用程序中,但广告仅以横向模式显示,但我希望广告以纵向模式显示 我在清单文件中完成了以下实现 <activity android:name="com.vungle.publisher.FullScreenAdActivity" android:configChanges="keyboardHidden|orientation|screenSize" android:screenOrientation="portrait"
<activity
android:name="com.vungle.publisher.FullScreenAdActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/>
我在函数()中遵循了下面的编码
请帮助我仅以纵向视图显示广告
提前感谢您应该删除:
globalAdConfig.setOrientation(Orientation.matchVideo)
只留下:
globalAdConfig.setOrientation(方向.自动旋转)
如果您将设备置于纵向位置,它将在纵向位置显示广告。
“matchVideo”应该主要以横向模式显示
谢谢
<activity
android:name=".CreateGame"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustPan" />
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.creategame);
final String app_id = "App_id";
// initialize the Publisher SDK
vunglePub.init(this, app_id);
}
final AdConfig globalAdConfig = vunglePub.getGlobalAdConfig();
globalAdConfig.setOrientation(Orientation.autoRotate);
globalAdConfig.setOrientation(Orientation.matchVideo);
if(!vunglePub.isAdPlayable()) {
return;
}
else{
vunglePub.playAd(globalAdConfig);
}