title: Display a Toast message when Android for Work configuration is missing
body: <p>I'd like to prevent my application from starting when an Android for Work profile is not available for my application (not yet configured, or deployed on the device). Instead, I'd like to be able to display a Toast like message telling the user to contact his IT administrator. Example of this at the bottom of this message.</p>
  
  <p><strong>Example:</strong>
  Divide Productivity Suite of application displays this message (mail, notes, etc).</p>
  
  <p><em>"Configuration from managing application required. Contact your IT admin for details".</em> <br><br>
  <a href="https://i.stack.imgur.com/FMPDr.jpg" rel="nofollow noreferrer">Screen Capture</a></p>
  
  <p>Is there a way to implement this? I've tried to hook into MainActivity onCreate function, or even put it directly in the Application onCreate() function. Hooking code in here seem to still have launched the application (the title bar is displayed despite there's no content displayed). </p>
  
  <p>I was able to figure out how to determine if your Application was running on a for Work profile and display a alert dialog here:
  <a href="https://stackoverflow.com/questions/30442121/android-for-work-how-to-check-if-my-application-is-running-in-the-work-profile">Android for work - How to check if my application is running in the work profile?</a> </p>