HomeAppVirality DocsAndroid SDK IntegrationPublic Classes

Public Classes

There are various classes used by the AppVirality SDK 2.0 as the POJO(Plain Old Java Object) classes for storing and accessing various related properties efficiently, allowing the SDK to easily manage and structure large sets of data.

Also, it is much easier for the developers integrating our SDK to understand data being returned or passed as part of the various methods or callbacks, making the whole integration process simple.

This class contains various member variables, each specifying some campaign related data important for running the campaigns across user devices.

CampaignDetail Member Variables
Parameter Type Decription
campaignId String Identifier for the campaign
campaignName String Name of the campaign as set on the dashboard
growthHackType enum Type of the growth hack
Ex, Constants.GrowthHackType.Word_of_Mouth, Constants.GrowthHackType.Loyalty_Program, etc.
campaignImgUrl String URL of the image to be used as campaign image
campaignTitle String URL-encoded Campaign Title as set on dashboard
campaignDescription String URL-encoded Campaign Description as set on dashboard
campaignTitleColor String Color code to be used for Campaign Title
campaignDescriptionColor String Color code to be used for Campaign Description
launchMessage String URL-encoded message to be shown with the popup or mini notification for launching growth hack
launchIconId int Identifier for the icon to be used with the popup or mini notification for launching growth hack
launchBgColor String Background color code to be used with the popup or mini notification for launching growth hack
launchMsgColor String Color code for the message to be shown with the popup or mini notification for launching growth hack
launchBtnBgColor String Background color code for the buttons to be used with the popup or mini notification for launching growth hack
launchBtnTxt String Launch button text to be used with the popup or mini notification for launching growth hack
launchBtnTxtColor String Color code for the Launch button text to be used with the popup or mini notification for launching growth hack
remindBtnTxt String Remind button text to be used with the popup or mini notification for launching growth hack
enableMini boolean To show Mini Notification for launching growth hack or not
enablePopUp boolean To show Popup for launching growth hack or not
userWillChoose boolean To know if coupon distribution option is set as User will choose on dashboard
campaignBgColor String Background color code for the campaign
customDomain String Custom Domain to be used in the Share Link
lastModifiedDate String Last date on which campaign has been modified
shortCode String User’s Short Code to be used in the Share Link
referralCode String User’s Referral Code
shareUrl String User’s Share Link
isRewardExists boolean To know if any reward exists for the campaign or not
daysAfterLaunch String Number of days to wait after first app launch to start showing Popup or Mini Notification
noOfLaunches String Number of launches to wait after install to start showing Popup or Mini Notification
forEveryNDays String Number of days to wait from last notification display for showing Popup or Mini Notification
onRemindMeLater String Number of days to wait for showing Popup or Mini Notification again if user earlier chose to remind later
showCampaignFor String Number of times a Popup or Mini Notification can be shown to the user
showCustomLink boolean Whether to show Custom Link as one of the social actions for sharing or not
noSocialActionsFound boolean To know if no social action is found on user device for sharing
noSocialActionsMessage String Message to display if no social action is found on user device for sharing
allSocialItems ArrayList<SocialItem> List of all social items that can be used for sharing
campaignSocialItems ArrayList<SocialItem> List of all social items configured on dashboard for sharing
campaignSocialActions ArrayList<SocialAction> List of social actions configured on dashboard for sharing

This class contains various member variables, each specifying some product related data.

ProductDetails Member Variables
Parameter Type Decription
productCode String Product Code
productName String Product Name
productImgUrl String Product Image URL
productCategory String Product Category
productPrice String Price of the product
extraInfo JSONObject Extra Information related to the product, which you want to receive later.

This class contains various member variables, each specifying some data related to the social actions configured for your campaign on dashboard.

SocialAction Member Variables
Variable Type Decription
socialActionId int Social Action Identifier
socialActionName String Name of the Social Action
shareMessage String Message to be used while sharing with this Social Action
shareTitle String Title to be used while sharing with this Social Action
shareUrl String User's Share Link
shareImageUrl String URL of the image to be used while sharing
displayOrder int Order of display among all social actions, as set on dashboard
shareMsgType int Type of the share message to be used. Will always be 0 for Referrals, 1 or 2 for With Reward and Without Reward share message respectively for Product Sharing growth hack.

This class contains various member variables, each specifying some data related to the social action app installed on the device. This is different from SocialAction class, as it contains app specific data like appname, packagename, classname, etc.

SocialItem Member Variables
Variable Type Decription
resId int Icon resource identifier for the social item
appname String Name of the social item
packagename String Social item's package name
classname String Class name of the social item to be used
textColor int Text color code for the social item

This class provides various methods to set several user details like userName, userEmail, pushToken, etc. This class’s is used mainly to pass user details data to the SDK while initializing it or while updating the user information.

UserDetails Methods
Method Decription
setPushToken(String pushToken) To set user's token for push notifications
setUserEmail(String userEmail) To set user's email address
setUserName(String userName) To set user's name
setProfileImage(String profileImage) To set user's profile image URL
setAppUserId(String appUserId) To set user's id in your app
setMobileNo(String mobileNo) To set user's mobile number
setCity(String city) To set user's city
setState(String state) To set user's state
setCountry(String country) To set user's country
setReferralCode(String referralCode) To set referrer's referral code
setExistingUser(boolean isExistingUser) Set True, if user already exists with your app
Was this article helpful to you? Yes 1 No