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

  • Home
  • SEARCH
  • 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 815635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:42:57+00:00 2026-05-15T01:42:57+00:00

I understand how to use intents and startActivity() when opening another activity within my

  • 0

I understand how to use intents and startActivity() when opening another activity within my own app, but how do you start a different app? specifically:

  • How do you determine if the user has the needed app installed on their device?
  • How do you start that app?
  • How do you pass parameters to that app?
  • How do you find all this info out for a specific app (say Adobe reader, or google maps)?
  • 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-05-15T01:42:58+00:00Added an answer on May 15, 2026 at 1:42 am

    How to see if Intent is available:

    1. Try calling Intent and deal with ActivityNotFoundException if it isn’t available

      Intent intent = new Intent(Intent.ACTION_VIEW);
      intent.setDataAndType(path, "application/pdf");
      intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
      
      try {
          startActivity(intent);
      } 
      catch (ActivityNotFoundException e) {
          Toast.makeText(OpenPdf.this, 
              "No Application Available to View PDF", 
              Toast.LENGTH_SHORT).show();
      }
      

      or

    2. Query the Package Manager to see if it is ahead of time:

      PackageManager packageManager = getPackageManager();
      Intent intent = new Intent(Intent.ACTION_VIEW);
      intent.setType("application/pdf");
      
      List list = packageManager.queryIntentActivities(intent,
          PackageManager.MATCH_DEFAULT_ONLY);
      
      if (list.size() > 0) {
          intent.setDataAndType(path, "application/pdf");
          startActivity(intent);
      }
      

    How to pass parameters to an application or know its capabilities:

    1. List of Available Intents for Google Applications
    2. List of Intents by 3rd parties @ OpenIntents
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can understand the use for one level of namespaces. But 3 levels of
I understand that I need to use LoadLibrary(). But what other steps do I
I can understand wanting to avoid having to use a cursor due to the
In general I'd like to understand which templates to use when, when I'm making
How secure is it to use self-signed certificates? As far as I understand it,
Which algorithm does the JavaScript Array#sort() function use? I understand that it can take
I have a service that I am rewriting to use threading. I understand that
I am completely new to LINQ in C#/.NET. I understand that I could use
I'm a novice Android programmer, and to help me understand how Intents really work,
I don't really understand the use and concept of an Intent. I DO understand

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.