metalguru's Forum Posts

  • 2 posts
  • Problem Description

    A project exported as Windows 8.1 Universal, running on Windows Phone 8.1 with audio runs, but then crashes on resume part of suspend/resume.

    Ie. App runs with audio playing on phone. User navigates to homescreen, then uses back button to resume app. Instead of resuming, the app crashes. (Same result if phone is locked/unlocked - the app crashes).

    The "workaround" that I ended up applying to my final published game app on the Windows Store for Windows Phone 8.1 was to remove *ALL* the audio files and events from the game - which results in the app suspending/resuming normally, without crashing.

    NB. The same issue *does not* occur with a Windows 10 Universal exported project running on Windows 10 Phone.

    The issue seems specific to the app running on Windows Phone 8.1 (it doesn't occur with Windows 8.1 PC version either).

    Attach a Capx

    https://onedrive.live.com/redir?resid=8 ... der%2ccapx

    Description of Capx

    Contains 2 Object Types: Audio and Browser.

    Contains 2 Events which start audio playing when loaded, and continue audio when app resumes:

    1. System, On Start of layout - Audio Play long looping at volume 0 dB (tag"")

    • Audio Play Snap looping at volume 0 dB (tag"")

    2. Browser, On resumed - Audio Play long looping at volume 0 dB (tag"")

    • Audio Play Snap looping at volume 0 dB (tag"")

    Note that the "Snap" audio takes a few seconds to start once the project is loaded.

    Steps to Reproduce Bug

    • Export Project as Windows Store, target version Windows 8.1 Universal.
    • Load exported project into Visual Studio (I used Community 2015 Version 14.0.24720.00 Update 1).
    • In Solution Explorer, right click on "Bug_demo.WindowsPhone (Windows Phone 8.1)" and select "Set as Startup Project". Save.
    • Open package.appmanifest of the Windows 8.1 project and in the packaging tab add a (test) certificate to enable project to be successfully built. Save.
    • Manually copy code of Publisher tag across from Windows package.appmanifest to Phone packageappmanifest. Save.
    • Connect a Windows 8.1 Phone device via USB.
    • Change build options in Visual Studio to "Release" "ARM" and "Device".
    • Build project and Deploy to phone.
    • When loaded on phone, audio will play (repeating low hum and snap sound). Stop debugging in Visual Studio and quit project, disconnecting phone from USB.
    • Load app on phone. Audio will play.
    • To reproduce bug: press home button to navigate to home screen. Then, press back button and switch back to app. Instead of resuming, the app crashes.
    • A second way to reproduce bug is to load app then lock phone. Unlock phone, and instead of the app resuming it crashes.

    Observed Result

    The app crashes, instead of resuming.

    Expected Result

    Expected the app to resume.

    Affected Browsers

    • Windows 8.1 Phone: YES (Exported from Construct 2 as Windows Universal 8.1).
    • Windows 10 Phone: NO (Exported as Windows Universal 10).
    • Windows 8.1 PC and Windows 10 PC: NO (Exported as either Windows Universal 8.1 or 10).
    • Chrome: N/A
    • FireFox: N/A
    • Internet Explorer: N/A

    Operating System and Service Pack

    PC: Windows 10 Pro, 64 bit, Version 10.0.10586 updated to 9 March.

    Phone: Microsoft Lumia 535, Windows Phone 8.1 Update version 8.10.14234.375

    Construct 2 Version ID

    Construct 2 Release 224 (64-bit) checked, built on 3 March 2016 Personal license.

    Hope that you can investigate.

    Thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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)

  • 2 posts