andredamen Active Member Licensed User Longtime User Jun 10, 2021 #1 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?
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?
JohnC Expert Licensed User Longtime User Jun 10, 2021 #2 Is there any difference in the manifest between the two apps? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jun 11, 2021 #3 Read this: https://developer.android.com/training/package-visibility You can do something like (): Code: AddManifestText( <queries> <package android:name="com.whatsapp" /> </queries> ) Upvote 0
Read this: https://developer.android.com/training/package-visibility You can do something like (): Code: AddManifestText( <queries> <package android:name="com.whatsapp" /> </queries> )
andredamen Active Member Licensed User Longtime User Jun 11, 2021 #4 Thanks Erel and John. I add the< queries> to the manifest and I've got it working! Upvote 0
andredamen Active Member Licensed User Longtime User Jun 11, 2021 #5 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
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.
andredamen Active Member Licensed User Longtime User Jun 11, 2021 #6 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
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!