我正在使用 Xamarin 为 Android 构建呼叫转移或呼叫转移应用程序。我在网上找到了这段代码,我认为它是负责呼叫转移操作的代码:
String callForwardString = "**21*1234567890#";
Intent intentCallForward = new Intent(Intent.ActionDial); // ACTION_CALL
Uri uri2 = Uri.fromParts("tel", callForwardString, "#");
intentCallForward.SetData(uri2);
startActivity(intentCallForward);
所以我有几个问题:
此代码是否是呼叫转移操作所需的正确代码?我希望有一个资源来解释这段代码中的每个函数和行的作用。
因为它是特定于 android 的代码,所以我觉得我必须将它放在我的 Xamarin 解决方案的 android 项目中。我说得对吗?
提前致谢!