1

I want to send some notification to user but I do not want to show standart items like settings button and other notifications to user. I mean I need an empty notfication bar. Is there any way to create an empty notification bar?

Blast
  • 955
  • 1
  • 17
  • 40
  • There isn't such a thing as a "notification bar" in Android. Technically it's the Status Bar where notifications are displayed. In answer to your question - no, you can't do this. Although it's possible to hide / remove the status bar when your Activities are running, any notification would still be available when the user leaves you Activities (and the status bar reappears) and the user wouldn't be able to access them before that. You'd have to create your own notification system within your app and hide the status bar while it was in use. – Squonk Aug 12 '14 at 12:50
  • Thank you for your advice but I do not know what is the best way to create my own notification system? Which android control should I use? Button? TextView? – Blast Aug 12 '14 at 13:37

3 Answers3

0

It's always helpfull to post the code you have so far. I know that if you do not supply an icon, that the notification will not show, UNLESS you flag it as "PRIORITY_LOW".

Here is a post with more info that might help you out!

Community
  • 1
  • 1
Chris
  • 3,329
  • 1
  • 30
  • 44
-1
   **JS**

function error(msg) {

$('<div/>').prependTo('body').addClass('notify-error').html(msg).slideDown();

}

function success(msg) {

$('<div/>').prependTo('body').addClass('notify-success').html(msg).slideDown();

}

$('#notify-error').click(function () {

    $(this).slideUp().empty();

});

$('#notify-success').click(function () {

    $(this).slideUp().empty();


});   

error('Error!');

success('Success!');

CSK
  • 777
  • 7
  • 17
-1

.CSS

.notify-success {

    position:relative;

    width:100%;

    background-color:green;

    height:30px;

    color:white;

    display:none;

    text-align:center;

    padding:5px;

    font-size:2em;

    line-height:1em;

    font-family: Arial, sans-serif;

    border:2px solid #666;

    cursor:pointer;
}

 .notify-error {
    position:relative;

    width:100%;

    background-color:red;

    height:30px;

    color:white;

    display:none;

    text-align:center;

    padding:5px;

    font-size:2em;

    line-height:1em;

    font-family: Arial, sans-serif;

    border:2px solid #666;

    cursor:pointer;
 }
Aman Singh
  • 370
  • 1
  • 9
CSK
  • 777
  • 7
  • 17