blob: e7e252fa6654fe86230dde83562a9df56af165e0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
package com.mapswithme.maps.ads;
import android.content.Context;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
interface NativeAdLoader
{
/**
* Loads an ad for the specified banner id. A caller will be notified about loading through
* {@link NativeAdListener} interface.
*
* @param context An activity context.
* @param bannerId A banner id that ad will be loaded for.
*/
void loadAd(@NonNull Context context, @NonNull String bannerId);
/**
* Caller should set this listener to be informed about status of an ad loading.
*
* @see NativeAdListener
*/
void setAdListener(@Nullable NativeAdListener adListener);
/**
* Indicated whether the ad for the specified banner is loading right now or not.
*
* @param bannerId A specified banner id.
* @return <code>true</code> if loading is in a progress, otherwise - <code>false</code>.
*/
boolean isAdLoading(@NonNull String bannerId);
/**
* Cancels the loading process.
*
*/
void cancel();
/**
* Detaches this loader from UI context. Must be called every time when current UI context is going
* to be destroyed. Otherwise, memory leaks are possible.
*/
void detach();
/**
* Attaches this loader to UI context.
*/
void attach();
}
|