-
Notifications
You must be signed in to change notification settings - Fork 398
/
InvitePresenter.java
53 lines (42 loc) · 1.25 KB
/
InvitePresenter.java
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
50
51
52
53
package com.google.firebase.dynamicinvites.presenter;
import android.content.Context;
import androidx.annotation.DrawableRes;
import com.google.firebase.dynamicinvites.kotlin.model.InviteContent;
// [START ddl_invite_presenter]
/**
* Presents the invite using a specific method, such as email or social.
*/
public class InvitePresenter {
/**
* The user-visible name of the invite method, like 'Email' or 'SMS'
**/
public final String name;
/**
* An icon representing the invite method.
**/
@DrawableRes
public final int icon;
/**
* Whether or not the method is available on this device. For example, SMS is phone only.
**/
public final boolean isAvailable;
/**
* The Content of the invitation
**/
public final InviteContent content;
public InvitePresenter(String name, @DrawableRes int icon, boolean isAvailable, InviteContent content) {
// [START_EXCLUDE]
this.name = name;
this.icon = icon;
this.isAvailable = isAvailable;
this.content = content;
// [END_EXCLUDE]
}
/**
* Send the invitation using the specified method.
*/
public void sendInvite(Context context) {
// ...
}
}
// [END ddl_invite_presenter]