呼叫从第二张SIMSIM

由网友(默视 · 你的侧脸)分享简介:我有一个双卡Android手机。我用这code拨打电话:I have a dual sim android phone. I am using this code to make a call:private void callBack(String phone, Context context) {Intent...

我有一个双卡Android手机。我用这code拨打电话:

I have a dual sim android phone. I am using this code to make a call:

private void callBack(String phone, Context context) {
        Intent callIntent = new Intent(Intent.ACTION_CALL)
                .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        callIntent.setData(Uri.parse("tel:" + phone));
        context.startActivity(callIntent);

    }

它的正常工作。但它总是让从SIM1通话(preferable SIM)。我如何从SIM2电话?有没有一种方法来处理双卡手机?

It's working fine. But it always makes call from sim1(preferable sim). How do I make calls from Sim2? Is there a way to handle dual sim phones?

推荐答案

这似乎工作在一个大范围的双卡设备的摩托罗拉,福邦,宏达电,三星电子

This seems to work on a large range of dual sim devices as Motorola, Micromax, HTC, Samsung

intent.putExtra("com.android.phone.extra.slot", 0); //For sim 1

intent.putExtra("com.android.phone.extra.slot", 1); //For sim 2

如果不行试试这个,在三星小号二重奏这工作得很好。

and if doesn't work try this, In Samsung S duos this works just fine.

intent.putExtra("simSlot", 0); //For sim 1

intent.putExtra("simSlot", 1); //For sim 2

不幸的是,这些事情,我们必须进入命中/试用模式,因为没有正式的文件是有双SIM卡的支持。

unfortunately for these things we have to get into hit/trial mode as no official documentation is there for dual-sim support.

阅读全文

相关推荐

最新文章