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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:01:28+00:00 2026-06-05T23:01:28+00:00

Solution: API 11 is needed see answer below! Easy Question: After downloading a File

  • 0

Solution: API 11 is needed see answer below!

Easy Question: After downloading a File with the implemented DownloadManager the Notification disappears. How do I force the Notification to stay after Download?

I tried to use VISIBILITY_VISIBLE_NOTIFY_COMPLETED, but i do not know how i can use it

Thank for any kind of help to solve this problem 😉

EDIT: Code

public class BgDL extends Activity {

private DownloadManager mgr = null;
private long id;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    //setContentView(R.layout.main);

    mgr = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);

    Request request = new Request(Uri.parse(getIntent().getStringExtra("URL")));

    id = mgr.enqueue(request
            .setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, "UPDATE")
            .setAllowedNetworkTypes(DownloadManager.Request.NETWORK_WIFI|DownloadManager.Request.NETWORK_MOBILE)
            .setAllowedOverRoaming(false)
            .setTitle("APP update")
            .setDescription("New version "+getIntent().getDoubleExtra("OV", 0.0))


    );

   registerReceiver(receiver, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));

}
BroadcastReceiver receiver = new BroadcastReceiver () {


      public void onReceive(Context context, Intent intent) {
        String action = intent.getAction();
        if (action.equals(mgr.ACTION_DOWNLOAD_COMPLETE) ){
            unregisterReceiver(receiver);
            finishActivity(99);
        }
      }


}; 

}

  • 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-05T23:01:30+00:00Added an answer on June 5, 2026 at 11:01 pm

    Add the correct flag to your request:

    Request request = new Request(Uri.parse(getIntent().getStringExtra("URL")));
    
    request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
    

    Reference:

    http://developer.android.com/reference/android/app/DownloadManager.Request.html#setNotificationVisibility(int)

    Control whether a system notification is posted by the download manager while this download is running or when it is completed. If enabled, the download manager posts notifications about downloads through the system NotificationManager. By default, a notification is shown only when the download is in progress.

    http://developer.android.com/reference/android/app/DownloadManager.Request.html#VISIBILITY_VISIBLE_NOTIFY_COMPLETED

    This download is visible and shows in the notifications while in progress and after completion.

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

Sidebar

Related Questions

Are there any API/solution to generate PDF report from XML file data and definition.
I am developing an custom API for a web solution and I am using
I built a console application and built the solution, taking over the API to
I hope I'm overthinking this and there's an obvious solution. From the API (GET
I am evaluating MongoDB as a storage solution for our financial/accounting RESTful API. I
While developing this solution, I learned that API V2 was being deprecated. I've since
I have ACH Java API solution made with Authorize.NET via their eCheck.NET service. BUT
Does anyone know of a good in-browser chat API and/or completed solution? I'd be
I am developing a solution in .Net utilising the VMWare Web Service API to
Is there any embedded persistence solution shipped with Camel API? I want to save

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.