Skip to content
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

Refactored code for runtime permissions #598

Closed
wants to merge 1 commit into from

Conversation

jtj9817
Copy link
Contributor

@jtj9817 jtj9817 commented Apr 5, 2019

Description

Removed the runtime permissions being asked at the start of the app and instead selectively implemented it on the parts of the app where it would be needed.

Fixes #(issue)
Possible fix to #566

Type of change

Just put an x in the [] which are valid.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

  • ./gradlew assembleDebug assembleRelease
  • ./gradlew checkstyle

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@Swati4star
Copy link
Member

@thedevelopersanjeev Please review

@@ -141,9 +141,6 @@ protected void onCreate(Bundle savedInstanceState) {

fragmentManager.beginTransaction().replace(R.id.inc, fragment).commit();

// Get runtime permissions for Android M
Copy link
Member

Choose a reason for hiding this comment

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

why did you remove these? I didnt get the point for this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed these permissions because they will trigger the permissions to be asked if the user is just going to log-in or sign-up. I wanted the permissions to be only used at activities/app sections where it is only necessary.

@thedevelopersanjeev 's implementation could be better but it's already asking for permissions at first time use for user and it doesn't take into account if the user declines all permissions.

@@ -111,6 +115,25 @@ protected void onCreate(Bundle savedInstanceState) {
}
}

//Get permissions for making calls and locations
private void getPermissions() {
Copy link
Member

Choose a reason for hiding this comment

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

we would need runtime permissions for other places too (not just hotels?)

@prabhakar267
Copy link
Member

@jtj9817 Any updates?

@prabhakar267
Copy link
Member

Closing this due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants