Android Question Open PhoneDialer without calling it

Hi to all!
I want to open phone dialer but without calling the phone number with this code i found on this forum:

B4X:
Sub DialNumber(PhoneNum As String)
    Dim PC As PhoneCalls
    Dim RP As RuntimePermissions
    Dim CallReason As String = "In order for this program to dial phone numbers, your permission is required. The next screen will ask for that permission. If you deny permission, then this program can not dial phone numbers for you"   
 
    If RP.Check(RP.PERMISSION_CALL_PHONE) = False Then        'if no existing phone call permission
        MsgboxAsync(CallReason,"Call Permission")        'explain why this apps needs call permission
        Wait For MsgBox_Result (Result As Int)

        RP.CheckAndRequest(RP.PERMISSION_CALL_PHONE)        'prompt for permission
        Wait For Activity_PermissionResult (Permission As String, AskResult As Boolean)
        If AskResult = False Then    'user did not give permission
            Return    'abort dial
        End If
    End If

    StartActivity(PC.Call(PhoneNum))     'dial number
 
End Sub

The StartActivity immediately calls the phone numer, and I just want to give the user possibility to press the call icon. Is this possible?
 
Tnx for the tip!
It works just fine. But when I pass to the dialer app some number which is in my phonebook the name of contact is not displayed. Then, if I delete last digit and enter this digit again then the contact name is displayed properly. Is this related to the phone dialer app or is general?
I use Nothing Phone 2 and its dialer app (i think it is stock android app).
 
Upvote 0
Top