Package com.batch.android
Class IntentParser
- java.lang.Object
-
- com.batch.android.IntentParser
-
public final class IntentParser extends java.lang.ObjectIntent parser to retrieve promo code and other data
-
-
Constructor Summary
Constructors Constructor Description IntentParser(android.app.Activity activity)Init a parser with the intent of the activityIntentParser(android.content.Intent intent)Init a parser with the given intent
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancomesFromPush()Does this intent comes from a push notificationstatic voidcopyExtras(android.content.Intent from, android.content.Intent to)Copy all of Batch's possible internal extras from an intent to anotherstatic voidcopyExtras(android.os.Bundle from, android.os.Bundle to)Copy all of Batch's possible internal extras from a bundleBatchMessagegetLanding()Get the landing message and mark it as usedandroid.os.BundlegetPushBundle()InternalPushDatagetPushData()Retrieve the push data from the intent.java.lang.StringgetPushId()Retrieve the push identifier from the intent.booleanhasLanding()Does this intent contains a Batch Messaging landing messagebooleanhasPushPayload()booleanisLandingAlreadyShown()Does the landing message has been already shownbooleanisOpenAlreadyTracked()Does the open has been already trackedvoidmarkLandingAsAlreadyShown()Mark the open as already trackedvoidmarkOpenAsAlreadyTracked()Mark the open as already trackedstatic voidputPushExtrasToIntent(android.os.Bundle fullPayload, InternalPushData batchData, android.content.Intent launchIntent)Add push extras to an intent, to be picked up and tracked by Batch later
-
-
-
Method Detail
-
hasPushPayload
public boolean hasPushPayload()
-
comesFromPush
public boolean comesFromPush()
Does this intent comes from a push notification- Returns:
- true if it does
-
isOpenAlreadyTracked
public boolean isOpenAlreadyTracked()
Does the open has been already tracked- Returns:
- true if it was
-
markOpenAsAlreadyTracked
public void markOpenAsAlreadyTracked()
Mark the open as already tracked
-
hasLanding
public boolean hasLanding()
Does this intent contains a Batch Messaging landing message- Returns:
- true if it does
-
isLandingAlreadyShown
public boolean isLandingAlreadyShown()
Does the landing message has been already shown- Returns:
- true if it was
-
markLandingAsAlreadyShown
public void markLandingAsAlreadyShown()
Mark the open as already tracked
-
getLanding
@Nullable public BatchMessage getLanding()
Get the landing message and mark it as used- Returns:
- Batch Message to display
-
getPushId
public java.lang.String getPushId()
Retrieve the push identifier from the intent.- Returns:
- the push identifier
-
getPushData
public InternalPushData getPushData()
Retrieve the push data from the intent.- Returns:
- the push data
-
getPushBundle
public android.os.Bundle getPushBundle()
-
putPushExtrasToIntent
public static void putPushExtrasToIntent(android.os.Bundle fullPayload, InternalPushData batchData, android.content.Intent launchIntent)Add push extras to an intent, to be picked up and tracked by Batch later
-
copyExtras
public static void copyExtras(@Nullable android.content.Intent from, @Nullable android.content.Intent to)Copy all of Batch's possible internal extras from an intent to another
-
copyExtras
public static void copyExtras(@Nullable android.os.Bundle from, @Nullable android.os.Bundle to)Copy all of Batch's possible internal extras from a bundle
-
-