jeudi 21 mai 2015

Phonecall in android ends automatically

I start a phonecall using the following code:

public static void startPhoneCall(String number){
    Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse(number));
    alarmActivity.startActivity(intent);
}

Strange things and some android magic seem to happen after this. Sometimes the call is made, and sometimes the call starts, but is terminated moments after. So the phone with number = number wont even receive the call.

I always use the same parameter for number, so the problem can't be there. Also, if I start the call "normally", it always works.

I have no idea where to search anymore, so any hint is very welcome!

Aucun commentaire:

Enregistrer un commentaire