# How to startActivityForResult by implict intent in Anko?

**URL:** <https://discuss.kotlinlang.org/t/how-to-startactivityforresult-by-implict-intent-in-anko/10057>\
**Category:** Android\
**Created:** [October 29, 2018, 8:44am UTC](https://discuss.kotlinlang.org/t/how-to-startactivityforresult-by-implict-intent-in-anko/10057 "2018-10-29T08:44:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dlyltm](https://avatars.discourse-cdn.com/v4/letter/d/e9bcb4/32.png) [@dlyltm](https://discuss.kotlinlang.org/u/dlyltm)\
**Post date:** [October 29, 2018, 8:44am UTC](https://discuss.kotlinlang.org/t/how-to-startactivityforresult-by-implict-intent-in-anko/10057/1 "2018-10-29T08:44:57Z")

</div>

Such as title.Implicit intent can be used in startActivity,how to be used in startActivityForResult?

---

<div class="post-metadata">

**Author:** ![kritesh](https://avatars.discourse-cdn.com/v4/letter/k/f17d59/32.png) [@kritesh](https://discuss.kotlinlang.org/u/kritesh)\
**Post date:** [October 30, 2018, 11:07am UTC](https://discuss.kotlinlang.org/t/how-to-startactivityforresult-by-implict-intent-in-anko/10057/2 "2018-10-30T11:07:02Z")

</div>

1. Create Singleton class for application instance for example :

class MyApp: Application() {

```auto
override fun onCreate() {
    super.onCreate()
    instance = this
}

companion object {
    lateinit var instance: MyApp
        private set
}

```

}

1. then after call it where you required application object instance. for example :

```auto
val intent: Intent = Intent(MyApp.instance, DestinationActivity::class.java);
MyApp.instance.startActivity(intent)

```

Hope this will help to implict in anko

---

<div class="post-metadata">

**Author:** ![dlyltm](https://avatars.discourse-cdn.com/v4/letter/d/e9bcb4/32.png) [@dlyltm](https://discuss.kotlinlang.org/u/dlyltm)\
**Post date:** [October 31, 2018, 12:54am UTC](https://discuss.kotlinlang.org/t/how-to-startactivityforresult-by-implict-intent-in-anko/10057/3 "2018-10-31T00:54:43Z")

</div>

Thanks.I already solved this problem.
