Iterable / iterable-android-sdk

Iterable's Android SDK. Receive and track pushes to Iterable from your Android app.
https://iterable.com/
MIT License
30 stars 28 forks source link

Clicking on push notification not doing deep linking. #221

Closed iamjosephmj closed 4 years ago

iamjosephmj commented 4 years ago

result: there will be no action taken(deeplink handler is not called).

SDK version(3.2.0) OS: Android 10(one-plus 7 pro)

vbabenkoru commented 4 years ago

Thank you for the report. We'll investigate and get back to you.

Ayyanchira commented 4 years ago

Hi @iamjosephmj, I followed your steps but couldn't reproduce the issue. The deeplink handler was invoked properly. A simple way to test if the deeplink handler is getting called would be to print/log something inside the method handleIterableURL and check the logcat when you click the notification.

Also, does it occur only to specific OS and device you mentioned? Does it work on other OS/device/emulator properly?

Ayyanchira commented 4 years ago

Another check mark before going into details: Is the SDK Initialized during Application's oncreate✅ ? or is it Activity's oncreate ❌?

It is necessary for Iterable SDK to be initialized when the application is starting, to make sure everything is set up.

iamjosephmj commented 4 years ago

Hey @Ayyanchira, This is the configuration that I have done:

deep-link is working in these 2 scenarios with my app:

BUT suppose we get a push notification when the application is opened, and after that, I closed the application. Then when I click on the push notification there is no action taken in the deep link handler.

I have tried logging method, Still, nothing is getting logged in this scenario.

Please let me know If I need to provide any more details. Thanks.

iamjosephmj commented 4 years ago

This happens only with OnePlus7pro (Android 10)

Everything works fine in other devices(also tested out with devices with the same OS version).

Ayyanchira commented 4 years ago

This definitely needs further investigation. Thanks for sharing those details @iamjosephmj . We will get back to you.

Ayyanchira commented 4 years ago

Hi @iamjosephmj, need another piece of information. when you say no action is taken in deep handler, does the app launch? Or is it just the deep link handler function not getting invoked?

iamjosephmj commented 4 years ago

@Ayyanchira The app doesn't start.

Ayyanchira commented 4 years ago

Receiving a push notification and then killing the app should have no problem. Tapping on the notification should ideally launch the application's background processes (eventually leading to deeplink callback and app launch).

This seems to be OnePlus's way of handling notification which is preventing app launch. I would suggest you try disabling battery optimization options like Deep Optimization and Sleep standby optimization and try it again. You will find additional info here: https://dontkillmyapp.com/oneplus

iamjosephmj commented 4 years ago

@Ayyanchira "https://dontkillmyapp.com/oneplus" resolved the issue I had. Thankyou.