Skip to content

Commit

Permalink
Cleaning up and addressing issues with FIAM docs (#1693)
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonAHeron authored Jul 9, 2020
1 parent 6f6006e commit 334aa44
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,13 @@
* <p>Firebase In-App Messaging Display will automatically initialize, start listening for events,
* and display eligible in-app messages.
*
* <p>This feature uses a Firebase Instance ID token to:
* <p>This feature uses a Firebase Installation ID token to:
*
* <ul>
* <li>identify the app instance
* <li>fetch messages from the Firebase backend
* <li>send usage metrics to the Firebase backend.
* </ul>
*
* <p>To delete the Instance ID and the data associated with it, see {@link
* FirebaseInstallationsApi#delete}.
*/
@FirebaseAppScope
public class FirebaseInAppMessagingDisplay extends FirebaseInAppMessagingDisplayImpl {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@
*
* <p>Firebase In-App Messaging will automatically initialize, and start listening for events.
*
* <p>This feature uses a Firebase Instance ID token to:
* <p>This feature uses a Firebase Installation ID token to:
*
* <ul>
* <li>identify the app instance
* <li>fetch messages from the Firebase backend
* <li>send usage metrics to the Firebase backend.
* </ul>
*
* <p>To delete the Instance ID and the data associated with it, see {@link
* <p>To delete the Installation ID and the data associated with it, see {@link
* FirebaseInstallationsApi#delete()}.
*/
@FirebaseAppScope
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ private Action(@Nullable String actionUrl, @Nullable Button button) {
this.button = button;
}

/** Gets URL for action */
/** Gets the URL associated with this action */
@Nullable
public String getActionUrl() {
return actionUrl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@

import androidx.annotation.NonNull;

/** Provides the following about any message, */
/**
* Provides the following about any message,
* <li>Campaign ID
* <li>Campaign Name
* <li>Campaign Test Message State
*/
public class CampaignMetadata {
private final String campaignId;
private final String campaignName;
Expand All @@ -33,16 +38,19 @@ public CampaignMetadata(String campaignId, String campaignName, boolean isTestMe
this.isTestMessage = isTestMessage;
}

/** Gets the campaign id associated with this message */
@NonNull
public String getCampaignId() {
return campaignId;
}

/** Gets the campaign name associated with this message */
@NonNull
public String getCampaignName() {
return campaignName;
}

/** Returns true if the message is a test message */
public boolean getIsTestMessage() {
return isTestMessage;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public ImageData getPortraitImageData() {
return portraitImageData;
}

/** Gets the {@link ImageData} displayed when the phone is in a landcscape orientation */
/** Gets the {@link ImageData} displayed when the phone is in a landscape orientation */
@Nullable
public ImageData getLandscapeImageData() {
return landscapeImageData;
Expand Down Expand Up @@ -147,10 +147,7 @@ public Action getSecondaryAction() {
return secondaryAction;
}

/**
* @deprecated Use getPrimaryAction() instead. Gets the primary {@link Action} associated with
* this message
*/
/** @deprecated Use {@link #getPrimaryAction()} or {@link #getSecondaryAction()} instead. */
@Nullable
@Deprecated
@Override
Expand All @@ -173,8 +170,7 @@ public Text getBody() {
}

/**
* @deprecated Use getPortraitImageData() instead. Gets the {@link ImageData} associated with this
* message
* @deprecated Use {@link #getPortraitImageData()} or {@link #getLandscapeImageData()} instead.
*/
@Nullable
@Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,13 @@ public ImageData(@NonNull String imageUrl, @Nullable Bitmap bitmapData) {
this.bitmapData = bitmapData;
}

/** Gets the URL associated with this image */
@NonNull
public String getImageUrl() {
return imageUrl;
}

/** Gets the bitmap associated with this image */
@Nullable
public Bitmap getBitmapData() {
return bitmapData;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,35 +70,50 @@ public InAppMessage(
this.data = data;
}

/** @deprecated Use the message specific methods instead. */
/**
* @deprecated Use the message specific methods (see {@link CardMessage}, {@link ModalMessage},
* {@link BannerMessage}, {@link ImageOnlyMessage}) instead.
*/
@Nullable
@Deprecated
public Text getTitle() {
return title;
}

/** @deprecated Use the message specific methods (see {@link CardMessage}) instead. */
/**
* @deprecated Use the message specific methods (see {@link CardMessage}, {@link ModalMessage},
* {@link BannerMessage}, {@link ImageOnlyMessage}) instead.
*/
@Nullable
@Deprecated
public Text getBody() {
return body;
}

/** @deprecated Use the message specific methods (see {@link CardMessage}) instead. */
/**
* @deprecated Use the message specific methods (see {@link CardMessage}, {@link ModalMessage},
* {@link BannerMessage}, {@link ImageOnlyMessage}) instead.
*/
@Nullable
@Deprecated
public String getImageUrl() {
return imageUrl;
}

/** @deprecated Use the message specific methods (see {@link CardMessage}) instead. */
/**
* @deprecated Use the message specific methods (see {@link CardMessage}, {@link ModalMessage},
* {@link BannerMessage}, {@link ImageOnlyMessage}) instead.
*/
@Nullable
@Deprecated
public ImageData getImageData() {
return imageData;
}

/** @deprecated Use the message specific methods (see {@link CardMessage}) */
/**
* @deprecated Use the message specific methods (see {@link CardMessage}, {@link ModalMessage},
* {@link BannerMessage}, {@link ImageOnlyMessage}) instead.
*/
@Nullable
@Deprecated
public Button getActionButton() {
Expand All @@ -108,33 +123,39 @@ public Button getActionButton() {
return actionButton;
}

/** @deprecated Use the message specific methods (see {@link CardMessage}) instead. */
/**
* @deprecated Use the message specific methods (see {@link CardMessage}, {@link ModalMessage},
* {@link BannerMessage}, {@link ImageOnlyMessage}) instead.
*/
@Deprecated
@Nullable
public abstract Action getAction();

/** @deprecated Use the message specific methods (see {@link CardMessage}) instead. */
/**
* @deprecated Use the message specific methods (see {@link CardMessage}, {@link ModalMessage},
* {@link BannerMessage}, {@link ImageOnlyMessage}) instead.
*/
@Nullable
@Deprecated
public String getBackgroundHexColor() {
return backgroundHexColor;
}

/** @deprecated Use getCampaignMetadata().getCampaignId() instead. */
/** @deprecated Use {@link #getCampaignMetadata()#getCampaignId()} instead. */
@Nullable
@Deprecated
public String getCampaignId() {
return campaignMetadata.getCampaignId();
}

/** @deprecated Use getCampaignMetadata().getCampaignName() instead. */
/** @deprecated Use {@link #getCampaignMetadata()#getCampaignName()} instead. */
@Nullable
@Deprecated
public String getCampaignName() {
return campaignMetadata.getCampaignName();
}

/** @deprecated Use getCampaignMetadata().getIsTestMessage() instead. */
/** @deprecated Use {@link #getCampaignMetadata()#getIsTestMessage()} instead. */
@Nullable
@Deprecated
public Boolean getIsTestMessage() {
Expand All @@ -146,12 +167,17 @@ public Boolean getIsTestMessage() {
public MessageType getMessageType() {
return messageType;
}

/** Gets the {@link CampaignMetadata} of the message */
@Nullable
public CampaignMetadata getCampaignMetadata() {
return campaignMetadata;
}

/**
* Gets the extra data map of the message. This is defined in the Firebase Console for each
* campaign.
*/
@Nullable
public Map<String, String> getData() {
return data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public TriggeredInAppMessage(InAppMessage inAppMessage, String triggeringEvent)
}

public InAppMessage getInAppMessage() {

return inAppMessage;
}

Expand Down

0 comments on commit 334aa44

Please sign in to comment.