应用程序应该在最近的应用程序列表中未显示后完成的活动,如果应用程序是不显示最近的应用程序列表previously应用程序、最近、列表、中未

2023-09-12 04:44:49 作者:14.无心之泪

步骤1 - 应用程序没有在最近的应用程序列表存在(应用程序已经从最近的应用程序列表中删除)。 第2步 - 一旦我得到通知开IncomingCall活动,用户接受呼叫。 步骤3用户点击断开按钮完成IncomingCall活动。

Step 1- Application is not exist in recent app list (App has been removed from recent app list). Step 2- As soon as I got notification open IncomingCall activity, User accept the call. Step 3- User click on disconnect button finish the IncomingCall activity.

Problem-应用显示在最近的应用程序列表,即使应用程序是不是在最近的应用程序列表previously。

Problem- Application showing in recent app list even app was not in recent app list previously.

清单条目

<activity
android:name=".activities.IncomingCall"
android:excludeFromRecents="true"
android:launchMode="singleTop"
android:screenOrientation="portrait" >
</activity>

在活动使用

public void onClick(View v) {
switch (v.getId()) {
case R.id.onCallDisconnectButton:
phoneCallBaseClass.disconnect();
IncomingCall.this.finish();
break;
  }
}

和我也尝试过下面的链接,但是当应用程序在后台已经存在,将工作

And also I have tried below link but it will work when app already exist in background

Remove从最近的应用程序编程

或 是否有任何其他的方式来显示来电视图,以便它不会坚持历史。

OR Is there any other way to show incoming call view So that it will not persist in history.

您可以采取的任何VoIP电话应用的例子 -

you can take example of any VoIP calls app-

从最近的应用程序列表中删除应用程序后来电来了,用户断开呼叫活动(IncomingCallActivity)将不会存在于最近的应用程序列表。 但是,在我的情况下,坚持活动在最近的应用程序列表挂断电话后。

Remove app from recent app list after that incoming call came, user disconnect the call activity(IncomingCallActivity) would not be exist in recent app list. But in My case activity persist in recent app list after disconnecting the call.

感谢

推荐答案

一个星期后想感谢上帝,我得到了答案。 添加singleTask属性以及来自最近的排除。 它是在5.0的错误,现在已经在5.1解决

Thanks God, I got answer after wondering a week. Add singleTask attribute along with exclude from recent. It was a bug in 5.0 now has been resolved in 5.1

 <activity
        android:name="activityName"
        android:excludeFromRecents="true"
        android:launchMode="singleTask"
         >
 </activity>
 
精彩推荐
图片推荐