Android 如何将上下文参数与acceptCall函数一起使用?

Android 如何将上下文参数与acceptCall函数一起使用?,android,Android,我试图向类中添加一些函数,以便打开传入调用,但在传递参数“Context”时出现了一个问题 要么不放上下文 acceptCall(ctx); 还是投下它 acceptCall((Context) ctx); 这是无效的语法 acceptCall(Context ctx); 不能将变量类型放在参数旁边。。。。 acceptCall(Context ctx);

我试图向类中添加一些函数,以便打开传入调用,但在传递参数“Context”时出现了一个问题


要么不放
上下文

acceptCall(ctx);
还是投下它

acceptCall((Context) ctx);

这是无效的语法

acceptCall(Context ctx);

不能将变量类型放在参数旁边。。。。
acceptCall(Context ctx);