-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Qonversion.shared.offerings not giving any callback at all. #549
Comments
Hello, @michaldrabik! Do you have any offerings set up on the Qonversion dashboard? |
@SpertsyanKM Yep, all there. Also just double checked that the project key is valid. Still a no go. Basically method is called and nothing happens. |
I've checked your scenario and everything worked fine for our sample app. To dig deeper into your concrete case could you please contact us via the support (a chat icon at the bottom right angle of our main page), as we'll need some sensitive information about your project. |
OK, just to confirm - also played with sample app and it seemed to be working all right too for me. |
Closed accidentally |
For the history: the problem was caused by the conflict with the Hilt library. It requires disabling the default initializer in Android WorkManager that in turn stops
That's why Qonversion initialization gets stuck and no offerings callback is executed (neither any other callbacks would). The solution, provided by @michaldrabik :
|
Hey there, I'm running into the exact same problem. Our setup already does what's mentioned on the comment above (regarding I'm actually trying to get the offerings inside a WorkManager If the Worker runs while the app is active (e.g. in foreground), everything works as expected. edit: mentioning @SpertsyanKM directly so this will hopefully get seen, I didn't want to open another Issue as it's the same problem (but probably different cause) Any ideas on what could cause this? |
Hello, @astuetz. Is it possible to provide a kind of minimal reproducible example of the issue? The mentioned kind of problem needs step-by-step reproduction to be able to find any issues in code, so the example would be very appreciated. You can send it directly to my email - [email protected]. |
Hi @SpertsyanKM, I uploaded a minimal sample project on GitHub: See the readme for steps to reproduce. Our use case for getting the offerings inside a Worker would be to show a notification to the user including some price info. |
Great, thank you for the provided information! I'll try everything today and come back as soon as I have any news |
Thanks again for the reproducible example - it helps so much! I've tried the provided steps and here is what I see. When I kick the app after clicking the button, it doesn't complete the background task at all - doesn't even call To check if this behavior is somehow related to Qonversion or not I removed the offerings call from the worker and nothing changed - it still behaves the same way (of course without receiving offerings). So I think that is how |
Hey! Strange that it behaves differently for you. I'm running this on a Pixel 6 Pro with Android 14. Did you wait long enough after kicking the app? You might also have to interact with the device a bit while waiting, so WorkManager will actually fire off the Worker. Here's what I see on the logs (removed a few to make it simpler):
I was actually using a Since your SDK is heavily relying on the app lifecycle, I feel like something is off related to that. |
Really strange... I'm using Pixel 7 with Android 14, so it seems to be pretty similar. Do you use an emulator or a real device? |
Here is what I receive:
|
Kind of magic, but somehow now it reproduced as you described. I'll continue investigating |
Hi, I checked everything, and here is what happens in your case. First of all, the problem with reproducing is caused by a longer delay before starting the background task as expected - even if set to 15 seconds it can start a minute after you close the app — just a note for history. Speaking of the problem itself - after the background task begins, the Qonversion initialization starts and doesn't finish as we have a block in code for background initialization - it won't finish until the app goes to the foreground. Each SDK request (including Now I want to understand your use-case better to create a feature request if necessary, to support background mode for the SDK. Could you please explain it to me? |
Hey! I mentioned it briefly on a previous comment. I need to show a "discount" notification (x hours before the discount runs out) to a user and wanted to get the correct price at the time of showing the notification. |
Thank you for the details. I've created a feature request for your case. We will discuss and implement the possible solutions with the team.
It's done to prevent spamming initialization requests from the apps where there is no need in Qonversion in the background. The most popular case is push notifications - the app launches in the background when receives the message and usually initializes Qonversion on each launch. But your case is clear so we're going to discuss probably a better solution or any workaround. |
👋🏻 It's been a while, are thee any updates on this? |
Hi @astuetz , Thank you for reaching out about your feature request. I understand how important this is to you. Currently, there are no updates, as your request is still in our backlog. We appreciate your patience and will keep you posted as soon as there’s any progress. If you have any other questions or need further assistance, feel free to ask! |
Hi team. So we wanted to try out your product. We have set up everything according to docs but encountering a problem when trying the most simple thing which is getting offerings.
I think this pic is fastest way to showcase it.
setupQuonversion()
is called after Appsuper.onCreate()
You can observe the LogCat and notice that neither callback is being triggered.
Any ideas on how to even check what might be wrong?
Regards
The text was updated successfully, but these errors were encountered: