mCall.setOnTouchListener(new View.OnTouchListener() {
// @Override
/* public boolean onTouch(View v, MotionEvent event) {
return false;
}*/
@Override
public boolean onTouch(View v, MotionEvent event) {
int eventaction = event.getAction();
switch (eventaction) {
case MotionEvent.ACTION_DOWN:
int didx = LinphonePreferences.instance().getDefaultAccountIndex();//added
//if( didx == 1 )
LinphonePreferences.instance().setDefaultAccount(0);//added
dindex = 0 ;
//mCall0 = null;
// m1=MediaPlayer.create(MainActivity.this, R.raw.be);
// m1.start();
// m1.setLooping(true);
return false;
case MotionEvent.ACTION_UP:
//m1.stop();
//m1.release();
//break;
}
// tell the system that we handled the event but a further processing is required
return false;
}
});
mCall0.setOnTouchListener(new View.OnTouchListener() {
// @Override
/* public boolean onTouch(View v, MotionEvent event) {
return false;
}*/
@Override
public boolean onTouch(View v, MotionEvent event) {
int eventaction = event.getAction();
switch (eventaction) {
case MotionEvent.ACTION_DOWN:
int didx = LinphonePreferences.instance().getDefaultAccountIndex();//added
//if( didx == 0 )
LinphonePreferences.instance().setDefaultAccount(1);//added
didx = LinphonePreferences.instance().getDefaultAccountIndex();//added
if( didx == 1 ) dindex = 1 ;
//mCall = null ;
// m1=MediaPlayer.create(MainActivity.this, R.raw.be);
// m1.start();
// m1.setLooping(true);
return false;
case MotionEvent.ACTION_UP:
//m1.stop();
//m1.release();
//break;
}
// tell the system that we handled the event but a further processing is required
return false;
}
});