title: Display message on plugin activation and deactivation in wordpress
body: <p>I'm building a WordPress plugin and want to display a message on activating the plugin and on its deactivation. </p>
  
  <p>It should display the message one time on the plugins page in the dashboard.</p>
  
  <p><a href="https://i.stack.imgur.com/ppEBL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ppEBL.png" alt="Plugin Message"></a></p>
  
  <p>I have tried it with <code>admin_notices</code> hook but the message continuously displayed.</p>
  
  <p>Can anyone tell me any condition or method to achieve this or any WordPress hook?</p>