apptentive / apptentive-android

Apptentive Android SDK
http://www.apptentive.com
BSD 3-Clause "New" or "Revised" License
65 stars 64 forks source link

Resolve issues with Android 11 preventing surveys / dialogs from being shown #209

Closed simonsickle closed 3 years ago

simonsickle commented 3 years ago

Resolves #208 I have submitted the contributor agreement.

This PR adds unit tests to verify existing function was not changed. The tests also verify the exception in DeviceManager happened before the code changes were made. 5G radio support was also added.

To resolve this issue, I have added a version check that keeps functionality the same if the build version is less than 30. On SDK 30 and newer, I check the READ_PHONE_STATE permission and verify that it is granted before attempting to use it.

The 5G radio type added in SDK 29 is also now supported.

If an app wants to provide surveys off the network type, the app can request READ_PHONE_STATE from the user still

CaseyApptentive commented 3 years ago

Thanks, @simonsickle and @gauravsacc. I've shared this with my product team to review. Stay tuned.

weeeBox commented 3 years ago

Hey @simonsickle,

Thanks for your investigation. We'll incorporate the changes into the next release. Unfortunately, we can't accept the pull request due to our build system limitations: all artifacts are built from a private repo and merged to the public repo automatically (squashing commit history, making appropriate tags and GitHub releases).

gauravsacc commented 3 years ago

Hi @weeeBox do you have a planned release date?

CaseyApptentive commented 3 years ago

Hi @simonsickle. I don't nave a solid release date quite yet, but work is actively underway on this. It's our top priority right now, and expect to have it out before Android 11 goes out of beta.

We'll follow up with more details as soon as we know more.

ghost commented 3 years ago

Android 11 just got released today - https://android-developers.googleblog.com/2020/09/android11-final-release.html

~What is the strategy we should take for Google Pixel devices that being updated to 11, I believe it will crash the app on launch.~ UPDATE: If we target API 30 (Android 11), then it will crash, otherwise it's fine for now. It's blocking Android 11 migration testing and we have disabled the library for now.

Any update on this issue would be appreciated. Thanks

ghost commented 3 years ago

I just saw this in https://learn.apptentive.com/knowledge-base/android-sdk-release-notes/

Screen Shot 2020-09-08 at 9 14 22 PM

Does it mean, the this issue is resolved with v5.5.4?

weeeBox commented 3 years ago

@HKhanDev, yes