Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.

Fixed for Android 8.0 #180

Closed
wants to merge 1 commit into from
Closed

Fixed for Android 8.0 #180

wants to merge 1 commit into from

Conversation

duncan-c
Copy link

Platforms affected

Android 8+

What does this PR do?

Android 8.0 no longer assumes related permissions - so when the app gets a contact 'write' permission to save the contact, it no longer automatically gets the 'read' permission - which was causing the app to crash when it tries to read the contact it just saved. This modification simply ensures the app has both permissions before attempting to save or remove.

What testing has been done on this change?

Only tested on Android 8 and 9, but no reason for it to not be backwards compatible.

Android 8.0 no longer assumes related permissions - so when the app gets a contact 'write' permission to save the contact, it no longer automatically gets the 'read' permission - which was causing the app to crash when it tries to read the contact it just saved. This modification simply ensures the app has both permissions before attempting to save or remove.
@janpio
Copy link
Member

janpio commented Nov 13, 2018

Uh @duncan-c, for us to be able to accept this PR you would stop adding unrelated fixes to this branch of your plugin - otherwise it will be really hard to merge these.

Easiest way to achieve this is probably to go back to your "Fixed for Android 8.0" commit and create a branch from that, then create a new PR from that branch. Then you can go on and create new branches for your other commits and also create PRs from those (and mention that they build on the first one). Then we can merge those fixes into the plugin as well!

@duncan-c
Copy link
Author

Ah, apologies. I forgot this PR was open. I'll undo these two commits and create a new branch as you suggest.

@phuwin1995
Copy link

Cheers!

@BatteryAcid
Copy link

@duncan-c Thanks for the work on this! Where do we stand on getting this merged? Looks like there are some failing CI checks.

@Mapiac
Copy link

Mapiac commented Sep 25, 2019

What Android Cordova Version and API version are you on @duncan-c? Did you try with 28?

Copy link

@breautek breautek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit should not be a part of this PR. I've added the invalid tag until this is resolved.

@duncan-c
Copy link
Author

Sorry - Again I forgot about this open PR (and I probably should have made a new branch for both of these issues - its just that my project is pointing to master).
I'll move the new commit to a new branch.

@duncan-c
Copy link
Author

This commit should not be a part of this PR. I've added the invalid tag until this is resolved.

I've now removed this commit to its own branch.

@breautek
Copy link

This commit should not be a part of this PR. I've added the invalid tag until this is resolved.

I've now removed this commit to its own branch.

Thanks. The best way to to do this is also move the commit for this PR into its own branch, then edit this PR to point at your new branch, like what Janpio said above. This will help protect this PR from unwanted changes in the future.

Easiest way to achieve this is probably to go back to your "Fixed for Android 8.0" commit and create a branch from that, then create a new PR from that branch. Then you can go on and create new branches for your other commits and also create PRs from those (and mention that they build on the first one). Then we can merge those fixes into the plugin as well!

@breautek breautek removed the invalid label Feb 19, 2020
@breautek
Copy link

I'll try to see what is going on with Travis later tonight. The failures appears to be caused by using a mismatch of of cordova-android and the android sdk.

@duncan-c
Copy link
Author

Thanks. The best way to to do this is also move the commit for this PR into its own branch, then edit this PR to point at your new branch, like what Janpio said above. This will help protect this PR from unwanted changes in the future.

So I didn't do this at the time as AFAIK you can't change the source branch for a pull request (correct me if I'm wrong) - so at the time I just moved my new commits to new branches (déjà vu). Perhaps I should close this PR and make a new one on it's own branch so this doesn't keep happening?

@breautek
Copy link

So I didn't do this at the time as AFAIK you can't change the source branch for a pull request (correct me if I'm wrong)

Oops! Looks like you are right. Looks like you can only change the target branch, but not the source branch.

Perhaps I should close this PR and make a new one on it's own branch so this doesn't keep happening?

If you think that there is a good chance of you adding new work in your master branch, then I think it is worth closing this PR and recreating it from a different source branch.

@duncan-c
Copy link
Author

If you think that there is a good chance of you adding new work in your master branch, then I think it is worth closing this PR and recreating it from a different source branch.

Ok I will do as I seem to keep making this mistake, and it would be good for all my fixes to be on the master branch so my project can easily use them.

Sorry for the mess!! I'll also add PRs for the other fixes I made.

@duncan-c duncan-c closed this Feb 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants