title: GCP Api Key security for youtube
body: <p>I am using youtube player in my app and i am getting this warning in google play console.</p>
  <pre><code>    Your app contains exposed Google Cloud Platform (GCP) API keys. Please see this Google Help Center article for details.
      
       - com.example.myplayeryoutube.MainActivity.onCreate
  </code></pre>
  <p><strong>What is best practices to keep information secure on client side?</strong></p>
  <p><strong>How to secure the api key for YouTube Player API?</strong></p>
  <p>Code from my application:</p>
  <pre><code>    class MainActivity : YouTubeBaseActivity() {
          override fun onCreate(savedInstanceState: Bundle?) {
              super.onCreate(savedInstanceState)
              setContentView(R.layout.activity_main)
          
          val GOOGLE_API_KEY = &quot;&lt;api key&gt;&quot;
      
              val youTubePlayer = findViewById&lt;YouTubePlayerView&gt;(R.id.playerYouTube)
      
              youTubePlayer.initialize(GOOGLE_API_KEY, object : YouTubePlayer.OnInitializedListener {
                  override fun onInitializationSuccess(
                      p0: YouTubePlayer.Provider?,
                      youTubePlayer: YouTubePlayer?,
                      p2: Boolean
                  ) {...}
      
                  override fun onInitializationFailure(
                      p0: YouTubePlayer.Provider?,
                      p1: YouTubeInitializationResult?
                  ) {...}
      
              })
          }
      }
  </code></pre>
  <p><strong>Thanks!</strong></p>