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

Set device_id and settings_json from MDM #6582

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

lognaturel
Copy link
Member

@lognaturel lognaturel commented Feb 4, 2025

Exploration for #6581

This is intended to be a quick spike to explore how MDM works. To set settings_json, make sure to include both general and admin settings blocks.

Out of scope:

Todo:

  • make sure all error handling is robust -- nothing should happen if invalid values are set

The easiest way I've found to try this is:

  • Run Test DPC app
  • Run adb shell dumpsys user to get profile info
  • Update Android Studio run config to add --user N to Launch Flags where N is the user number for the managed user

In Test DPC, search for "managed configuration", then select Collect and identify all keys from manifest.

Why is this the best possible solution? Were any other approaches considered?

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

Do we need any specific form for testing your changes? If so, please attach one.

Does this change require updates to documentation? If so, please file an issue here and include the link below.

Before submitting this PR, please make sure you have:

  • added or modified tests for any new or changed behavior
  • run ./gradlew connectedAndroidTest (or ./gradlew testLab) and confirmed all checks still pass
  • added a comment above any new strings describing it for translators
  • added any new strings with date formatting to DateFormatsTest
  • verified that any code or assets from external sources are properly credited in comments and/or in the about file.
  • verified that any new UI elements use theme colors. UI Components Style guidelines

private val projectsRepository: ProjectsRepository,
private val projectCreator: ProjectCreator,
private val settingsImporter: ODKAppSettingsImporter,
private val context: Context
Copy link
Member Author

Choose a reason for hiding this comment

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

Doing something quick and dirty that keeps all of the functionality contained, I'm not suggesting we'd want to pass context into something like this

@grzesiek2010 grzesiek2010 force-pushed the mdm branch 4 times, most recently from a6eb9af to 6eae47a Compare February 9, 2025 23:26
@grzesiek2010 grzesiek2010 force-pushed the mdm branch 3 times, most recently from 28bf020 to 7dfce8c Compare February 11, 2025 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants