GithubHelp home page GithubHelp logo

Comments (5)

wellle avatar wellle commented on June 1, 2024

That's an interesting use case we haven't tested yet. We'll look into it.

If you feel like exploring it yourself, you could start by adding some logging inside the adjust SDK to check if the trackEvent function actually gets called. You could extend that too see where exactly it stops working. If you do that, we would be interested in your findings.

from android_sdk.

WarrenFaith avatar WarrenFaith commented on June 1, 2024

Indeed the issue is the missing Activity. Therefore the activityHandler in the Adjust class is null and as the logger is null as well any reporting is just swallowed. (see method trackRevenue(): https://github.com/adjust/android_sdk/blob/master/Adjust/src/com/adjust/sdk/Adjust.java#L116 )

Within my push receiver I have no access to any Activity and therefore I can't call Adjust.onResume() or similar to setup everything.

On further (short) digging: Why does the ActivityHandler needs an Activity in the first place? All I see is that the ApplicationContext is needed. If I am not mistaken, the easiest way would be to change the Activity parameter to a Context type and so it should work.

Am I missing something?

from android_sdk.

wellle avatar wellle commented on June 1, 2024

Am I missing something?

No that's a good observation. We only use the activity to get access to the context. So you're right, we could change the parameter type and you could call Adjust.onResume before Adjust.trackEvent. We will change that in future.

Thanks 👍

from android_sdk.

wellle avatar wellle commented on June 1, 2024

@nonelse: I sent you a patch from @WarrenFaith to fix the issue. Could you apply it?

@WarrenFaith: Thanks for the patch. 👍
Feel free to open pull requests in the future.

from android_sdk.

nonelse avatar nonelse commented on June 1, 2024

Fixed in version v3.6.1

from android_sdk.

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.