LogoLogo
My AppsLive demoNewsArticles
  • Introduction
  • 📌Product updates: 2025
    • 2024
    • 2023
  • Getting Started
    • Registration
    • Adding a space
    • Adding an app to the space
  • Basic Events & Custom Events
  • Integration
    • Expert Tips
      • What to track
      • Payments & Anti-cheat
      • Check your integration
    • Integration of SDK 2.0+
      • SDK Integration
        • Android
        • iOS
        • macOS
        • Windows
        • Web
          • Web SDK Integration
          • Web SDK Releases
        • Unity
        • Unreal Engine
        • Godot Engine
      • Automatic payment tracking
        • App Store
        • Google Play
      • Setting up Events
        • Basic methods
        • Secondary methods
        • User profile
        • Anticheat methods
        • Track sessions
      • Push notifications
        • Android
        • iOS
        • Windows (UWP)
        • Unity
          • Android
          • iOS
          • Windows (UWP/WSA)
        • Unreal Engine
      • A/B testing
        • Description of A/B testing on the SDK side
        • Working with A/B tests in the devtodev interface
        • A/B testing examples
    • Integration of SDK 1.0+ (deprecated)
      • SDK Integration
        • iOS
        • Android
        • Windows 8.1 and 10
        • Web
        • Unity
        • Mac OS
        • Adobe Air
        • UE4
      • Setting up Events
        • Basic methods
        • Secondary methods
        • User profile
        • Anti-cheat Methods
      • Push Notifications
        • IOS
        • Android
        • Windows 8.1 and Windows 10
        • Unity
        • Abode Air
        • UE4
    • Test Devices
    • Server API
      • Data API 2.0
      • Subscription API
      • Push API
        • IOS
        • Android
        • Windows UWP
        • Windows
      • Raw Export
      • Labels API
      • Data API
    • Import historical data via API
    • Data Export
      • Data Export to Cloud Storage (BigQuery / Amazon S3)
  • 3rd Party Sources
    • Attribution Trackers
      • AppsFlyer
      • Adjust
      • Branch.io
      • Kochava
      • Tenjin
      • Tune (MAT)
      • Singular
      • Custom postback API
      • Facebook Ads referral decryption
    • App Marketplace Data
      • App Store Connect Stats
      • App Store Subscriptions
      • Google Play Console Stats
      • Google Play Subscriptions
      • AppGallery Connect Stats
    • Ad revenue
      • AdColony
      • AdMob
      • Facebook
      • MoPub
      • Unity Ads
      • Vungle
      • Ad revenue API
    • Cohort export
  • Reports and Functionality
    • Space-related Reports and Functionality
      • Overview
      • Custom dashboards & Reports
      • SQL
        • SQL tips
        • SQL Query examples
      • Audience overlap
    • Project-related Reports and Functionality
      • Overview
        • Real-Time Dashboard
        • Acquisition reports
        • Engagement reports
        • Monetization reports
        • In-game analysis reports
        • Cohort analysis
      • Reports
      • Push Notifications
        • Android Notifications
        • IOS Notifications
        • Windows Notifications
        • Button Templates
      • Predictions
      • Users & Segments
      • Filters
      • A/B Testing
      • Tuning
      • Settings
  • Metrics and Glossary
    • Ad networks metrics
    • Market Metrics
    • Prediction Metrics
    • SDK Metrics
    • Subscription metrics
  • Space Management
  • User Profile Management
  • Limits
  • Scenarios and Best Practices
    • Analytics use cases
    • Match-3
    • MMORPG Games
    • Hyper-Casual games
    • Social Casino
    • RPG games
    • Farming games
    • Non-gaming app
    • Acquisition Example
  • FAQ
    • Identification
    • Raw Data
    • All about data discrepancies
  • Slack
Powered by GitBook
On this page
  • General information
  • How to get SID and Client Secret
  • Implementation to app
  • Changing the application settings in devtodev system
  • Creating a new push notification in devtodev interface

Was this helpful?

Export as PDF
  1. Integration
  2. Integration of SDK 1.0+ (deprecated)
  3. Push Notifications

Windows 8.1 and Windows 10

Integration of push notifications on Windows 8.1 and Windows 10

PreviousAndroidNextUnity

Last updated 17 days ago

Was this helpful?

This generation of SDK is deprecated and is no longer supported. Information about the .

General information

To enable Push Notifications you will have to perform the following actions:

  • Add the application to your space in devtodev system

  • Activate Windows Messaging Service ang get SID and Client Secret values

  • Add SID and Client Secret to the application integration settings in devtodev system

  • Integrate devtodev SDK to the application (see the "SDK integration" section to learn more how to integrate and initialize devtodev SDK)

  • Add several lines of the code to switch on the push notification in the SDK

  • Create a campaign for sending push notifications in "Push" section

How to get SID and Client Secret

  1. Go to the application settings in your Windows Store dashboard

  2. Open Push Notifications submenu in Services menu

  3. Go to Live Services site:

  4. "Package SID" and "Client secret" will be your SID and Client Secret strings respectively

Implementation to app

  1. Integrate devtodev SDK to your project. Even if you don't need devtodev analytics in your app, you should call DevToDev.SDK.Initialize(string appKey, string appSecret).

  2. Add the following source after DevToDev.SDK.Initialize(string appKey, string appSecret) is called:

    //It is called when push token is received successfully
    PushManager.PushTokenReceived = (pushToken) => {
       //pushToken - the string contains the push token
    };
    
    //It is called when there is an error in push token delivery.
    PushManager.PushTokenFailed = (error) => {
       //error - the error string. This function will be called when push token have not been obtained.
    };
    
    //It is called when push notification is received.
    PushManager.PushReceived = (PushType type, IDictionary<string, string> pushAdditionalData) => {
       //type - type of the push message
       //params - IDictionary<string, string> with the custom user parameters form the push message
    };
    
    //It is called when push notification is opened.
    PushManager.PushOpened = (PushMessage pushMessage, ActionButton actionButton) => {
       //pushMessage - DevToDev.PushMessage. Represents toast notification message
       //actionButton - DevToDev.ActionButton. Windows 10 only! 
       //Represents toast button that was clicked. Could be null if toast body was clicked
    };
    
    DevToDev.PushManager.Initialize();

    The PushType can have one of the following values:

    public enum PushType {
       ToastNotification, //Notification that can be seen by a user. 
       SilentNotification //Raw-notification. A user can't see it.
    }
  3. The control of the current value of a badge. When an app is launched the current value of a badge is reset to zero by default. In order to disable automatic resetting to zero and manually control the value of a badge use the following methods:

    //Disables automatic clearing of a badge at start. 
    //Must be called before DevToDev.PushManager.Initialize();
    DevToDev.PushManager.AutoClearBadgeOnStart = false; 
    
    //Decreases the current value of a badge on "number" units.
    DevToDev.PushManager.DecreaseBadge(int number);
    
    //Clears the current value of a badge.
    DevToDev.PushManager.ClearBadgeCount();
  4. Attention! There is a difference in the implementation of the elements mentioned below for Windows 8.1+ and Windows 10+ projects.

    Windows 8.1+: Put the following source in your Application class (usually it is App.xaml.cs file) at the end of the OnLaunched(LaunchActivatedEventArgs e) function. For Example:

    protected override void OnLaunched(LaunchActivatedEventArgs e) {
       //...other source
       DevToDev.PushManager.HandleToastNavigation(e.Arguments);
    }

    Windows 10+: Put the following source in your Application class (usually it is App.xaml.cs file) at the end of the OnLaunched(LaunchActivatedEventArgs e) and OnActivated(IActivatedEventArgs args)​ functions. For Example:

    protected override void OnLaunched(LaunchActivatedEventArgs e) {
       //...other source
       DevToDev.PushManager.HandleToastNavigation(e.Arguments);
    }
    
    protected override void OnActivated(IActivatedEventArgs args) {
       //...other source
       if (args.Kind == ActivationKind.ToastNotification) {
           var toastArgs = args as ToastNotificationActivatedEventArgs;
           DevToDev.PushManager.HandleToastNavigation(toastArgs.Argument);
       }
    }

Changing the application settings in devtodev system

1. Proceed to Settings of your app.

2. Go to PUSH NOTIFICATIONS page in Settings and insert the previously received Package SID and Client secret to appropriate fields in Push notifications section.

3. If the Package SID and Client secret are correct, you will see the following result:

Creating a new push notification in devtodev interface

  1. Fill in campaign name, select an app for delivery*

  2. Choose the user group to send a message. You can choose existing segment or create a new one

  3. Enter toast or tile details

  4. Schedule the delivery

  5. That's it!

*Attention! You can create a campaign only after at least one push token comes from devtodev SDK integrated to your application. Otherwise the app will not be displayed in the list.

Make sure that these functions are enabled in Package.appmanifest of you project (the flag "Toast capable" is enabled by default for Windows 10+ projects, it is absent in the manifest).

Add the following two Background Tasks in Package.appmanifest:

Keep in mind that your application must be built with the same Windows Store preferences you used in Chapter 3.2. In the "Create App Packages" window you have to log in with your Live ID and pick the appropriate application form the list. A file Package.StoreAssociation.xml will be added into the Project.

Open section and click on "Add new campaign" button

PUSH NOTIFICATION
current version can be found here