Skip to content

Instantly share code, notes, and snippets.

Windows.Security.Authentication.Web.WebAuthenticationBroker
.authenticateAsync(Windows.Security.Authentication.Web.WebAuthenticationOptions.default, startURI, endURI)
.then(function(result){
console.log('handle your provider specific token inside ' + result.responseData);
}, function(error){
console.error(error);
var azure = require('azure');
//call POST https://<service-name>.azure-mobile.net/api/<endpoint name> with the tag you want in the query parameter
exports.post = function(request, response) {
var hub = azure.createNotificationHubService("crossplatpushdemohub", "Endpoint=sb://crossplatpushdemohub-ns.servicebus.windows.net/;SharedAccessKeyName=DefaultFullSharedAccessSignature;SharedAccessKey=AGeyP6352Hg585VK88XkjrXwKy37st/dp4xVGrpdyO4=");
var sendMessage = function(tag, message){
package com.example.crossplatformpush;
import android.content.Context;
import com.microsoft.windowsazure.notifications.NotificationsHandler;
import com.microsoft.windowsazure.messaging.*;
public class Handler extends NotificationsHandler {
@Override
import com.microsoft.windowsazure.messaging.*;
import com.microsoft.windowsazure.notifications.*;
//full source at https://github.com/sedouard/AMSCrossPlatPush/blob/master/GoogleAndriod/CrossPlatformPush/src/com/example/crossplatformpush/MainActivity.java
public class MainActivity extends ActionBarActivity {
private final String PROJECT_NUMBER = "<YOUR PROJECT NUMBER FROM GOOGLE PLAY>";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@sedouard
sedouard / gist:7623912
Created November 24, 2013 06:08
This sample (from the FiddlerCorApi sample) shows how you can create a "Mock" http service for your app. This allows you to "record" traffic between the target process and the web service. Then you can "replay" mode the "Mock" service will respond with the same exact responses the actual service did. The real awesome thing here is that you can t…
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Fiddler;
using System.IO;
using System.Diagnostics;
using Newtonsoft.Json;
using MockHttpServer.Data;