skip to Main Content

Android Studio – How to open both WhatsApp and GB-Whatsapp using an Intent in your Android App

I want to open chooser for both whatsapp and gb-whatsapp so the user can choose any of one from them. This code is only opening whatsapp only. Intent intentWhatsapp = new Intent(Intent.ACTION_VIEW); String url = "https://chat.whatsapp.com/JPJSkaiqmDu5gLKqUPAfMM"; intentWhatsapp.setData(Uri.parse(url)); intentWhatsapp.setPackage("com.whatsapp"); startActivity(intentWhatsapp);

VIEW QUESTION
Back To Top
Search