Android Question PackageManager don't find Whatsapp

andredamen

Active Member
Licensed User
Longtime User
I have a strange thing while using the following:

Code:
    Dim Intent2 As Intent
    Dim pm As PackageManager
    Intent2 = pm.GetApplicationIntent("com.whatsapp")
    If Intent2.IsInitialized Then
        ToastMessageShow("WhatsApp Installed",True)
    Else
        ToastMessageShow("WhatsApp NOT Installed",True)
    End If

When I make a timy app with only this code the PackageManager detect Whatsapp on my phone. This is good.

When I us the same code in one of my bigger apps the PackageManager DON'T detect Whatsapp on my (the same) phone.

What is happening here? Does someone has the answer?
 
Is there any difference in the manifest between the two apps?
 
Upvote 0
I still have to answer the question from John: the only difference in the two apps is that the app where the Intent DON'T work is that in the Manifest of that app I have added the permisson PERMISSION_CALL_PHONE.
 
Upvote 0
The phone has indeed Android 11. On a older phone, wirh Android 6, then Intent did find Whatsapp in the good way.

Thanks, thanks, thanks!
 
Upvote 0
Back
Top