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

  • Home
  • SEARCH
  • 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 8972663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:16:10+00:00 2026-06-15T18:16:10+00:00

Since Jelly Bean it is possible to set a priority to notifications. This way

  • 0

Since Jelly Bean it is possible to set a priority to notifications. This way you can even set PRIORITY_MIN which will hide the notification icon on status bar.
I read about it and it is very simple, you just have to use this:

MyNotification.setPriority(Notification.PRIORITY_MIN);

My problem es that I get the compile error:
“The method setPriority (int) is undefined for the type Notification”

My application has to run in different versions of Android, so, I understand that function is not available under JellyBean, so is there a way to include compiler tags or something similar to add that functionality depending on the Android release.
I hope you understand what I mean.

  • 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-15T18:16:11+00:00Added an answer on June 15, 2026 at 6:16 pm

    Android will handle this automagically. No need for additional markup for specific version numbers. When it comes to your compile error, I’ve had luck with something like my code below. You want to make sure to use NotificationCompat and make sure you import android.support.v4.app.NotificationCompat; as well.

    This code should work:

    int pri = 0;
    NotificationCompat.Builder MyNotification = new NotificationCompat.Builder(ctx);
    MyNotification.setPriority(pri);
    

    enter image description here


    enter image description here

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

Sidebar

Related Questions

Since Android Jelly Bean doesn't support the logs reading permission (according to this google
Ever since my Asus Transformer tablet was upgraded to Jelly Bean, I find that
Since multiple requests can slow down the speed at which a site loads, I
Since I started this new webshop for a friend to launch, which still in
Since regular jQuery animations are not fluent on iOS ( .hide() , slideDown() ),
Since now I have only used plugin for editing and the way I use
Since I have no errors I don't know if this is the right place
Since each thread has its own stack, its private data can be put on
Since yesterday I am looking for a way to save (mysql + php) dragged
since they have same rendering engine, this problem shows in both. it works great

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.