title: Firebase setCurrentScreen duplicates log entries screen_view
body: <p>I need to display statistics on open screens in firebase (as before in analytics.google)<br></p>
  
  <p>And I need to display not real class names like MainActivity, but for example ScreenSeviceList<br></p>
  
  <p>I created a test project consisting of 4 Activity and 3 Fragment(in MainActivity4)</p>
  
  <pre><code>class App : Application() {
  companion object{
      lateinit var mFirebaseAnalytics: FirebaseAnalytics
  }
  override fun onCreate() {
      super.onCreate()
       mFirebaseAnalytics = FirebaseAnalytics.getInstance(this)
  }
  </code></pre>
  
  <p>}</p>
  
  <p>all Activity contain approximately the same code</p>
  
  <pre><code>class MainActivity : AppCompatActivity() {
  
  override fun onCreate(savedInstanceState: Bundle?) {
      super.onCreate(savedInstanceState)
      setContentView(R.layout.activity_main)
      button2.setOnClickListener { startActivity(Intent(baseContext,Main2Activity::class.java)) }
      button3.setOnClickListener {  startActivity(Intent(baseContext,Main3Activity::class.java))}
      button4.setOnClickListener {  startActivity(Intent(baseContext,Main4Activity::class.java))}
  
  }
  override fun onResume() {
      super.onResume()
      App.mFirebaseAnalytics.setCurrentScreen(this, null, "ScreenActivity#1")
  }
  </code></pre>
  
  <p>}</p>
  
  <p>And Activity4 have 3 Fragment like</p>
  
  <pre><code>class Fragment1 :Fragment(){
  
  override fun onCreateView(
      inflater: LayoutInflater,
      container: ViewGroup?,
      savedInstanceState: Bundle?
  ): View? {
      val view=inflater.inflate(R.layout.fragment,container,false)
      view.fragment_title.text="====Fragment#1===="
      view.button_prev.setOnClickListener { activity!!.goToFragment(0) }
      view.button_next.setOnClickListener { activity!!.goToFragment(2) }
      return view
  }
  override fun onResume() {
      super.onResume()
      App.mFirebaseAnalytics.setCurrentScreen(activity!!, null, "ScreenFragment#1")
     }
  </code></pre>
  
  <p>}</p>
  
  <p>In firebase console DebugView, when I switch screen. I see two event screen_view<br>
  First even <code>firebase_screen_class = MainActivity</code> <br>
  Second even <code>firebase_screen_class = ScreenActivity#1</code><br>
  For fragment all work well<br>
  How not to register automatic events like <code>MainActivity</code>, but to register only your own such as <code>ScreenActivity#1</code>? As you can see in the picture below, the entries are duplicated and, as a result, the values ​​are incorrect. For example, instead of showing the line of <code>ScreenActivity#1 18 28%</code>, we see two of 14%<br></p>
  
  <p><a href="https://i.stack.imgur.com/5OtfO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5OtfO.png" alt="enter image description here"></a></p>