Welcome to Headwind MDM Q&A, where you can ask questions and receive answers from other members of the community.

Please do not post bug reports, missing feature requests, or demo inquiries. If you have such an inquiry, submit a contact form.

0 votes
When the device starts up, the activity of the HeadwindMDM app seems to be displayed for a moment, but is it possible to run it in the background without displaying it?
by (290 points)

1 Answer

0 votes

Headwind MDM app is set as a default launcher. 

To avoid displaying the app and run it in the background, set the checkbox "Use with default launcher" in the configuration details.

This will run Headwind MDM as a foreground service, it will work with a default system launcher, not attempting to set itself as a launcher.

by (37.6k points)
I had already done that setup.
However, about ten seconds after the device boots up, a screen that looks like HeadwindMDM appears for a moment and then quits.
Also, HeadwindMDM is still there in the app history.
https://imgur.com/a/b8g2SRg
Sounds like a bug. You are right, current version of Headwind MDM is starting an activity at boot. This bug is scheduled to be fixed in further versions. In the Community edition, you can fix it yourself by editing the source code: remove/comment out lines 87-95 in receiver/BootReceiver.java
After fix the code in android studio, I did a release build and reinstalled the mdm app on the device.
When I setting up the mdm app, the server URL input is skipped.
Do I need to change any settings when building with android studio?
All build settings are in app/build.gradle. To enable entering server URL, use the parameter REQUEST_SERVER_URL.
I have confirmed that the activity does not show up.
Thank you for your help!
If possible, could you please let me know the configuration values of app/build.gradle for the APK published on the download page (https://h-mdm.com/download/).
It seems to be different from the values published on github.
The value of REQUEST_SERVER_URL parameter is the only difference.
When lines 87 to 95 of receiver/ BootReceiver.java are deleted or commented out, "PluginApiService" and "StatusControlService" do not start when the device boots.
However, add code moveTaskToBack in onCreate of MainActivity and adding the element "<item name="android:windowDisablePreview">true</item>" in res/values/styles.xml ,service is started.
For more details, please refer to this.
https://stackoverflow.com/questions/36793872/movetasktoback-in-oncreate-causes-activity-to-show-briefly-and-then-hide
Since the MDM Agent app was updated to 4.10, the app is no longer automatically updated on device startup when using the default Android launcher.
Do I need to do any additional configuration?
This is a bug which will be fixed in version 4.11.
...