Giter Club home page Giter Club logo

Comments (9)

aarononeal avatar aarononeal commented on May 17, 2024

Hi Christian, thanks for reporting this. I suspect it's due to an issue with the background task not starting up on x86 architectures in that Windows 10 build. Do you have an x64 machine you can target to confirm whether it works there?

from windows-universal-samples.

cwesterlund avatar cwesterlund commented on May 17, 2024

Hi Aaron, yes it works when I change target to x64.
Thanks!

from windows-universal-samples.

cwesterlund avatar cwesterlund commented on May 17, 2024

Hi again Aaron, can't get my own project to work.
Not even on WP emulator. There isn't an issue with the background task not starting up on VB.NET projects?

from windows-universal-samples.

aarononeal avatar aarononeal commented on May 17, 2024

Great! Thanks for confirming x64 worked in the sample. Support for x86 on x64 is on the way.

Language shouldn't make a difference. Can you tell me more about your VB project configuration? Did you convert it to a Windows Universal project? Check also that you updated your Package.appxmanifest file to include the required task extensions.

      <Extensions>
        <Extension Category="windows.backgroundTasks" EntryPoint="BackgroundAudioTask.MyBackgroundAudioTask">
          <BackgroundTasks>
            <Task Type="audio" />
          </BackgroundTasks>
        </Extension>
      </Extensions>

from windows-universal-samples.

cwesterlund avatar cwesterlund commented on May 17, 2024

Created a Windows Universal Solution from scratch on 10.0.10030.0
I then installed Visual Studio 2015 RC and changed to 10.0.10069.0

When I debug the sample, I run it, put a breakpoint in CastsBackgroundAudioTask.Run method and suspend the app through Lifecycle Events which will put me in the Run method of the background task.
If I do the same in my project nothing happens when I suspend the App. The background task is never invoked.

Here are the Projects:
CASTS_BACKGROUNDAUDIO (Windows Runtime Component)
Assembly name: CASTS_BACKGROUNDAUDIO
Default namespace: CASTS_BACKGROUNDAUDIO
Background task class: CastsBackgroundAudioTask

CASTS_UAP (APP)
Has reference to CASTS_BACKGROUNDAUDIO project
Package.appxmanifest:

<Extensions>
  <Extension Category="windows.backgroundTasks" EntryPoint="CASTS_BACKGROUNDAUDIO.CastsBackgroundAudioTask">
    <BackgroundTasks>
      <Task Type="audio" />
    </BackgroundTasks>
  </Extension>
</Extensions>

Don't know what can be the problem, I hade a Silverlight App previously which I could make work.
Thanks for the help!

from windows-universal-samples.

cwesterlund avatar cwesterlund commented on May 17, 2024

I created a new solution with only the basics, tried to suspend the app for it to break in the Run method but nothing. The solution is here: http://1drv.ms/1F8fGIV

from windows-universal-samples.

cwesterlund avatar cwesterlund commented on May 17, 2024

Strange, when I suspend the sample now it will not break in the Run method.
What is triggering the Background task to Run?

from windows-universal-samples.

cwesterlund avatar cwesterlund commented on May 17, 2024

Got it to work!
Had to create a new solution and projects.
Don't know why it didn't work with my previous solution, I used the same code.

from windows-universal-samples.

aarononeal avatar aarononeal commented on May 17, 2024

Yay! There may have been some project template changes between 10030 and 10069 that just creating a new project resolved. Glad to hear that worked for you!

from windows-universal-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.