Helpshift-Cocos2dx  4.5.0
Cocos2dx plugin for the Helpshift SDK
 All Classes Functions Pages
Static Public Member Functions | List of all members
HelpshiftCocos2dx Class Reference

API for the Cocos2dx plugin for Helpshift Cocos2dx SDK. More...

#include <HelpshiftCocos2dx.h>

Static Public Member Functions

static void showFAQs ()
 Shows faqs screen. This will show list of sections with search. More...
 
static void showFAQs (cocos2d::CCDictionary *config)
 Shows faqs screen. This will show list of sections with search. More...
 
static void showConversation ()
 You can use this api call to provide a way for the user to send feedback or start a new conversation with you. More...
 
static void showConversation (cocos2d::CCDictionary *config)
 You can use this api call to provide a way for the user to send feedback or start a new conversation with you. There is one flag supported in this config - gotoConversationAfterContactUs (Default : "no") If set to "yes". Helpshift SDK will land on conversation activity after starting a new conversation. If set to "no" Helpshift SDK will land on last activity before starting a new conversation. More...
 
static void showFAQSection (const char *sectionPublishId)
 Shows FAQ section screen. This will show a FAQ section view with list of questions in that section. The search inside this view will be limited to the specified section. You can specify a section using publish ID of that section. More...
 
static void showFAQSection (const char *sectionPublishId, cocos2d::CCDictionary *config)
 Shows FAQ section screen. This will show a FAQ section view with list of questions in that section. The search inside this view will be limited to the specified section. You can specify a section using publish ID of that section. More...
 
static void showSingleFAQ (const char *publishId)
 Shows question screen. This provides show question view provided a publish id of that question. More...
 
static void showSingleFAQ (const char *publishId, cocos2d::CCDictionary *config)
 Shows question screen. This provides show question view provided a publish id of that question. More...
 
static void setNameAndEmail (const char *name, const char *email)
 You can specify the name and email for your User. To reset the name and email values set previously, you can pass null for both params. More...
 
static void setUserIdentifier (const char *userIdentifier)
 If you already have indentification for your users, you can specify that as well. More...
 
static void registerDeviceToken (const char *deviceToken)
 Register the device token with Helpshift for getting Push notifications. More...
 
static void leaveBreadCrumb (const char *breadCrumb)
 Adds additonal debugging information in your code. You can add additional debugging statements to your code, and see exactly what the user was doing right before they started a new conversation. More...
 
static void clearBreadCrumbs ()
 Clears Breadcrumbs list. Breadcrumbs list stores upto 100 latest actions. You'll receive those in every Issue. But if for reason you want to clear previous messages (On app load, for eg), you can do that by calling this api. More...
 
static void showAlertToRateApp (const char *url, void(*action)(int result))
 Show alert for app rating. More...
 
static void install (const char *apiKey, const char *domainName, const char *appID)
 Initialize helpshift support. More...
 
static void install (const char *apiKey, const char *domainName, const char *appID, cocos2d::CCDictionary *config)
 Initialize helpshift support. More...
 
static void pauseDisplayOfInAppNotification (bool pauseInApp)
 To pause and restart the display of inapp notification This provides show question view provided a publish id of that question. More...
 
static int getNotificationCountFromRemote (bool isRemote)
 Gets notification count. More...
 
static void handleLocalNotification (const char *issueId)
 Forward the local notification information to Helpshift for opening the conversation. More...
 
static void handleRemoteNotification (cocos2d::CCDictionary *notification)
 Forward the push notification information to Helpshift for opening the conversation. More...
 

Detailed Description

API for the Cocos2dx plugin for Helpshift Cocos2dx SDK.

Member Function Documentation

void HelpshiftCocos2dx::clearBreadCrumbs ( )
static

Clears Breadcrumbs list. Breadcrumbs list stores upto 100 latest actions. You'll receive those in every Issue. But if for reason you want to clear previous messages (On app load, for eg), you can do that by calling this api.

int HelpshiftCocos2dx::getNotificationCountFromRemote ( bool  isRemote)
static

Gets notification count.

Returns
The count of new notifications for updates to the conversation
void HelpshiftCocos2dx::handleLocalNotification ( const char *  issueId)
static

Forward the local notification information to Helpshift for opening the conversation.

Parameters
issueIdThe issueId for which a new local notification was received
void HelpshiftCocos2dx::handleRemoteNotification ( cocos2d::CCDictionary *  notification)
static

Forward the push notification information to Helpshift for opening the conversation.

Parameters
notificationThe notification dictionary which was received
void HelpshiftCocos2dx::install ( const char *  apiKey,
const char *  domainName,
const char *  appID 
)
static

Initialize helpshift support.

When initializing Helpshift you must pass these three tokens. You initialize Helpshift by adding the following lines in the implementation file for your app delegate, ideally at the top of AppDelegate::applicationDidFinishLaunching(). If you use this api to initialize helpshift support, in-app notifications will be enabled by default.

Parameters
apiKeyThis is your developer API Key
domainNameThis is your domain name without any http:// or forward slashes
appIDThis is the unique ID assigned to your app
void HelpshiftCocos2dx::install ( const char *  apiKey,
const char *  domainName,
const char *  appID,
cocos2d::CCDictionary *  config 
)
static

Initialize helpshift support.

When initializing Helpshift you must pass these three tokens. You initialize Helpshift by adding the following lines in the implementation file for your app delegate, ideally at the top of AppDelegate::applicationDidFinishLaunching().

Parameters
apiKeyThis is your developer API Key
domainNameThis is your domain name without any http:// or forward slashes
appIDThis is the unique ID assigned to your app
configThis is the dictionary which contains additional configuration options for the HelpshiftSDK. Currently we support the "enableInAppNotification" as the only available option. Possible values are <"yes"/"no">. If you set the flag to "yes", the helpshift SDK will show notifications similar to the banner notifications supported by Apple Push notifications. These notifications will alert the user of any updates to ongoing conversations. If you set the flag to "no", the in-app notifications will be disabled.
void HelpshiftCocos2dx::leaveBreadCrumb ( const char *  breadCrumb)
static

Adds additonal debugging information in your code. You can add additional debugging statements to your code, and see exactly what the user was doing right before they started a new conversation.

Parameters
breadCrumbAction/Message to add to bread-crumbs list.
void HelpshiftCocos2dx::pauseDisplayOfInAppNotification ( bool  pauseInApp)
static

To pause and restart the display of inapp notification This provides show question view provided a publish id of that question.

When this method is called with boolean value true, inapp notifications are paused and not displayed. To restart displaying inapp notifications pass the boolean value false.

Parameters
pauseInAppthe boolean value to pause/restart inapp nofitications
void HelpshiftCocos2dx::registerDeviceToken ( const char *  deviceToken)
static

Register the device token with Helpshift for getting Push notifications.

Parameters
deviceTokenThe deviceToken for the device
void HelpshiftCocos2dx::setNameAndEmail ( const char *  name,
const char *  email 
)
static

You can specify the name and email for your User. To reset the name and email values set previously, you can pass null for both params.

Parameters
nameUser name
emailUser email
void HelpshiftCocos2dx::setUserIdentifier ( const char *  userIdentifier)
static

If you already have indentification for your users, you can specify that as well.

Parameters
userIdentifierA custom user identifier
void HelpshiftCocos2dx::showAlertToRateApp ( const char *  url,
void(*)(int result)  action 
)
static

Show alert for app rating.

To manually show an alert for app rating, you need automated reviews disabled in admin. Also, if there is an ongoing conversation, the review alert will not show up. The result of the interaction will be available through the callback which is supplied as param.

Parameters
urlThe url of the app in the app store
actionPointer to a callback function which takes and int and returns void.
void HelpshiftCocos2dx::showConversation ( )
static

You can use this api call to provide a way for the user to send feedback or start a new conversation with you.

void HelpshiftCocos2dx::showConversation ( cocos2d::CCDictionary *  config)
static

You can use this api call to provide a way for the user to send feedback or start a new conversation with you. There is one flag supported in this config - gotoConversationAfterContactUs (Default : "no") If set to "yes". Helpshift SDK will land on conversation activity after starting a new conversation. If set to "no" Helpshift SDK will land on last activity before starting a new conversation.

Parameters
configExtra config
void HelpshiftCocos2dx::showFAQs ( )
static

Shows faqs screen. This will show list of sections with search.

void HelpshiftCocos2dx::showFAQs ( cocos2d::CCDictionary *  config)
static

Shows faqs screen. This will show list of sections with search.

There are 2 flags supported in this config - gotoConversationAfterContactUs (Default : "no") If set to "yes". Helpshift SDK will land on conversation activity after starting a new conversation. If set to "no" Helpshift SDK will land on last activity before starting a new conversation. enableContactUs (Default : "yes") The enableContactUs flag will determine whether the Contact Us button is shown.

Parameters
configAdditional config
void HelpshiftCocos2dx::showFAQSection ( const char *  sectionPublishId)
static

Shows FAQ section screen. This will show a FAQ section view with list of questions in that section. The search inside this view will be limited to the specified section. You can specify a section using publish ID of that section.

Parameters
sectionPublishIdid specifying a section
void HelpshiftCocos2dx::showFAQSection ( const char *  sectionPublishId,
cocos2d::CCDictionary *  config 
)
static

Shows FAQ section screen. This will show a FAQ section view with list of questions in that section. The search inside this view will be limited to the specified section. You can specify a section using publish ID of that section.

There are 2 flags supported in this config - gotoConversationAfterContactUs (Default : "no") If set to "yes". Helpshift SDK will land on conversation activity after starting a new conversation. If set to "no" Helpshift SDK will land on last activity before starting a new conversation. enableContactUs (Default : "yes") The enableContactUs flag will determine whether the Contact Us button is shown.

Parameters
sectionPublishIdid specifying a section
configAdditional config
void HelpshiftCocos2dx::showSingleFAQ ( const char *  publishId)
static

Shows question screen. This provides show question view provided a publish id of that question.

Parameters
publishIdid specifying a question
void HelpshiftCocos2dx::showSingleFAQ ( const char *  publishId,
cocos2d::CCDictionary *  config 
)
static

Shows question screen. This provides show question view provided a publish id of that question.

There are 2 flags supported in this config - gotoConversationAfterContactUs (Default : "no") If set to "yes". Helpshift SDK will land on conversation activity after starting a new conversation. If set to "no" Helpshift SDK will land on last activity before starting a new conversation. enableContactUs (Default : "yes") The enableContactUs flag will determine whether the Contact Us button is shown.

Parameters
publishIdid specifying a question
configAdditional config

The documentation for this class was generated from the following files: