title: Companion objects - does Android want to register them as activities (?)
body: <p>I have an Activity</p>
  
  <pre><code>class DummyActivity : Activity() {
  
      companion object {
          @JvmStatic fun onNewIntent(context: Context): Intent {
              val intent = Intent(context, DummyActivity.javaClass)
              return intent
          }
      }
  
      override fun onCreate(savedInstanceState: Bundle?) {
          super.onCreate(savedInstanceState)
          setContentView(R.layout.activity_main)
      }
  }
  </code></pre>
  
  <p>It is declared in the Manifest as follows:</p>
  
  <pre><code>    &lt;activity android:name=".DummyActivity"/&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p>When I try to launch it, I get:</p>
  
  <blockquote>
    <p>Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class > {com.example.andrzejzuzak.visiondummyapp/com.example.andrzejzuzak.visiondummyapp.DummyActivity$Companion}; have you declared this activity in your AndroidManifest.xml?
                                                                                                 at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1794)
                                                                                                 at android.app.Instrumentation.execStartActivity(Instrumentation.java:1512)
                                                                                                 at android.app.Activity.startActivityForResult(Activity.java:3930)
                                                                                                 at android.support.v4.app.BaseFragmentActivityJB.startActivityForResult(BaseFragmentActivityJB.java:50)
                                                                                                 at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:79)
                                                                                                 at android.app.Activity.startActivityForResult(Activity.java:3890)
                                                                                                 at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:859)
                                                                                                 at android.app.Activity.startActivity(Activity.java:4213)
                                                                                                 at android.app.Activity.startActivity(Activity.java:4181)
                                                                                                 at com.example.andrzejzuzak.visiondummyapp.MainActivity.onActivityResult(MainActivity.kt:85)
                                                                                                 at android.app.Activity.dispatchActivityResult(Activity.java:6456)
                                                                                                 at android.app.ActivityThread.deliverResults(ActivityThread.java:3695)
                                                                                                 at android.app.ActivityThread.handleSendResult(ActivityThread.java:3742) 
                                                                                                 at android.app.ActivityThread.-wrap16(ActivityThread.java) 
                                                                                                 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1393) 
                                                                                                 at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                                                 at android.os.Looper.loop(Looper.java:148) 
                                                                                                 at android.app.ActivityThread.main(ActivityThread.java:5417) 
                                                                                                 at java.lang.reflect.Method.invoke(Native Method)</p>
  </blockquote>
  
  <p>What bothers me is this line:</p>
  
  <blockquote>
    <p>Unable to find explicit activity class {com.example.andrzejzuzak.visiondummyapp/com.example.andrzejzuzak.visiondummyapp.DummyActivity$Companion</p>
  </blockquote>
  
  <p>Does it actually mean that I have to register the Companion object somewhere?</p>