Reputation: 11
I'm facing an issue with displaying rewarded ads in my Android app using the ironSource SDK. When I try to show a rewarded video, I'm getting the following error message: "API: showRewardedVideo error: show called while no ads are available". Additionally, I'm seeing a warning message stating that my app requires the Google Play Store, but it is missing.
I have followed the documentation and integrated the ironSource SDK correctly. I have also configured the ad units and placements in my ironSource account, and they are active. I'm testing the app on an Android emulator in Android Studio.
I would like to know if there are any specific steps or configurations that I might be missing in order to make the rewarded ads work properly. Is there any additional setup or initialization required for the ironSource SDK? Could this issue be related to the absence of the Google Play Store on the emulator?
Any guidance or insights on how to resolve this issue would be greatly appreciated. Thank you in advance for your help!
and my code now
ublic class testMain extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_test_main);
IronSource.init(this, "197be235d");
IronSource.loadRewardedVideo();
IronSource.setLevelPlayRewardedVideoListener(new LevelPlayRewardedVideoListener() {
// Indicates that there's an available ad.
// The adInfo object includes information about the ad that was loaded successfully
// Use this callback instead of onRewardedVideoAvailabilityChanged(true)
@Override
public void onAdAvailable(AdInfo adInfo) {}
// Indicates that no ads are available to be displayed
// Use this callback instead of onRewardedVideoAvailabilityChanged(false)
@Override
public void onAdUnavailable() {}
// The Rewarded Video ad view has opened. Your activity will loose focus
@Override
public void onAdOpened(AdInfo adInfo) {}
// The Rewarded Video ad view is about to be closed. Your activity will regain its focus
@Override
public void onAdClosed(AdInfo adInfo) {}
// The user completed to watch the video, and should be rewarded.
// The placement parameter will include the reward data.
// When using server-to-server callbacks, you may ignore this event and wait for the ironSource server callback
@Override
public void onAdRewarded(Placement placement, AdInfo adInfo) {}
// The rewarded video ad was failed to show
@Override
public void onAdShowFailed(IronSourceError error, AdInfo adInfo) {}
// Invoked when the video ad was clicked.
// This callback is not supported by all networks, and we recommend using it
// only if it's supported by all networks you included in your build
@Override
public void onAdClicked(Placement placement, AdInfo adInfo) {}
});
IronSource.setLevelPlayInterstitialListener(new LevelPlayInterstitialListener() {
// Invoked when the interstitial ad was loaded successfully.
// AdInfo parameter includes information about the loaded ad
@Override
public void onAdReady(AdInfo adInfo) {}
// Indicates that the ad failed to be loaded
@Override
public void onAdLoadFailed(IronSourceError error) {}
// Invoked when the Interstitial Ad Unit has opened, and user left the application screen.
// This is the impression indication.
@Override
public void onAdOpened(AdInfo adInfo) {}
// Invoked when the interstitial ad closed and the user went back to the application screen.
@Override
public void onAdClosed(AdInfo adInfo) {}
// Invoked when the ad failed to show
@Override
public void onAdShowFailed(IronSourceError error, AdInfo adInfo) {}
// Invoked when end user clicked on the interstitial ad
@Override
public void onAdClicked(AdInfo adInfo) {}
// Invoked before the interstitial ad was opened, and before the InterstitialOnAdOpenedEvent is reported.
// This callback is not supported by all networks, and we recommend using it only if
// it's supported by all networks you included in your build.
@Override
public void onAdShowSucceeded(AdInfo adInfo){}
});
IronSource.loadInterstitial();
}
public void radst(View view) {
IronSource.showRewardedVideo("DefaultRewardedVideo");
}
public void iadst(View view) {
IronSource.showInterstitial("DefaultInterstitial");
}
protected void onResume() {
super.onResume();
IronSource.onResume(this);
}
protected void onPause() {
super.onPause();
IronSource.onPause(this);
}
}
I am facing an issue with displaying rewarded ads in my Android app using ironSource SDK. I have followed the documentation and implemented the necessary code, but the rewarded ads are not showing up as expected. Here are the details of what I have tried:
Integrated ironSource SDK into my app following the provided instructions. Configured the ad unit and placement settings in the ironSource dashboard. Implemented the necessary code to load and show rewarded ads in the appropriate part of my app. Checked the logcat for any error messages or warnings related to the ad display. Expected behavior: I expect the rewarded ads to be displayed when the corresponding action is triggered by the user. The ads should provide a reward upon completion and then resume the app's normal flow.
Actual result: However, when I trigger the action to show the rewarded ad, I receive the following error message in the logcat: "API: showRewardedVideo error: show called while no ads are available"
I have also noticed the following warning message: "com.example.myapplication requires the Google Play Store, but it is missing."
I would greatly appreciate any assistance or insights into resolving this issue. Thank you in advance for your help.
Upvotes: 1
Views: 899