GithubHelp home page GithubHelp logo

Comments (10)

quincycs avatar quincycs commented on July 30, 2024

@mtaron not a great solution, but I typically put a Task.Delay of 2 or more seconds then flush. I have this issue as well, but for a different scenario.

from hockeysdk-windows.

schuettecarsten avatar schuettecarsten commented on July 30, 2024

@mtaron Why is it useful to call Flush in EnteredBackground?

from hockeysdk-windows.

mtaron avatar mtaron commented on July 30, 2024

@schuettecarsten These docs say the following:

Normally the SDK sends data at times chosen to minimize impact on the user. However, in some cases you might want to flush the buffer - for example, if you are using the SDK in an application that shuts down.

As I understand it, EnteredBackground is the write place to put "pre-shutdown" work in a UWP app. Plus, I aggregate a bunch of rendering performance metrics locally using RunningStatistics and I need to choose some place to stop aggregating and report them. It could be elsewhere, but this seemed like a convenient place.

from hockeysdk-windows.

schuettecarsten avatar schuettecarsten commented on July 30, 2024

I think that EnteredBackground is also triggered when the application is sent to background but continues to run in the background. If you need to catch the "pre-shutdown" moment, I would use CoreWindow.Closed event which is also documented as "fired when the App terminates" or the Suspend event of the App (which is also fired when the App is closed).

from hockeysdk-windows.

mtaron avatar mtaron commented on July 30, 2024

Hm, perhaps. What do you think about the "Save your state" section here? Seems like it could apply to flushing telemetry as well.

from hockeysdk-windows.

schuettecarsten avatar schuettecarsten commented on July 30, 2024

Ahh, okay, something was added/changed in 1607. Our app has to be compatible to 10240 for next two years, so we cannot use the new APIs.

from hockeysdk-windows.

achocron avatar achocron commented on July 30, 2024

This issue has been resolved with the latest NuGet package releases. Upgrading to 4.1.6 should solve the problem.

from hockeysdk-windows.

quincycs avatar quincycs commented on July 30, 2024

@achocron thx. It fixes the null ref by the look of the code change but now there is a possible side affect that flush might not flush

from hockeysdk-windows.

izikl avatar izikl commented on July 30, 2024

@quincycs yep. We are postponing the app initialization by 1 sec to avoid performance hit on app startup.

We can, however, revise and improve this design. I have opened issue #109 to track it.

from hockeysdk-windows.

quincycs avatar quincycs commented on July 30, 2024

Thx. I'll comment on that

from hockeysdk-windows.

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.