Android Question Call phone number ?

Devv

Active Member
Licensed User
Longtime User
How can i dail a phone number directly (not viewing the phone app)
i need to call a phone number without the help of the user
 

DonManfred

Expert
Licensed User
Longtime User
B4X:
    Dim p As PhoneCalls
    StartActivity(p.Call("+49-12345-6789012"))
not viewing the phone app
you need... The call app is what is doing the call... You just can start it with the right number to dial... After this call the phoneapp will directly call this number. No need for help from user
 
Upvote 0

Devv

Active Member
Licensed User
Longtime User
B4X:
    Dim p As PhoneCalls
    StartActivity(p.Call("+49-12345-6789012"))

you need... The call app is what is doing the call... You just can start it with the right number to dial... After this call the phoneapp will directly call this number. No need for help from user

this
Dim p AsPhoneCallsStartActivity(p.Call("+49-12345-6789012"))

is working but when having more than one call app (viber , vovox) in addition to the android phone app, it will ask the user to select one
is it possible to make b4a call a number only with he stock android phone app without asking the user for his option ?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
This is how Android works. Why not let the user choose which app to use? The user can select to always use this app.

If the default dialer has the same package name on all devices then you can use Intent.SetComponent to limit the intent to the default dialer. I do not know whether this is the case or not.
 
Upvote 0
Top