Hello folks,
I tried adding the FLAG_ACTIVITY_NEW_TASK and FLAG_FROM_BACKGROUND flags to the Phone call intent, as mentioned here:
It's not working and i'm getting no error message or hint. Code works fine when called while the Main activity is running.
Any ideas?
I tried adding the FLAG_ACTIVITY_NEW_TASK and FLAG_FROM_BACKGROUND flags to the Phone call intent, as mentioned here:
Android: Make phone call from service
I try to make a phone call from inside a service. The code I use is: Intent intent = new Intent(Intent.ACTION_CALL); intent.setData(Uri.parse("tel:" + number)); startActivity(intent); and it work...
stackoverflow.com
B4X:
Dim P As PhoneCalls
Dim In As Intent = P.Call(Param)
In.Flags = Bit.Or(268435456, 4) 'FLAG_ACTIVITY_NEW_TASK + FLAG_FROM_BACKGROUND
StartActivity(In)
Dim In As Intent
In.Initialize2("tel:" & Param, Bit.Or(268435456, 4))
In.Action = In.ACTION_CALL
In.Flags = Bit.Or(268435456, 4) 'FLAG_ACTIVITY_NEW_TASK + FLAG_FROM_BACKGROUND
StartActivity(In)
It's not working and i'm getting no error message or hint. Code works fine when called while the Main activity is running.
Any ideas?