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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:34:24+00:00 2026-06-13T18:34:24+00:00

i want to generate a notification bar showing the progress via builder method but

  • 0

i want to generate a notification bar showing the progress via builder method but i dont know where i am going wrong.if anyone who can tell me where i am wrong and help me i will be thankful…..

public class DownloadReceiver extends ResultReceiver{
    private final static String TAG = "DownloadReceiver"; 
    public Context context;
    public DownloadReceiver(Handler handler,Context context) {
        super(handler);
        this.context = context;
        Log.d(TAG,handler.getLooper().getThread().getName());
    }

    @Override
    protected void onReceiveResult(int resultCode, Bundle resultData) {
        super.onReceiveResult(resultCode, resultData);
        Log.d(TAG,"in download receiver");

        NotificationManager notificationManager = (NotificationManager) context.getSystemService(Service.NOTIFICATION_SERVICE);
        Intent notifyIntent = new Intent(android.content.Intent.ACTION_VIEW,Uri.parse("http://www.android.com"));
        PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, notifyIntent, 0);

    if(resultCode == DownloadService.COMPLETED){
            Log.d(TAG,resultCode + "");
            Builder notificationBuilder = new NotificationCompat.Builder(context)
                                          .setProgress(100, 20, false)
                                          .addAction(R.drawable.ic_action_search, "title", pendingIntent)
                                          .setWhen(System.currentTimeMillis());
    //      notification.flags = Notification.FLAG_ONGOING_EVENT;
            //      notification.setLatestEventInfo(context, "contentTitle", "contentText", pendingIntent);
            notificationManager.notify(50, notificationBuilder.build());
        }else if(resultCode == DownloadService.ALLCOMPLETED){

        }
    }
}
  • 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-13T18:34:26+00:00Added an answer on June 13, 2026 at 6:34 pm

    I just had to deal with this just now, the solution for me was that you have to add a notification image

    .setSmallIcon(R.drawable.launcher)

    otherwise it won’t show anything. The old notification method didn’t require you to set this yourself, as it would default to the app’s icon.

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

Sidebar

Related Questions

I want to know that does apple's Push Notification Server generate new device token
I want to know how to generate local notification at the end of the
I am streaming a radio Stream. I want to generate a notification when the
I want to generate random integers between 0-9 (inclusive on both ends), but I
I want to generate a bar graph from from a csv file my data
I have the following code to open a window notification but I want the
I am going to create the notification and want to show it on the
Let's say I have a class of 30 students and want generate every possible
I want to generate a list of files where the name consists of ${filename}.${date}
I want to generate a random timestamp and add a random increment to it

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.