mohammad be Member Sep 7, 2020 #1 Hello everyone When I want to open WhatsApp with intent, every time the user chooses the normal WhatsApp and business type, the solution is, should I save my choice and not ask the user again? Private i As Intent i.Initialize(i.ACTION_VIEW, $"https://api.whatsapp.com/send?phone=${Number}&text=${Url1}"$) i.SetComponent("android/com.android.internal.app.ResolverActivity") StartActivity(i)
Hello everyone When I want to open WhatsApp with intent, every time the user chooses the normal WhatsApp and business type, the solution is, should I save my choice and not ask the user again? Private i As Intent i.Initialize(i.ACTION_VIEW, $"https://api.whatsapp.com/send?phone=${Number}&text=${Url1}"$) i.SetComponent("android/com.android.internal.app.ResolverActivity") StartActivity(i)
Erel B4X founder Staff member Licensed User Longtime User Sep 7, 2020 #2 Please use [code]code here...[/code] tags when posting code. Remove this line: i.SetComponent("android/com.android.internal.app.ResolverActivity") Upvote 0
Please use [code]code here...[/code] tags when posting code. Remove this line: i.SetComponent("android/com.android.internal.app.ResolverActivity")
mohammad be Member Sep 8, 2020 #3 Erel said: Please use [code]code here...[/code] tags when posting code. Remove this line: i.SetComponent("android/com.android.internal.app.ResolverActivity") Click to expand... Thanks, but for the first time it does not ask which WhatsApp to use One beat enters WhatsApp Business while deleting the default settings on the phone for both WhatsApp Upvote 0
Erel said: Please use [code]code here...[/code] tags when posting code. Remove this line: i.SetComponent("android/com.android.internal.app.ResolverActivity") Click to expand... Thanks, but for the first time it does not ask which WhatsApp to use One beat enters WhatsApp Business while deleting the default settings on the phone for both WhatsApp
Erel B4X founder Staff member Licensed User Longtime User Sep 9, 2020 #4 You can use PackageManager.QueryIntentActivities to find the list of supported activities and call the one you want directly. Upvote 0
You can use PackageManager.QueryIntentActivities to find the list of supported activities and call the one you want directly.