Skip to content

Instantly share code, notes, and snippets.

@helpshift
helpshift / index.html
Created November 7, 2013 07:13
Full page helpshift support embed
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="viewport" content="minimum-scale=1, maximum-scale=1, width=device-width">
<title> ***Your support page title here*** </title>
<meta name="description" content=" ***Your support page description here*** ">
[[Helpshift sharedInstance] showFAQs:self withOptions:@{@"showReportIssue":@"YES"}];
[[Helpshift sharedInstance] showFAQs:self withOptions:@{@"showReportIssue":@"YES",@"showConvOnReportIssue":@"YES"}];
[[Helpshift sharedInstance] reportIssue:self withOptions:@{@"showConvOnReportIssue":@"YES"}];
[[Helpshift sharedInstance] showSupport:self withOptions:@{@"showConvOnReportIssue":@"YES"}];
[Helpshift metadataWithBlock:^(void){
return [NSDictionary dictionaryWithObjectsAndKeys:
@"xyz", @"name",
@"xyz@abc.com", @"email",
gameObject.level, @"level",
gameObject.score, @"score",
nil];
}];
- (void) notificationCountAsyncReceived:(NSInteger)count {
dispatch_async(dispatch_get_main_queue(), ^{
[yourView setTextLabel:[NSString stringWithFormat:@"%d",count];
});
}
@helpshift
helpshift / GCMIntentReceiver-1.java
Last active December 14, 2015 01:09
Android SDK v2 docs gists.
public class GCMIntentReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
}
}
@helpshift
helpshift / urban-airship-1.java
Last active December 14, 2015 01:08
Android SDK v1 gists 2.
String action = intent.getAction();
if (action.equals(PushManager.ACTION_REGISTRATION_FINISHED)) {
hs.setDeviceToken(UAirship.shared().getApplicationContext(),
PushManager.shared().getAPID());
}
@helpshift
helpshift / async-fetch-notif-count-1.java
Last active December 14, 2015 00:59
Android SDK v1 docs gists.
hs.getNotificationCount(countHandler, failHandler);
@helpshift
helpshift / gist:4378705
Created December 26, 2012 07:32
Helpshift Android UA
String action = intent.getAction();
if (action.equals(PushManager.ACTION_REGISTRATION_FINISHED)) {
hs.setDeviceToken(UAirship.shared().getApplicationContext(),PushManager.shared().getAPID());
}