Package com.mparticle.messaging
Class ProviderCloudMessage
- java.lang.Object
-
- com.mparticle.messaging.ProviderCloudMessage
-
- All Implemented Interfaces:
android.os.Parcelable
public class ProviderCloudMessage extends java.lang.Object implements android.os.Parcelable
Representation of an FCM/push sent by a 3rd party such as Urban Airship or Mixpanel.
-
-
Field Summary
Fields Modifier and Type Field Description static android.os.Parcelable.Creator<ProviderCloudMessage>
CREATOR
static int
FLAG_DIRECT_OPEN
static int
FLAG_DISPLAYED
static int
FLAG_INFLUENCE_OPEN
static int
FLAG_READ
static int
FLAG_RECEIVED
protected android.os.Bundle
mExtras
-
Constructor Summary
Constructors Constructor Description ProviderCloudMessage(android.os.Bundle extras, org.json.JSONArray pushKeys)
ProviderCloudMessage(android.os.Parcel pc)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description android.app.Notification
buildNotification(android.content.Context context)
android.app.Notification
buildNotification(android.content.Context context, long time)
static ProviderCloudMessage
createMessage(android.content.Intent intent, org.json.JSONArray keys)
int
describeContents()
long
getActualDeliveryTime()
android.content.Intent
getDefaultOpenIntent(android.content.Context context, ProviderCloudMessage message)
boolean
getDisplayed()
android.os.Bundle
getExtras()
protected static int
getFallbackIcon(android.content.Context context)
protected static java.lang.String
getFallbackTitle(android.content.Context context)
int
getId()
protected static android.app.PendingIntent
getLoopbackIntent(android.content.Context context, ProviderCloudMessage message, java.lang.String id)
java.lang.String
getPrimaryMessage(android.content.Context context)
org.json.JSONObject
getRedactedJsonPayload()
Note that the actual message is stripped from the extras bundle in findProviderMessage().void
setActualDeliveryTime(long time)
void
setDisplayed(boolean displayed)
boolean
shouldDisplay()
void
writeToParcel(android.os.Parcel dest, int flags)
-
-
-
Field Detail
-
FLAG_RECEIVED
public static final int FLAG_RECEIVED
- See Also:
- Constant Field Values
-
FLAG_DIRECT_OPEN
public static final int FLAG_DIRECT_OPEN
- See Also:
- Constant Field Values
-
FLAG_READ
public static final int FLAG_READ
- See Also:
- Constant Field Values
-
FLAG_INFLUENCE_OPEN
public static final int FLAG_INFLUENCE_OPEN
- See Also:
- Constant Field Values
-
FLAG_DISPLAYED
public static final int FLAG_DISPLAYED
- See Also:
- Constant Field Values
-
mExtras
protected android.os.Bundle mExtras
-
CREATOR
public static final android.os.Parcelable.Creator<ProviderCloudMessage> CREATOR
-
-
Method Detail
-
buildNotification
@NonNull public android.app.Notification buildNotification(@NonNull android.content.Context context, long time)
-
describeContents
public int describeContents()
- Specified by:
describeContents
in interfaceandroid.os.Parcelable
-
writeToParcel
public void writeToParcel(android.os.Parcel dest, int flags)
- Specified by:
writeToParcel
in interfaceandroid.os.Parcelable
-
getId
@NonNull public int getId()
-
getPrimaryMessage
@NonNull public java.lang.String getPrimaryMessage(@NonNull android.content.Context context)
-
getRedactedJsonPayload
@NonNull public org.json.JSONObject getRedactedJsonPayload()
Note that the actual message is stripped from the extras bundle in findProviderMessage().- Returns:
-
buildNotification
@NonNull public android.app.Notification buildNotification(@NonNull android.content.Context context)
-
createMessage
@NonNull public static ProviderCloudMessage createMessage(@NonNull android.content.Intent intent, @Nullable org.json.JSONArray keys)
-
getLoopbackIntent
protected static android.app.PendingIntent getLoopbackIntent(android.content.Context context, ProviderCloudMessage message, java.lang.String id)
-
getFallbackTitle
@Nullable protected static java.lang.String getFallbackTitle(@NonNull android.content.Context context)
-
getFallbackIcon
protected static int getFallbackIcon(@NonNull android.content.Context context)
-
shouldDisplay
public boolean shouldDisplay()
-
getActualDeliveryTime
public long getActualDeliveryTime()
-
setActualDeliveryTime
public void setActualDeliveryTime(long time)
-
setDisplayed
public void setDisplayed(boolean displayed)
-
getDisplayed
public boolean getDisplayed()
-
getDefaultOpenIntent
@NonNull public android.content.Intent getDefaultOpenIntent(android.content.Context context, ProviderCloudMessage message)
-
getExtras
public android.os.Bundle getExtras()
-
-