Added initialization MoPub banner id

This commit is contained in:
r.kuznetsov 2018-05-25 16:14:05 +03:00 committed by yoksnod
parent e30e692009
commit c0a9023b36
4 changed files with 20 additions and 0 deletions

View file

@ -11,6 +11,7 @@
#include "partners_api/ads_engine.hpp"
#include "partners_api/banner.hpp"
#include "partners_api/mopub_ads.hpp"
#include "storage/storage_helpers.hpp"
@ -1616,4 +1617,10 @@ Java_com_mapswithme_maps_Framework_nativeGetFilterRating(JNIEnv * env, jclass, j
{
return static_cast<jint>(place_page::rating::GetFilterRating(rawRating));
}
JNIEXPORT jstring JNICALL
Java_com_mapswithme_maps_Framework_nativeMoPubInitializationBannerId(JNIEnv * env, jclass)
{
return jni::ToJavaString(env, ads::Mopub::InitializationBannerId());
}
} // extern "C"

View file

@ -433,4 +433,7 @@ public class Framework
public static native void nativeShowFeatureByLatLon(double lat, double lon);
private static native int nativeGetFilterRating(float rawRating);
@NonNull
public static native String nativeMoPubInitializationBannerId();
}

View file

@ -83,4 +83,10 @@ std::string Mopub::GetBannerIdForOtherTypes() const
{
return kNonTourismPlacementId;
}
// static
std::string Mopub::InitializationBannerId()
{
return kSponsoredBannerPlacementId;
}
} // namespace ads

View file

@ -2,6 +2,8 @@
#include "partners_api/ads_base.hpp"
#include <string>
namespace ads
{
// Class which matches feature types and mopub banner ids.
@ -12,5 +14,7 @@ public:
// ContainerBase overrides:
std::string GetBannerIdForOtherTypes() const override;
static std::string InitializationBannerId();
};
} // namespace ads