Windows 10 exported apps: Pubcenter adverts don't appear

0 favourites
  • 8 posts
From the Asset Store
Creepy Sprite Font suitable font for your Dark/Horror/Halloween games.
  • Problem Description

    Pubcenter adverts don't appear in Construct 2 exported for Windows 10 Universal apps (using the Pubcenter plug in).

    Attach a Capx

    h*t*t*p*s://onedrive.live.com/redir?resid=8BD76E24AB0F3EB0!5825&authkey=!APAMMy94OG-wk5s&ithint=file%2ccapx

    Description of Capx

    Contains a single event: Show a Pubcenter Windows 10 Universal test banner ad at position Top Right size 728x90 of app.

    Steps to Reproduce Bug

    • Step 1. In Construct 2 release 216 (64 bit), created a "New empty project".
    • Step 2. Added a Pubcenter object with valid values for Windows 10 Pubcenter ad. (The same issue seems to occur with any valid test ad Pubcenter Windows 10 codes. I am just using test ad codes for size 728x90 here as an example). Obtained test mode values from the "Test Mode Values" page for Windows 10 apps: h*t*t*p*s://msdn.microsoft.com/en-US/library/mt313178%28v=msads.30%29.aspx
    • Step 3. In Construct 2, added single event "On start of layout", "Pubcenter", "Show banner ad at postion Top Right size 728x90". (The attached .capx file).
    • Step 4. Exported Construct 2 project as Windows 10 Universal.
    • Step 5. In Visual Studio, if not already present, the latest "Microsoft Universal Ad Client SDK" for Windows 10 apps needs to be installed from Tools, Extensions and Updates). At the time of writing this extension was last updated on 14th October.
    • Step 6. Loaded project into Visual Studio Community 2015.
    • Step 7. In Visual Studio, added reference to the project for "Microsoft Advertising SDK for JavaScript (Version 10)", as described on the "AdControl in HTML 5 and Javascript" page: h*t*t*p*s://msdn.microsoft.com/en-US/library/mt313130%28v=msads.30%29.aspx
    • Step 8. In Visual Studio, its necessary to use menu "Build", "Configuration Manager" to change the platform to one of those supported by the Ad SDK, otherwise the build fails. (I chose x86 as an example). Its now possible to successfully build and run the app - which demonstrates the bug - no Ad is displayed in the running app. I have determined that the following 2 changes/additions in the code exported from Construct 2 are needed in order to resolve the bug:
    • S1. On the aforementioned "AdControl in HTML 5 and Javascript" page (link above), its stated (in step 5) that the reference to "ads.js" must follow "default.js" (in the relevant project .html file). The "default.js" sample file appears to contain sample code that (would then) handle application launch/suspension events etc. (if provided by the programmer). To test the need for the inclusion of such code, in Visual Studio, I created a new "Blank App Universal Javascript" app (for Windows 10), and then copied across the "default.js" sample file into my exported from Construct 2 Visual Studio project. I then added a line referencing the sample "default.js" file immediately before the "ad.js".
    • S2. The Windows 10 Universal project code exported from Construct 2 needs an extra slash character "/" added to the start of the "ad.js" line so that it can correctly locate the current (at the time of writing) advertising SDK version 10 extension. (This will then match the "ad.js" code line stated on the aforementioned "AdControl in HTML 5 and Javascript" page - see earlier for link). On running the project the test Pubcenter ad banner now appears in the app - this is for bug demonstration purposes - here - as the "default.js" file is only an incomplete sample file. To resolve the bug for an exported project from Construct 2, actual suitable code would need to be provided that correctly handles the necessary equivalent functions of "default.js" for a Construct 2 Windows 10 app, and secondly also provides the correct Ad SDK reference line.

    Observed Result

    Pubcenter advert does not appear in Windows 10 Universal app. (Steps 1-8 above).

    Expected Result

    Pubcenter advert does appear in Windows 10 Universal app. (S1 and S2 above describe the suggested change areas required to Construct 2 exported code in order to hopefully resolve the bug).

    Affected Browsers

    • Chrome: (N/A)
    • FireFox: (N/A)
    • Internet Explorer: (N/A) (Issue is specific to Windows 10 exported and published app - N/A to previewing from Construct 2).

    Operating System and Service Pack

    WIndows 10 Pro 64 bit

    Construct 2 Version ID

    r216 (64 bit)

  • Should be fixed in the next build. I had to update everything in the notifications window, add the slash, and add some boilerplate code from the default.js file you mentioned, and it seems to work now. So hopefully the next build will work better!

  • Still encountering this issue with MS Ads not appearing when using the AdControl. I'm currently running r224. I've confirmed that the test ads appear and the correct Ad IDs were entered from Pubcenter.

  • I was able to confirm that the beta r224 does in fact allow for the Microsoft AdControl to publish ads. It does take sometime for the ads to show up after 4-5 days when the app has been published in the Store. I'm going to assume its because it takes time for the ads to be queued up for a new publishing ad unit.

  • Hi! I tried C2 r227 and still get an error when using PubCenter Ads for Win10 (with and without adding the reference to Ad SDK). Ashley

    It shows this in the log most times:

    APPHOST9623: "ms-appx://microsoft.advertising.javascript/ad.js" konnte von der App aufgrund des folgenden Fehlers nicht aufgelöst werden: 80070057.

    I updated Visual Studio to the latest version.

    /Edit: I managed to get an ad now (with added reference to Win10 Ad SDK) and I need to select X64 or X86 for testing to see an ad. But the shown banner has the wrong size. I selected 728x90 and OnStartofLayout > Bottom Center on title screen but it shows a tiny 90x700 banner in the placeholder and white background on the sides. Does it work for everyone else or is there something broken with pubcenter plugin?

    And it seems "Any CPU" does not work for testing and building with the Ad SDK reference. And when I try to build for x86 and/or x64 I get this error:

    Severity Code Description Project File Line Suppression State

    Warning MSB3842 Project "LostFalconAssault" depends upon SDK "Microsoft Advertising SDK for JavaScript v10.0" which supports apps targeting "UAP 10.0". To verify whether "Microsoft Advertising SDK for JavaScript v10.0" is compatible with "UAP 10.0.10240.0", contact the SDK author or see http://go.microsoft.com/fwlink/?LinkID=309181. LostFalconAssault C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets 2049

    Warning MSB3842 Project "LostFalconAssault" depends upon SDK "Visual C++ 2015 Runtime for Universal Windows Platform Apps v14.0" which supports apps targeting "UAP 10.0". To verify whether "Visual C++ 2015 Runtime for Universal Windows Platform Apps v14.0" is compatible with "UAP 10.0.10240.0", contact the SDK author or see http://go.microsoft.com/fwlink/?LinkID=309181. LostFalconAssault C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets 2049

    And some missing/wrong images:

    Severity Code Description Project File Line Suppression State

    Error APPX3210 App manifest references the image 'images\Logo.png' which does not have a candidate in main app package. LostFalconAssault C:\Users\mail\Documents\Construct 2\Output\Lost Falcon\package.appxmanifest 18

    Error APPX3210 App manifest references the image 'images\storelogo.png' which does not have a candidate in main app package. LostFalconAssault C:\Users\mail\Documents\Construct 2\Output\Lost Falcon\package.appxmanifest 8

    Error APPX3210 App manifest references the image 'images\splashscreen.png' which does not have a candidate in main app package. LostFalconAssault C:\Users\mail\Documents\Construct 2\Output\Lost Falcon\package.appxmanifest 19

    How can I fix or ignore this to create the app package?

  • Hi Bl4ckSh33p

    Please try to do as following instruction:

    [http]://programmer.alexjong.com/2015/11/app-manifest-references-image.html

    I can create app package successful.

  • Hi

    is there any fix for this. It seem that issue is still same. Exporting C2 project to Visual Studio 2015 with MS 10 plugin, Everything else work but not ads.

    Same error message:

    APPHOST9623: "ms-appx://microsoft.advertising.javascript/ad.js

    I was trying that Default.jc , but no luck. No erros but no ads. Maybe my default.jc content is wrong

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • thanks. the missing images error can also be fixed if you just add a scale 200 version for the 3 images.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)