Action_dial

KZero

Active Member
Licensed User
Longtime User
Hello,

I want to open the dialer preloaded with the phone number
is it possible to write like this code

B4X:
startActivity(new Intent(ACTION_DIAL, Uri.parse("tel:012345678")));

i didn't find ACTION_DIAL in the Intent properties and i don't wanna use ACTION_CALL because of the permission

B4X:
Dim i As Intent
    i.Initialize(i.[COLOR="Red"]ACTION_DIAL[/COLOR] , "tel:012345678" )
    StartActivity(i)

if its possible , there is anyway to open the SMS application preloaded with number and message ?

thanks in advance
 

KZero

Active Member
Licensed User
Longtime User
i found this code

sms
B4X:
    Dim in As Intent
    in.Initialize(in.ACTION_VIEW, "sms:0123456789")
    in.PutExtra("sms_body", "this is the body")
    StartActivity(in)

dial
B4X:
    Dim in As Intent
    in.Initialize(in.ACTION_VIEW, "tell:0123456789")
    StartActivity(in)
 
Last edited:
Upvote 0

Hakanunver

Member
Licensed User
You can try:

B4X:
Dim Intent AS Intent
Intent.Initialize("android.intent.action.DIAL",  "tel:123456789")
StartActivity(Intent)
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0
Top