简体   繁体   English

如何同时拨打多个电话

[英]How to make multiple phone calls at the same time

I have an application, where I'll be having between 10-100 minimum phone numbers on which i want to periodically (let's say once a week) make a missed call (about 20-40 seconds of ringing and then hanging up, using all numbers "at the same time"). 我有一个应用程序,在该应用程序中,我将有10-100个最低电话号码,我想定期(例如每周一次)拨打未接电话(约20-40秒的响铃时间,然后挂断,使用所有数字“同时”)。
I haven't tried any code yet but i already looked up how to make calls, missed calls etc. so I hope I know my way around this stuff a little bit. 我还没有尝试过任何代码,但是我已经查找了如何进行呼叫,未接来电等。因此,我希望我对这方面的知识有所了解。
Now you see if I'd do it by using simplest way, I'd have about one hour of my phone making these missed calls one after each other. 现在,您看看我是否可以使用最简单的方法来完成此操作,我将有大约一个小时的电话互相接听这些未接来电。
Is there a way to make these calls somehow overlap each other (make them all at the same time)? 有没有办法使这些调用以某种方式彼此重叠(同时使它们全部重叠)? Because I looked up that I can't make a phone call in background and since we are using activity to start a call, if I immediately start call after previous one, I suppose since it's an activity it's gonna pause. 因为我抬起头来无法在后台打个电话,并且由于我们正在使用活动来发起呼叫,所以如果我在上一个活动之后立即开始通话,我想因为这是一项活动,所以会暂停。

As far as I know, it's impossible to call different phone numbers simultaneously on Android and mobile operators do not let you do it either. 据我所知,在Android上无法同时拨打不同的电话号码,而且移动运营商也不允许您这样做。 If you really want to do it, you should use an API like Twilio to make all calls. 如果您确实想这样做,则应使用Twilio之类的API进行所有调用。 However, if you're using the API, your own phone numbers will be used for calls, not the mobile phone owner number. 但是,如果您使用的是API,则您将使用自己的电话号码而非手机所有者的号码进行通话。

And if you want to know how to do it all at once, this is what threads are invented for! 如果您想知道如何一次完成所有操作,这就是发明线程的目的! Assuming you have 100 phone numbers, use 100 threads to simultaneously call and hang them via API. 假设您有100个电话号码,请使用100个线程通过API同时调用和挂起它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM