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 8626915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:08:45+00:00 2026-06-12T08:08:45+00:00

My app has a button that leads (should lead, to be precise :) )

  • 0

My app has a button that leads (should lead, to be precise 🙂 ) to another application’s page in the GooglePlay. The button’s click reaction is as follows:

public void pressedPurchaseButton(View view)
{
    Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=com.infmanrb.multrainer"));
    startActivity(browserIntent);
}        

However, in emulator, button pressing causes an exception:

Caused by: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=market://details?id=com.infmanrb.multrainer }

I guess GooglePlay is not installed on Emulator – and that’s the reason. But anyway, what is the correct way to avoid application crashing? Can I check in advance whether the Intent will be handled? Or the only way is to try-catch an exception?

  • 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-12T08:08:46+00:00Added an answer on June 12, 2026 at 8:08 am

    Use a utility method like this :

    public static boolean isIntentHandleable(Context context, String action) {
        final PackageManager manager = context.getPackageManager();
        final Intent intent = new Intent(action);
        List<ResolveInfo> list =
            manager.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);
        return list.size() > 0;
    }
    

    Pass the intent that you want as action and ofcourse the context reference. If this returns false, this action cannot be handled.

    Check this link as well : Check if intent uri is available

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

Sidebar

Related Questions

The app we're building has a simple button that starts a facetime session with
I have a page X in my grails app which has a button to
I have a View-based app. The first view that is loaded has a button
My free app (which is not on the market yet) has a button that
I have an iphone app that has a root view with a button that
So I'm making an android app that has more than 100 buttons,but you know
I have made an iPhone App which has a loginwithFacebook button , the login
I have a small data collection app which has a single button to start
I want to design simple app widget which has two textview and two button
My app has several buttons which trigger different events. The user should NOT be

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.