Skip to content

Migrate ns couchbase #27

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

Merged
merged 4 commits into from
Mar 28, 2022
Merged

Migrate ns couchbase #27

merged 4 commits into from
Mar 28, 2022

Conversation

agonper
Copy link
Collaborator

@agonper agonper commented Mar 28, 2022

Continuing with the migration of this plugin to NS8.

Time to migrate another dependency, the couchbase plugin.

The API remains the same. But it requires a higher min Android SDK, the 22 (Android Lollipop 5.1). What do you think @matey97? Are we ready to ditch Android 4?


I've noticed something strange. The first time that I run the demo and it asks for the permissions, the callback returns automatically right after asking for them saying that no permission has been granted. This happens in the device that I have here with me and also in the emulator. Digging a bit in the problem, I've found that it is because NativeScript calling the application event when the permissions are requested and now when the permission-asking dialog closes. Could you check please if this happens to you too? Thanks

@agonper agonper requested a review from matey97 March 28, 2022 09:27
@agonper agonper added the enhancement New feature or request label Mar 28, 2022
@agonper agonper mentioned this pull request Mar 28, 2022
@matey97
Copy link
Contributor

matey97 commented Mar 28, 2022

Hi @agonper,

The API remains the same. But it requires a higher min Android SDK, the 22 (Android Lollipop 5.1). What do you think @matey97? Are we ready to ditch Android 4?

Time to get rid of those ancient devices ☠️.

I've noticed something strange. The first time that I run the demo and it asks for the permissions, the callback returns automatically right after asking for them saying that no permission has been granted. This happens in the device that I have here with me and also in the emulator. Digging a bit in the problem, I've found that it is because NativeScript calling the application event when the permissions are requested and now when the permission-asking dialog closes. Could you check please if this happens to you too? Thanks

I've tested the demo with an Android 9 and an Android 11. The Android 11 seems to behave as you described and some logs with permission errors are printed. The Android 9 works as expected (no error logs), but the application events are being called in the same way as in Android 11 (resume/suspend on dialogs, if I understood well). The only difference between both versions is the activity recognition permission, not required in Android 9. My hypothesis is that requesting both permissions at the same time is causing troubles 🫣.

Anyway, I don't think it's an issue with the plugin itself.

@agonper
Copy link
Collaborator Author

agonper commented Mar 28, 2022

Hi @matey97!

Time to get rid of those ancient devices ☠️.

Hahahaha (agree 😈 )

I've tested the demo with an Android 9 and an Android 11. The Android 11 seems to behave as you described and some logs with permission errors are printed. The Android 9 works as expected (no error logs), but the application events are being called in the same way as in Android 11 (resume/suspend on dialogs, if I understood well). The only difference between both versions is the activity recognition permission, not required in Android 9. My hypothesis is that requesting both permissions at the same time is causing troubles 🫣.

You completely hit the nail! I was working on the NS8 version of the plugin and this was giving me lots of problems, so I decided to do the different actions in a sequence, and... 🎉 it was that hehe. In the NTD we prepare the tasks sequentially, that's why we weren't facing this issue until now...

Thanks for the feedback!

@agonper agonper merged commit d64ebf6 into master Mar 28, 2022
@agonper agonper deleted the migrate-ns-couchbase branch March 28, 2022 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants