Android Question open phone app from widget

ivanomonti

Well-Known Member
Licensed User
Erel forgive my ignorance, I should also open the module contacts, calendar and web but I view with errors by using the contact, calendar and web ... I will give more help.
 

ivanomonti

Well-Known Member
Licensed User
ok code for tel + gmail + calendar + web (crome) no contact :-(

B4X:
Sub ImageView01_Click
    Dim i As Intent
    i.Initialize(i.ACTION_VIEW, "tel:")
    StartActivity(i)
    ToastMessageShow("Phone", True)
End Sub
 
Sub ImageView02_Click
    Dim pm As PackageManager
    Dim i As Intent
    i = pm.GetApplicationIntent("com.google.android.gm")
    StartActivity(i)
    ToastMessageShow("GMail", True)
End Sub
 
Sub ImageView03_Click
    Dim pm As PackageManager
    Dim i As Intent
    i = pm.GetApplicationIntent("com.android.calendar")
    StartActivity(i)
    ToastMessageShow("Calendar", True)
End Sub
 
Sub ImageView04_Click
    Dim pm As PackageManager
    Dim i As Intent
    i = pm.GetApplicationIntent("com.android.chrome")
    StartActivity(i)
    ToastMessageShow("Web", True)
End Sub
 

NJDude

Expert
Licensed User
If you want to open the CONTACTS you have to do this:
B4X:
Dim i As Intent
i.Initialize(i.ACTION_VIEW, "content://contacts/people/")
StartActivity(i)
 
Last edited:
Top