Helpshift-Cocos  0.1
Cocos2d 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 activity. This will show list of sections with search. More...
 
static void showFAQs (cocos2d::CCDictionary *config)
 Shows faqs activity. 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 activity. 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 activity. 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 activity. This provides show question view provided a publish id of that question. More...
 
static void showSingleFAQ (const char *publishId, cocos2d::CCDictionary *config)
 Shows question activity. 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. If you want to reset previously set values, please provide 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)
 If you are using GCM push or Urban Airship and if you want to enable Push Notification in the Helpshift Android SDK, set the Android Push ID (APID) using this method. More...
 
static void leaveBreadCrumb (const char *breadCrumb)
 Add 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 an alert to let the user rate your app. More...
 
static int getNotificationCount ()
 Gets notification count. More...
 
static void handlePush (const char *issueId)
 If you receive a push notification from the Helpshift server, the "origin" field of the notification will be set to "helpshift". In such a case, you can forward the notification to Helpshift so that the relevant issue chat screen is opened. To forward the push notification to the Helpshift sdk, please use this api. More...
 
static int logd (const char *tag, const char *format,...)
 Adds logs with debug level.
 
static int logi (const char *tag, const char *format,...)
 Adds logs with info level.
 
static int logw (const char *tag, const char *format,...)
 Adds logs with warn level.
 
static int logv (const char *tag, const char *format,...)
 Adds logs with verbose level.
 

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::getNotificationCount ( )
static

Gets notification count.

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

If you receive a push notification from the Helpshift server, the "origin" field of the notification will be set to "helpshift". In such a case, you can forward the notification to Helpshift so that the relevant issue chat screen is opened. To forward the push notification to the Helpshift sdk, please use this api.

Parameters
issueIdThe "issue_id" field of the received notification dictionary
void HelpshiftCocos2dx::leaveBreadCrumb ( const char *  breadCrumb)
static

Add 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::registerDeviceToken ( const char *  deviceToken)
static

If you are using GCM push or Urban Airship and if you want to enable Push Notification in the Helpshift Android SDK, set the Android Push ID (APID) using this method.

Parameters
deviceTokenThe Android Push Id
void HelpshiftCocos2dx::setNameAndEmail ( const char *  name,
const char *  email 
)
static

You can specify the name and email for your User. If you want to reset previously set values, please provide 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 an alert to let the user rate your app.

Parameters
urlThe url of your app on the play store
actionA callback function which takes a HSAlertToRateAppAction param and returns void. This callback function will be called to let the developer know what the user's response was to the Alert.
void HelpshiftCocos2dx::showConversation ( void  )
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 activity. This will show list of sections with search.

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

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

There are two 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. requireEmail (Default : "no" ) If requireEmail flag is set to "yes", an e-mail address is required while starting a new conversation.

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

Shows FAQ section activity. 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 activity. 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 two 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. requireEmail (Default : "no" ) If requireEmail flag is set to "yes", an e-mail address is required while starting a new conversation.

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

Shows question activity. 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 activity. This provides show question view provided a publish id of that question.

There are two 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. requireEmail (Default : "no" ) If requireEmail flag is set to "yes", an e-mail address is required while starting a new conversation.

Parameters
publishIdid specifying a question
configAdditional config

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