# Caller's UI Not updated when call rejected

**URL:** <https://community.sendbird.com/t/callers-ui-not-updated-when-call-rejected/586>\
**Category:** Android\
**Tags:** sendbird-call, android\
**Created:** [July 6, 2020, 10:56am UTC](https://community.sendbird.com/t/callers-ui-not-updated-when-call-rejected/586 "2020-07-06T10:56:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![AK\_Infopark\_Projects](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/ak_infopark_projects/32/334_2.png) [@AK\_Infopark\_Projects](https://community.sendbird.com/u/AK_Infopark_Projects)\
**Post date:** [July 6, 2020, 10:56am UTC](https://community.sendbird.com/t/callers-ui-not-updated-when-call-rejected/586/1 "2020-07-06T10:56:04Z")

</div>

I modified your CallService class to launch a full screen intent activity when the screen is locked. This activity contains Textview to display Caller Name & 2 buttons for Accept & Reject.  
Accept Button redirects to call activity & reject button rejects the call & finishes the activity.  
I Have written the follwing code on Reject Button Click

end(SendBirdCall.getCall(getIntent().getStringExtra(EXTRA\_CALL\_ID)));

protected void end(DirectCall call) {  
Log.i(“NullDirectCall”, String.valueOf(call == null));  
if (call != null) {  
call.end();

```
    }
     finish();
}

```

But the caller’s callactivity still keeps calling & does not show as declined. From the log, the call variable is also not null.

---

<div class="post-metadata">

**Author:** ![Nathan.Park](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/nathan.park/32/316_2.png) [@Nathan.Park](https://community.sendbird.com/u/Nathan.Park)\
**Post date:** [July 9, 2020, 2:33am UTC](https://community.sendbird.com/t/callers-ui-not-updated-when-call-rejected/586/2 "2020-07-09T02:33:17Z")

</div>

Can you check whether `DirectCallListener.onEnded()` is called on both side?

---

<div class="post-metadata">

**Author:** ![AK\_Infopark\_Projects](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/ak_infopark_projects/32/334_2.png) [@AK\_Infopark\_Projects](https://community.sendbird.com/u/AK_Infopark_Projects)\
**Post date:** [July 9, 2020, 7:03am UTC](https://community.sendbird.com/t/callers-ui-not-updated-when-call-rejected/586/3 "2020-07-09T07:03:47Z")

</div>

In which class we need to check the same?

---

<div class="post-metadata">

**Author:** ![Nathan.Park](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/nathan.park/32/316_2.png) [@Nathan.Park](https://community.sendbird.com/u/Nathan.Park)\
**Post date:** [July 9, 2020, 7:51am UTC](https://community.sendbird.com/t/callers-ui-not-updated-when-call-rejected/586/4 "2020-07-09T07:51:31Z")

</div>

You need to check whether the above event is triggered or not after you call `call.end()`.  
You can set it like this

```auto
call.setListener(new DirectCallListener() {
    @Override
    public void onConnected(DirectCall call) {

    }

    @Override
    public void onEnded(DirectCall call) {
    }
});
```

---

<div class="post-metadata">

**Author:** ![AK\_Infopark\_Projects](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/ak_infopark_projects/32/334_2.png) [@AK\_Infopark\_Projects](https://community.sendbird.com/u/AK_Infopark_Projects)\
**Post date:** [July 9, 2020, 8:31am UTC](https://community.sendbird.com/t/callers-ui-not-updated-when-call-rejected/586/5 "2020-07-09T08:31:19Z")

</div>

This is there in Application Class & CallActivity. In caller’s phone when I reject call from notification it works regardless of app in foreground or killed but when I reject from my activity (shown when screen is locked) it works only when app is not killed.

---

<div class="post-metadata">

**Author:** ![Tyler\_Jeong](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler_jeong/32/104_2.png) [@Tyler\_Jeong](https://community.sendbird.com/u/Tyler_Jeong)\
**Post date:** [July 10, 2020, 1:57am UTC](https://community.sendbird.com/t/callers-ui-not-updated-when-call-rejected/586/6 "2020-07-10T01:57:07Z")

</div>

Could you check if authenticate() method is invoked before DirectCall.end() method is called.  
I think the end() method needs authentication.
