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 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 understand how to use Protoype in standard Javascript with Node.js and modules, but
Right. I have an action that needs to call another activity. As I understand
I don't really understand the use and concept of an Intent. I DO understand
I want to understand the use of xargs man in Rampion's code : screen
I am learning Django and I am trying to understand the use of models.py
I'm trying to find some easy to understand and use tutorials for D3 that
I am new to java and learning interfaces. I did not understand the use
I understand how to use ClickOnce and deploy an application to a web site
I understand how to use REST for doing general entity interactions - using urls
I understand how to use stdin/stdout/stderr to interact with a user via the command

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.