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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T06:07:14+00:00 2026-06-15T06:07:14+00:00

I download a file and send a notification to notification bar. When the user

  • 0

I download a file and send a notification to notification bar. When the user clicks it, the system will open the file. But sometimes, there’s no application for the downloaded file to open it, so I want to toast a message to user to tell them the file can not opened.

I want to know is there a broadcast sent by Android system to tell me that can not open the
file.

  • 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-15T06:07:15+00:00Added an answer on June 15, 2026 at 6:07 am

    As I see from your question, you want to toast a message when NotFoundActivityException occurs. So, you can do the code as follow :

    try {
        Intent intent = new Intent();
        intent.setAction(android.content.Intent.ACTION_VIEW);
        File file = new File(your_file_full_path); 
        intent.setDataAndType(Uri.fromFile(file), your_file_content_type);
        startActivity(intent);
    } catch (ActivityNotFoundException e) {
        Toast.makeText(activity_context, "Activity not found", Toast.LENGTH_SHORT).show();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a asp.net download page which send a file to client but I
I'm trying to send a file to the browser to download, and not having
i have a link <a id=DownloadLink href='controller/action' target=_blank>Download File</a> that has to open a
I created a file download script in PHP, it works, but web browsers report
I generate a set of letters in a file, but if there are errors
I have ASP.NET application which allows users to download a file when he/she enters
I send a mp3 file download url which was taken from database and mailed
In C# I've to write code for Docx file send from server application to
I want to download file to my server and automatically send it to online
Is it possible to force file download to user's browser (with the standard dialog

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.