Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7908801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:06:05+00:00 2026-06-03T12:06:05+00:00

My app should be able to send the text in a TextView via WhatsApp,

  • 0

My app should be able to send the text in a TextView via WhatsApp, Email, SMS etc. For that i need a list of installed Messging Applications. I tried it with the PackageManger but i get all apps. How can i get only the Instant Messaging Apps?

This is my code to list the installed apps:

PackageManager packageManager=this.getPackageManager(); 
    List<PackageInfo> applist=packageManager.getInstalledPackages(0);
    Iterator<PackageInfo> it=applist.iterator();
    while(it.hasNext()){
    PackageInfo pk=(PackageInfo)it.next();
    if(PackageManager.PERMISSION_GRANTED==(packageManager.checkPermission(Manifest.permission.INTERNET, pk.packageName)& packageManager.checkPermission(Manifest.permission.RECEIVE_SMS, pk.packageName))) //checking if the package is having INTERNET permission
    {
    myList.add(""+pk.applicationInfo.loadLabel(packageManager));
    }
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T12:06:10+00:00Added an answer on June 3, 2026 at 12:06 pm

    Supposed you manage to get the list of the apps you want, then what are you going to do with them?
    I think that you need to let android to present a list of apps to your users for them to choose which application they want to handle the text, depending on the action performed. Fortunately this is a build in feature in Android. Here is my function for sending e-mails:

    public static void StartEmailIntent (Context cx, String EmailAddress){
        Intent email = new Intent(Intent.ACTION_SEND);
    
        email.setType("plain/text");
        email.putExtra(Intent.EXTRA_EMAIL, new String[]{EmailAddress});
    
        cx.startActivity(Intent.createChooser(email, cx.getString(R.string.dlg_sendmail_selectortitle)));
    }
    

    As you can see I am setting Intent.ACTION_SEND as the action and then with the Intent.createChooser android creates a list of applications capable to handle that action based on the type and the extras of the Intent. It shouldn’t be hard to adapt other actions like SMS, Phone calls etc. You can read more about it here Sending Content to Other Apps

    Hope this helps…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building an Open Graph App that should be able to publish, retrieve, and
Memory Issues So I am writing an app that should be able to page
I'm making an app for a custom Tarot deck that should be able to
I am writing an app in Python that must be able to send keys
I have some data (Student info), and my app should be able to read
During the use of my app, the user should be able to start, stop,
I am developing an iPhone-App that should run not only on new iphones, but
My web app needs to be able to send XMPP messages (Facebook Chat), and
I need to set up a server that will accept some text from my
I need to build Android application using Java which is able to send request

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.