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

Add ability to get all config as JSON #37

Closed
maximbircu opened this issue Apr 22, 2020 · 0 comments · Fixed by #46
Closed

Add ability to get all config as JSON #37

maximbircu opened this issue Apr 22, 2020 · 0 comments · Fixed by #46
Assignees
Labels
feature New feature or request

Comments

@maximbircu
Copy link
Owner

maximbircu commented Apr 22, 2020

Abstract

For some library, consumers might be useful the ability to get all config info form of a JSON string.

Requirements

  • Add a getConfigAsJson method to DevToolsStorage.kt
  • Add a filterEnabled parameter so that the library user will be able to filter out the disabled configuration values.

Consumer flow

Usecase 1

  1. Go to any source Dev Tools Configuration screen
  2. Add val jsonConfiguration = devtools.getAllConfigAsJson() inside the onCreate method
  3. Place a breakpoint and check the jsonConfiguration result
  4. Make sure the JSON configuration string contains all configuration values

Usecase 2 (Make sure the filter predicate works properly)

  1. Go to any source Dev Tools Configuration screen
  2. Add val jsonConfiguration = devtools.getAllConfigAsJson { tool -> tool.isEnabled } inside the onCreate method
  3. Place a breakpoint and check the jsonConfiguration result
  4. Make sure the JSON configuration string contains all enabled configuration values
    You can try and experiment with different filters.
@maximbircu maximbircu added feature New feature or request android Relates to Android platform labels Apr 22, 2020
@maximbircu maximbircu self-assigned this Apr 22, 2020
@maximbircu maximbircu removed the android Relates to Android platform label Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant