So let's look at our app now when
we've implemented interstitial ads.
So if we click on Interstitial Ad here,
you can see that we have two buttons
here now, Load Interstitial,
Interstitial Not Ready, and
Interstitial Not Ready is disabled.
Once I click on Load Interstitial,
the text of this button should change,
we should get an onAdLoaded() callback.
And once the interstitial is loaded,
the text of this button should change to
Show Interstitial, and it should
be enabled, so let's try that out.
So I click Load Interstitial here,
title changes, onAdLoaded(),
is called,
Show Interstitial is now enabled.
All right, so that works.
Now if I press Show Interstitial,
you can see onAdOpened() is called and
we can see our interstitial ad.
And if I click on it,
onAdLeftApplication(), and
we get into the details
of the interstitial.
Can go back, close the interstitial,
the ad is closed, and now you see
we're back to the original state.
So what if I disable
network connectivity here?
So now we're in flight mode and
pressing Load Interstitial should fail.
So I press Load Interstitial,
you see onAdFailedToLoad, so
this is the callback with the reason for
the error.
And you can also see that we've
displayed the error reason here and
the button is disabled.
All right, so everything works.
لنلقي نظرة على تطبيقنا الآن عند تنفيذنا
للإعلانات البينية.
في حالة النقر هنا على إعلان بيني،
يمكنكم مشاهدة أنه لدينا زرين الآن، تحميل
إعلان بيني
وإعلان بيني غير جاهز وإعلان بيني غير
جاهز مُعطل.
بمجرد النقر على تحميل إعلان بيني، يجب أن
يتغير نص هذا الزر.
يجب أن نحصل على استدعاء تحميل إعلان().
وبمجرد تحميل الإعلان البيني، يجب أن يتغير
نص هذا الزر إلى
عرض الإعلان البيني، ويجب أن يُمكّن،
لنحاول تنفيذ ذلك بالخارج.
لذلك انقر تحميل الإعلان البيني هنا،
تغييرات المُسمى، تحميل الإعلان()،
تم استدعائه، تم تمكين عرض الإعلان
البيني الآن.
حسنًا، هذا يعمل.
الآن، في حالة الضغط على عرض الإعلانالبيني،
يمكنكم مشاهدة استدعاء فتح الإعلان ()
يمكننا رؤية إعلاننا
البيني.
في حالة النقرعليه، "مغادرة الإعلان للتطبيق
()"، و
ننتقل إلى تفاصيل الإعلان البيني.
يمكنكم الرجوع، إغلاق الإعلان البيني،
تم إغلاق الإعلان، ويمكنكم الآن مشاهدة
أننا نرجع إلى الوضع الأصلي.
ماذا يحدث في حالة تعطيل اتصال الشبكة هنا؟
الآن نحن في وضع الطيران حيث حتمية
فشل الضغط على تحميل الإعلان البيني.
أقوم بالضغط على تحميل إعلان بيني، يمكنك
مشاهدة "فشل تحميل الإعلان"، لذلك
هذا استدعاء بسبب الخطأ.
يمكنك أيضًا مشاهدة أننا قد عرضنا
سبب الخطأ هنا
والزر مُعطل.
حسنًا، كل شئ يعمل.
그러므로 틈새 광고를 구현하면서 앱을 보겠습니다.
그러므로 만약 우리가 여기 틈새 광고를 클릭하면
우리가 여기 두 버튼을 가졌다는 사실을 볼 수 있습니다. Load Interstitial과
Interstitial Not Ready 그리고 Interstitial Not Ready는 이용하지 못합니다.
내가 Load Interstitial을 클릭했을 때 이 버튼의 문구는 바뀌어야 합니다.
우리는 onAdLoaded() callback을 얻어야 합니다.
그리고 틈새광고를 로드하면, 이 버튼의 문구가
Show interstitial로 바뀝니다. 그리고 이용이 가능해야 합니다. 그러므로 저것을 해봅시다.
그러므로 여기 Load Interstitial을 클릭합니다 제목이 바뀌었습니다.
onAdLoaded()라고 부르죠. Show Interstitial이 이제 가능합니다.
좋습니다. 이제 작동하네요.
ㅇ제 만약 내가 Show Interstitial을 누르면, 우리는 onAdOpened()를 호출함을
알게 되고 우리는 틈새 광고를 볼 수 있습니다.
그리고 만약 이것을 클릭하면 onAdLeftApplication()이 되고
우리는 틈새 광고의 세부 요소를 알게 됩니다.
뒤로 돌아가서 틈새 광고를 더 밀접히 보겠습니다.
광고를 닫고, 이제 우리가 처음의 문구로 돌아간다는 사실을 보십시오.
그러므로 만약 내가 여기에서 네트워크 연결성을 가능하지 않기로 설정하면 어떨까요?
그러므로 이제 우리는 비행 모드인 상태에서 Load Interstitial을 누르면 실패를 하게 됩니다.
그러므로 나는 Load Interstitial 을 누르고, onAdFailedToLoad를 봅니다. 그러므로
이것이 오류의 이유가 되는 콜백입니다.
그리고 우리가 여기에 오류의 이유를 전시해 놓았다는 사실을 볼 수 있습니다.
그리고 버튼은 상요하지 않기로 설정되어 있네요.
좋습니다. 전부 다 했습니다.
Vamos ver o nosso aplicativo agora,
quando implementamos os
anúncios intersticiais.
Se você clicar no anúncio intersticial,
verá que temos
dois botões aqui,
Load Interstitial e
Intersticial Not Ready,
, e o botão Interstitial Not Ready está desativado.
Quando eu clicar em Load Interstitial,
o texto desse botão
deverá mudar
e vamos obter um callback onAdLoaded().
E quando o intersticial estiver carregado,
o texto desse botão
deverá mudar para Show Interstitial
e deverá estar ativado,
então, vamos tentar.
Vou clicar aqui em Load Interstitial,
o título muda, onAdLoaded(),
á chamado e
Show Interstitial agora está ativado.
Tudo bem, isso funciona.
Agora, se eu pressionar Show Interstitial,
você poderá ver que onAdOpened() é chamado
e podemos ver o nosso anúncio intersticial.
E se eu clicar nele,
onAdLeftApplication(),
obteremos os detalhes
do intersticial.
Posso voltar,
fechar o intersticial,
o anúncio é fechado e agora você verá que
voltamos ao estado original.
E se eu desativar
a conectividade da rede aqui?
Agora estamos em modo avião
e pressionar Load Interstitial
vai falhar.
Eu pressiono Load Interstitial e
você vê onAdFailedToLoad,
esse é o callback
com o motivo do erro.
Você também pode ver que
exibimos o motivo do erro aqui
e o botão é desativado.
Certo,
então tudo funciona.
接下来我们看一下
实施插播式广告后的应用。
单击这里的“插播式广告”,
您可以看到,现在我们有两个按钮,
就是“加载插播式广告”
与“插播式广告未准备就绪”,
而“插播式广告未准备就绪”按钮已禁用。
单击“加载插播式广告”,
该按钮的文本就会变化,
我们将获得 onAdLoaded() 回调。
加载插播式广告后,
该按钮的文本将更改为
“显示插播式广告”,并且会
启用,接下来我们试一下。
单击“加载插播式广告”,
标题发生变化,
调用 onAdLoaded(),
现在已启用“显示插播式广告”。
很好,运行正常。
如果按下“显示插播式广告”,
您可以看到会调用 onAdOpened(),
我们可以看到插播式广告。
单击广告,会调用
onAdLeftApplication(),
将显示插播式广告的
详细信息。
现在返回,关闭插播式广告,
广告将关闭,您可以看到
我们已回到最初的状态。
如果我禁用
网络连接功能,会怎样呢?
现在,我们处于飞行模式中,
按下“加载插播式广告”将失败。
按下“加载插播式广告”,
您可以看到 onAdFailedToLoad,
这是说明错误
原因的回调。
您还可以看到,
这里显示了错误原因,
该按钮已禁用。
很好,所有功能都正常。