【问题标题】:Create a Customize screen for incoming and outgoing call screen in Android / iphone and blackberry在 Android / iphone 和 blackberry 中为来电和去电屏幕创建自定义屏幕
【发布时间】:2014-10-31 01:08:24
【问题描述】:

我搜索了很多问题,但没有找到任何令人满意的答案。我想要的是在接到电话时显示一个自定义屏幕,当我们打电话给某人时,它应该显示一个自定义屏幕,而不是像 true 那样的默认屏幕-调用者应用程序。如果有人可以提供相同的示例,我将不胜感激。

提前致谢。

【问题讨论】:

    标签: android ios blackberry screen


    【解决方案1】:

    对于拨出电话:我做了以下解决方法,它工作正常。我创建了一个具有清单中所需的所有权限的传出接收器..

    使用处理程序在延迟后调用 Activity。

    像这样:

    @Override
    public void onReceive(Context context, Intent intent) 
    {
        c = context;
        setResultData(null);
        phonenumber = getResultData();
        if (phonenumber == null)
        {
            phonenumber = intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER);
        }
        setResultData(phonenumber);
        callActionHandler.postDelayed(runRingingActivity, 1000);
    }
    
    
    Handler callActionHandler = new Handler();
    Runnable runRingingActivity = new Runnable() 
    {
        @Override
        public void run() 
        {
    
            Intent intentPhoneCall = new Intent(c, OutgoingCallActivity.class);
            intentPhoneCall.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
            intentPhoneCall.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            c.startActivity(intentPhoneCall);
        }
    };
    

    您可以使用电话号码将其发送到新活动。

    src

    【讨论】:

    • 嗨,例如,谢谢,但我想要的是 truecaller,当我们有来电时,如果没有我想通过应用程序自定义未使用部分的人的图像,它会显示一个空白区域,该应用程序将显示列表视图形式的一些消息。
    • 以及 OutgointCallActivity.class 中必须写的内容
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-01-04
    相关资源
    最近更新 更多