Push notifications are critical to craft engaging app experience and increase usage and user interest. Windows Azure Notification Hubs support multi-platform push with Windows, iOS, and Android, publish/subscribe routing to particular groups of users or devices, and low latency broadcast to millions of devices. Join us to learn how to use Notification Hubs to target millions of devices at once and single targeted users with just a few lines of code.
21. var azure = require('azure');
var notificationHubService =
azure.createNotificationHubService('hubname', 'connectionString');
notificationHubService.wns.sendToastText01(null,
{
text1: 'Hello from Node and Mobile Services!'
},
function (error)
{
if (!error) { // message sent successfully }
}
);
22. No need to store and maintain ChannelURIs.
Device registrations expire.
29. // POST api/register
public async void Post(bool instId, bool channelUri, bool userId) {
// We assume a windows store app (if coding a multiplatform app, a ‘platform‘ parameter should be passed)
…
if (!authorizedToRegisterTag(userId))
{ throw new Exception("User not authorized to register"); }
var regsForInstId = await hubClient.GetRegistrationsByTag(instId, 100);
bool updated = false;
bool firstRegistration = true;
foreach (var registrationDescription in regsForInstId) {
if (firstRegistration) {
var winReg = registrationDescription as WindowsRegistrationDescription;
winReg.ChannelUri = new Uri(channelUri);
winReg.Tags.Clear();
winReg.Tags.UnionWith(new string[] {instId, userId});
hubClient.UpdateRegistration(winReg);
updated = true;
firstRegistration = false;
} else {
// if templates are not used, delete all extra registrations with this installation id.
hubClient.DeleteRegistration(registrationDescription);
}
}
// if not updated, a new registration has to be created for the device
if (!updated) {
hubClient.CreateWindowsNativeRegistration(channelUri, new string[] {instId, userId});
}
}
40. What Next?
Try it out. For Free.
Build what you want. Scale as you need. Full access with no strings
attached.
http://aka.ms/thecloud
Hello startups!
You have an ideas so brilliant it burns. BizSpark can help make it real.
http://aka.ms/JoinBizSpark or CONTACT ME!
41. DVLUP – NOKIA’S REWARDS PROGRAM
COMPLETE APP CHALLENGES – EARN POINTS – GET COOL STUFF
Engage via
Gamification
& Rewards
Targeted &
Curated App
Challenges
Redeem earned
points for
Phones, Accessori
es, Dev Tools and
App Promotion
Over $5 million
worth of Rewards
and Campaigns
dvlup.com
Now, let us take a look at developers. Our whole strategy for developers is based on making them successful in the app economy. We need to invest today in our developer’s success to ensure a steady flow of apps, that will sell tomorrow’s devices. We recently announced a new initiative that helps developers succeed. It is called DVLUP.DVLUP brings together proven models of gamification and a rewards system (similar to frequent flyer programs in the airline industry) to encourage developers to engage with a development platform.In DVLUP, developers earn points while developing apps for targeted and curated app challenges. This approach enables us to gain new developers, incentivize them to create apps that are relevant to the consumer and at the same time offer ways for developers to become successful, by supporting them in promoting and marketing their apps to a global audiance. We have launched DVLUP in 21 countries, And we are offering over $5 million worth of rewards to our developers.- Go to www.dvlup.com to find out more