GithubHelp home page GithubHelp logo

Comments (5)

wenxi-zeng avatar wenxi-zeng commented on June 9, 2024 2

thank you all for reporting this issue. we'll get this fixed today. in the meanwhile, please use 4.11.1 instead

from analytics-android.

bigoloo avatar bigoloo commented on June 9, 2024 1

Same issue here!

from analytics-android.

wenxi-zeng avatar wenxi-zeng commented on June 9, 2024 1

hey all, this issue is fixed in 4.11.3. please have a try. sorry for the inconvenience. we have an adnroid 10 device was labeled as android 11, which gives false positive test result on the previous release.

from analytics-android.

TylerMcCraw avatar TylerMcCraw commented on June 9, 2024

This is related to this fix: #832. Because the Segment SDK wants to use display metrics and using display metrics requires a Context that has a reference to the display ("visual Context"), you'll now need to initialize Segment with an Activity Context and not the Application Context.

The README should be updated and the changelog ought to note this breaking change

from analytics-android.

TylerMcCraw avatar TylerMcCraw commented on June 9, 2024

Actually, using the Activity Context won't work either because the Analytics class expects a context of type Application.
See here:

application = (Application) context.getApplicationContext();

I don't understand how this fix worked.
@wenxi-zeng were you able to test this fix on Android 11+?
If so, what is the recommended solution to avoid the exception being thrown that @Joemiao120 mentioned?

from analytics-android.

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.