我需要一个使用switchcase的方法中的多个电话呼叫的答案 [英] i need a answer for a multiple phone calls in a method using switchcase
本文介绍了我需要一个使用switchcase的方法中的多个电话呼叫的答案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.numberactivity);
//int j=0;
makeCall(NumberActivity.this);
}
// TODO Auto-generated method stub
public void makeCall(Context context){
Intent phonecallIntent=new Intent(Intent.ACTION_CALL);
phonecallIntent.setData(Uri.parse("tel:"+""));
phonecallIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
phonecallIntent.addFlags(Intent.FLAG_FROM_BACKGROUND);
context.startActivity(phonecallIntent);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.emergency, menu);
return true;
}
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
switch (v.getId()) {
case R.id.imageButton1 :
makeCall();
break;
default:
break;
}
}
推荐答案
这是不可能的。
请参阅我过去的答案此处 [ ^ 一>]。 :)
-KR
It's impossible.
See my past answer here[^]. :)
-KR
这篇关于我需要一个使用switchcase的方法中的多个电话呼叫的答案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文