Android - Intent ACTION_CALL没有通话记录

问题描述:

我想从我的Activity中调用通话动作,但在通话动作完成后,我的应用会停留在通话记录屏幕上。为了避免这种情况下,我决定我的意图,从活动PhoneStateListener,我不喜欢这样写道:Android - Intent ACTION_CALL没有通话记录

Intent intent = new Intent(MainActivity.this, MainActivity.class); 
intent.setFlag(...); 
startActivity(intent); 

我试过标志的许多组合,而且只会导致我得到了我的活动并不在活动的前堆栈或我得到我的活动的新实例。 如何在活动堆栈的前端获得我的活动(同一实例)。

请在您的Activity的launchMode属性中阅读,这些属性可以在AndroidManifest中设置。 http://developer.android.com/guide/topics/manifest/activity-element.html#lmode

我相信你要找的是singleInstance。

+0

我用singleTop。作品:) – 2011-06-05 19:09:35

+0

伟大我知道除标准默认以外的其他选项之一会更好。如果有帮助请接受答案。 – Maximus 2011-06-05 19:29:13

How to Invoke/Start an application when a call is ended?

请参阅此你可以找到答案! 在那里改变包装中的答案!