Skip to content

Commit 334aa44

Browse files
authored
Cleaning up and addressing issues with FIAM docs (#1693)
1 parent 6f6006e commit 334aa44

File tree

8 files changed

+54
-26
lines changed

8 files changed

+54
-26
lines changed

firebase-inappmessaging-display/src/main/java/com/google/firebase/inappmessaging/display/FirebaseInAppMessagingDisplay.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,13 @@
6666
* <p>Firebase In-App Messaging Display will automatically initialize, start listening for events,
6767
* and display eligible in-app messages.
6868
*
69-
* <p>This feature uses a Firebase Instance ID token to:
69+
* <p>This feature uses a Firebase Installation ID token to:
7070
*
7171
* <ul>
7272
* <li>identify the app instance
7373
* <li>fetch messages from the Firebase backend
7474
* <li>send usage metrics to the Firebase backend.
7575
* </ul>
76-
*
77-
* <p>To delete the Instance ID and the data associated with it, see {@link
78-
* FirebaseInstallationsApi#delete}.
7976
*/
8077
@FirebaseAppScope
8178
public class FirebaseInAppMessagingDisplay extends FirebaseInAppMessagingDisplayImpl {

firebase-inappmessaging/src/main/java/com/google/firebase/inappmessaging/FirebaseInAppMessaging.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@
3737
*
3838
* <p>Firebase In-App Messaging will automatically initialize, and start listening for events.
3939
*
40-
* <p>This feature uses a Firebase Instance ID token to:
40+
* <p>This feature uses a Firebase Installation ID token to:
4141
*
4242
* <ul>
4343
* <li>identify the app instance
4444
* <li>fetch messages from the Firebase backend
4545
* <li>send usage metrics to the Firebase backend.
4646
* </ul>
4747
*
48-
* <p>To delete the Instance ID and the data associated with it, see {@link
48+
* <p>To delete the Installation ID and the data associated with it, see {@link
4949
* FirebaseInstallationsApi#delete()}.
5050
*/
5151
@FirebaseAppScope

firebase-inappmessaging/src/main/java/com/google/firebase/inappmessaging/model/Action.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ private Action(@Nullable String actionUrl, @Nullable Button button) {
6767
this.button = button;
6868
}
6969

70-
/** Gets URL for action */
70+
/** Gets the URL associated with this action */
7171
@Nullable
7272
public String getActionUrl() {
7373
return actionUrl;

firebase-inappmessaging/src/main/java/com/google/firebase/inappmessaging/model/CampaignMetadata.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@
1616

1717
import androidx.annotation.NonNull;
1818

19-
/** Provides the following about any message, */
19+
/**
20+
* Provides the following about any message,
21+
* <li>Campaign ID
22+
* <li>Campaign Name
23+
* <li>Campaign Test Message State
24+
*/
2025
public class CampaignMetadata {
2126
private final String campaignId;
2227
private final String campaignName;
@@ -33,16 +38,19 @@ public CampaignMetadata(String campaignId, String campaignName, boolean isTestMe
3338
this.isTestMessage = isTestMessage;
3439
}
3540

41+
/** Gets the campaign id associated with this message */
3642
@NonNull
3743
public String getCampaignId() {
3844
return campaignId;
3945
}
4046

47+
/** Gets the campaign name associated with this message */
4148
@NonNull
4249
public String getCampaignName() {
4350
return campaignName;
4451
}
4552

53+
/** Returns true if the message is a test message */
4654
public boolean getIsTestMessage() {
4755
return isTestMessage;
4856
}

firebase-inappmessaging/src/main/java/com/google/firebase/inappmessaging/model/CardMessage.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public ImageData getPortraitImageData() {
119119
return portraitImageData;
120120
}
121121

122-
/** Gets the {@link ImageData} displayed when the phone is in a landcscape orientation */
122+
/** Gets the {@link ImageData} displayed when the phone is in a landscape orientation */
123123
@Nullable
124124
public ImageData getLandscapeImageData() {
125125
return landscapeImageData;
@@ -147,10 +147,7 @@ public Action getSecondaryAction() {
147147
return secondaryAction;
148148
}
149149

150-
/**
151-
* @deprecated Use getPrimaryAction() instead. Gets the primary {@link Action} associated with
152-
* this message
153-
*/
150+
/** @deprecated Use {@link #getPrimaryAction()} or {@link #getSecondaryAction()} instead. */
154151
@Nullable
155152
@Deprecated
156153
@Override
@@ -173,8 +170,7 @@ public Text getBody() {
173170
}
174171

175172
/**
176-
* @deprecated Use getPortraitImageData() instead. Gets the {@link ImageData} associated with this
177-
* message
173+
* @deprecated Use {@link #getPortraitImageData()} or {@link #getLandscapeImageData()} instead.
178174
*/
179175
@Nullable
180176
@Deprecated

firebase-inappmessaging/src/main/java/com/google/firebase/inappmessaging/model/ImageData.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,13 @@ public ImageData(@NonNull String imageUrl, @Nullable Bitmap bitmapData) {
6565
this.bitmapData = bitmapData;
6666
}
6767

68+
/** Gets the URL associated with this image */
6869
@NonNull
6970
public String getImageUrl() {
7071
return imageUrl;
7172
}
7273

74+
/** Gets the bitmap associated with this image */
7375
@Nullable
7476
public Bitmap getBitmapData() {
7577
return bitmapData;

firebase-inappmessaging/src/main/java/com/google/firebase/inappmessaging/model/InAppMessage.java

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,35 +70,50 @@ public InAppMessage(
7070
this.data = data;
7171
}
7272

73-
/** @deprecated Use the message specific methods instead. */
73+
/**
74+
* @deprecated Use the message specific methods (see {@link CardMessage}, {@link ModalMessage},
75+
* {@link BannerMessage}, {@link ImageOnlyMessage}) instead.
76+
*/
7477
@Nullable
7578
@Deprecated
7679
public Text getTitle() {
7780
return title;
7881
}
7982

80-
/** @deprecated Use the message specific methods (see {@link CardMessage}) instead. */
83+
/**
84+
* @deprecated Use the message specific methods (see {@link CardMessage}, {@link ModalMessage},
85+
* {@link BannerMessage}, {@link ImageOnlyMessage}) instead.
86+
*/
8187
@Nullable
8288
@Deprecated
8389
public Text getBody() {
8490
return body;
8591
}
8692

87-
/** @deprecated Use the message specific methods (see {@link CardMessage}) instead. */
93+
/**
94+
* @deprecated Use the message specific methods (see {@link CardMessage}, {@link ModalMessage},
95+
* {@link BannerMessage}, {@link ImageOnlyMessage}) instead.
96+
*/
8897
@Nullable
8998
@Deprecated
9099
public String getImageUrl() {
91100
return imageUrl;
92101
}
93102

94-
/** @deprecated Use the message specific methods (see {@link CardMessage}) instead. */
103+
/**
104+
* @deprecated Use the message specific methods (see {@link CardMessage}, {@link ModalMessage},
105+
* {@link BannerMessage}, {@link ImageOnlyMessage}) instead.
106+
*/
95107
@Nullable
96108
@Deprecated
97109
public ImageData getImageData() {
98110
return imageData;
99111
}
100112

101-
/** @deprecated Use the message specific methods (see {@link CardMessage}) */
113+
/**
114+
* @deprecated Use the message specific methods (see {@link CardMessage}, {@link ModalMessage},
115+
* {@link BannerMessage}, {@link ImageOnlyMessage}) instead.
116+
*/
102117
@Nullable
103118
@Deprecated
104119
public Button getActionButton() {
@@ -108,33 +123,39 @@ public Button getActionButton() {
108123
return actionButton;
109124
}
110125

111-
/** @deprecated Use the message specific methods (see {@link CardMessage}) instead. */
126+
/**
127+
* @deprecated Use the message specific methods (see {@link CardMessage}, {@link ModalMessage},
128+
* {@link BannerMessage}, {@link ImageOnlyMessage}) instead.
129+
*/
112130
@Deprecated
113131
@Nullable
114132
public abstract Action getAction();
115133

116-
/** @deprecated Use the message specific methods (see {@link CardMessage}) instead. */
134+
/**
135+
* @deprecated Use the message specific methods (see {@link CardMessage}, {@link ModalMessage},
136+
* {@link BannerMessage}, {@link ImageOnlyMessage}) instead.
137+
*/
117138
@Nullable
118139
@Deprecated
119140
public String getBackgroundHexColor() {
120141
return backgroundHexColor;
121142
}
122143

123-
/** @deprecated Use getCampaignMetadata().getCampaignId() instead. */
144+
/** @deprecated Use {@link #getCampaignMetadata()#getCampaignId()} instead. */
124145
@Nullable
125146
@Deprecated
126147
public String getCampaignId() {
127148
return campaignMetadata.getCampaignId();
128149
}
129150

130-
/** @deprecated Use getCampaignMetadata().getCampaignName() instead. */
151+
/** @deprecated Use {@link #getCampaignMetadata()#getCampaignName()} instead. */
131152
@Nullable
132153
@Deprecated
133154
public String getCampaignName() {
134155
return campaignMetadata.getCampaignName();
135156
}
136157

137-
/** @deprecated Use getCampaignMetadata().getIsTestMessage() instead. */
158+
/** @deprecated Use {@link #getCampaignMetadata()#getIsTestMessage()} instead. */
138159
@Nullable
139160
@Deprecated
140161
public Boolean getIsTestMessage() {
@@ -146,12 +167,17 @@ public Boolean getIsTestMessage() {
146167
public MessageType getMessageType() {
147168
return messageType;
148169
}
170+
149171
/** Gets the {@link CampaignMetadata} of the message */
150172
@Nullable
151173
public CampaignMetadata getCampaignMetadata() {
152174
return campaignMetadata;
153175
}
154176

177+
/**
178+
* Gets the extra data map of the message. This is defined in the Firebase Console for each
179+
* campaign.
180+
*/
155181
@Nullable
156182
public Map<String, String> getData() {
157183
return data;

firebase-inappmessaging/src/main/java/com/google/firebase/inappmessaging/model/TriggeredInAppMessage.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ public TriggeredInAppMessage(InAppMessage inAppMessage, String triggeringEvent)
2525
}
2626

2727
public InAppMessage getInAppMessage() {
28-
2928
return inAppMessage;
3029
}
3130

0 commit comments

Comments
 (0)