# getActivity() and getContext() functions

**URL:** <https://discourse.processing.org/t/getactivity-and-getcontext-functions/5662>\
**Category:** Processing for Android\
**Created:** [November 18, 2018, 10:13am UTC](https://discourse.processing.org/t/getactivity-and-getcontext-functions/5662 "2018-11-18T10:13:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![InSat](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/insat/32/2403_2.png) [@InSat](https://discourse.processing.org/u/InSat)\
**Post date:** [November 18, 2018, 10:13am UTC](https://discourse.processing.org/t/getactivity-and-getcontext-functions/5662/1 "2018-11-18T10:13:45Z")

</div>

Who can help me? Where can I find more informations about the getActivity() and getContext() functions ?

I read this, but it’s really short [https://android.processing.org/reference/environment/activity.html](https://android.processing.org/reference/environment/activity.html)

I read in this forum that I can do that “this.getActivity().finish();”

---

<div class="post-metadata">

**Author:** ![akenaton](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@akenaton](https://discourse.processing.org/u/akenaton)\
**Post date:** [November 18, 2018, 5:59pm UTC](https://discourse.processing.org/t/getactivity-and-getcontext-functions/5662/2 "2018-11-18T17:59:09Z")

</div>

@InSat ===  
you are in a fragment:that s why!
