Android Question Dial a phone

kisoft

Well-Known Member
Licensed User
Longtime User
Hi

I'm using this solution:
B4X:
        Dim p As PhoneCalls
        StartActivity(p.Call("phonenumber"))
        End If
1. Question one :
Does Google allow the use of this method after obtaining your consent?

Is it better to use this method:
B4X:
    Dim i As Intent
       i.Initialize("android.intent.action.DIAL", "tel:" & "Phonenumber")
        StartActivity(i)

2. Question two:
If a phone call has already been established, I would like the dialer activity to be reduced so that the user can use the application normally.
How to do this....?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
1. Logs - List Permissions:



It is a "dangerous" permission which means that you need to request it at runtime.

Is it better to use this method:
It depends on your requirements. It doesn't need a permission however the call will not be made automatically.

2. You can use a timer in a service and call StartActivity. Note that starting from Android 10 you will need to request a special permission for this (draw over apps).
 
Upvote 0

kisoft

Well-Known Member
Licensed User
Longtime User
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…