Question related to Android for Work. My application was a device Admin privileged app and now I have modified the code which creates a managed work profile and sets itself as the profile owner.
The question is, if I upgrade my application, it becomes a profile owner from device admin. Now there will be two copies of my application, one outside the profile and one inside (badged version).
Is there a way if I need to transfer some data from the personal space app to the work profile app (badged version)?
The DevicePolicyManager class implements a the addCrossProfileIntentFilter method for explicitly allowing Intents to be sent from the managed profile to the primary user profile.
public void addCrossProfileIntentFilter (ComponentName admin, IntentFilter filter, int flags)
Although
Called by the profile owner of a managed profile so that some intents sent in the managed profile can also be resolved in the parent, or vice versa. Only activity intents are supported.
来源:https://stackoverflow.com/questions/28602192/data-transfer-between-application-outside-profile-and-inside-profile-in-android