Skip to content

Instantly share code, notes, and snippets.

{
"engagement": {
"font": {
"family": ""
},
"logo": {
"image": {
"url": ""
}
},
- (void)lookioManager:(LIOLookIOManager *)manager didChangeEnabled:(bool)enabled forSkill:(NSString *)skill forAccount:(NSString *)account
{
//reports button availability
NSString *accountButtonName = [NSString stringWithFormat:@"%@-mobile-button", account];
if (enabled) {
[[LIOLookIOManager sharedLookIOManager] setInvitationShown];
[[LIOLookIOManager sharedLookIOManager] reportEvent:accountButtonName withData:@"1"];
} else {
[[LIOLookIOManager sharedLookIOManager] setInvitationNotShown];

#LPMobile Android Library Advanced Implementation

###Connect the delegate The following code is an example of how to connect the delegate inside an activity:

final Activity activity = this;
delegateAPI = new LPMobileDelegateAPIImp(){
    @Override
    public boolean shouldUseCustomActionForChatNotAnswered() {
        return true;

#LPMobile Android Library Basic Implementation

  1. Copy Branding.settings into the /assets folder in the app. If the app is using Gradle, then the file should be copied into /[app_name]/src/main/assets (create this folder if not present).

###Required changes to AndroidManifest.xml 2. Add the following 3 permissions:

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<button onclick="LPMobile.setSkill('new-mobile-skill')">Set new mobile skill</button>
@grantmiller
grantmiller / lp-mobile-skill
Created December 16, 2013 20:01
changing the skill for LP Mobile html plugin
<script type="text/javascript">
/* LP Mobile JS Configuration */
var _LP_CFG_ = {
app_id : "YOUR_MOBILE_SITE_ID",
options : {
// All configuration options defined in here
skill : 'new-mobile-skill' // Replace with registered mobile skill
}
};
/* End of Configuration */
@grantmiller
grantmiller / lp-mobile-responsive-viewport.html
Created August 22, 2013 23:10
LP Mobile HTML Plugin meta viewport for responsive sites
<script type="text/javascript">if(window.screen.width <= 740){ document.write('<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, width=device-width">');}</script>
@grantmiller
grantmiller / lp-mobile-custom-button.html
Created August 15, 2013 22:45
lp mobile html plugin create a custom button by identifying the triggerSelector
<script type="text/javascript">
/* LP Mobile JS Configuration */
var _LP_CFG_ = {
app_id : "YOUR_MOBILE_SITE_ID",
options : {
// All configuration options defined in here
triggerSelector : '.help-btn' // Replace with a selector to your help button(s)
}
};
/* End of Configuration */
@grantmiller
grantmiller / lp-mobile-html-offline-action.html
Created August 15, 2013 18:58
LP Mobile HTML Plugin custom offline action (onChatNotAnswered)
<script type="text/javascript">
/* LP Mobile JS Configuration */
var _LP_CFG_ = {
app_id : "YOUR_MOBILE_SITE_ID",
options : {
// All configuration options defined in here
onChatNotAnswered : function(messages) { // An event that fires after a message is sent by the user but agents are no longer available. It takes one parameter which is an array of the messages attempted to be sent by the user.
alert('All chat agents are currently helping other customers. Please call our customer service center at 800-555-5555');
}
}
@grantmiller
grantmiller / lp-mobile-html-custom-variables.html
Created August 15, 2013 18:45
LP Mobile HTML Plugin Custom Variables
<script type="text/javascript">
/* LP Mobile JS Configuration */
var _LP_CFG_ = {
app_id : "YOUR_MOBILE_SITE_ID",
options : {
// All configuration options defined in here
extras : function() { // A static dictionary or a function that returns a dictionary of custom variables
var extras = {'varName1': 'varValue1',
'varName2': 'varValue2'};
return extras;