Head-up Notification in ionic 1


#1

please tell me if it is possible to implement Heads-up push notification in ionic v1.
Thanks in Advance…


#2

What is a “Head up notification”?


#3


#4

I will attach a image which clears you that i want…in my ionic app.


#5

`#1 and #2 are very Android specific with these buttons, I don’t know how exactly to achieve this. #3 is a normal “push notification”. Searching for “ionic push notification” should give you more than enough results.


#6

i already tried that plugin but it gives me notification like this…


#7

Then you have to look at the configuration options and payload options of push notifications to make it look the way you want it to look.


#8

can you please share some links or demo screenshots to me…it would be more helpful for me.


#9

Here is the code…which i tried But push notification always goes to background!!
please Give me a solution as i talk about earlier…

$rootScope.hitfordevicetoken=function(){

if((ionic.Platform.isIOS() || ionic.Platform.isAndroid())){
var push = PushNotification.init({

        android: {
            senderID: "XXXXXXXXX",
        },
        ios: {
            alert: "true",
            badge: "true",
            sound: "true"
        },
    });
   document.addEventListener("deviceready", function(){
    push.on('registration', function(data) {
        $localStorage.device_token = data.registrationId;
       
         })

    });
    push.on('notification', function(data) {
        $ionicLoading.show({
            template: data.title,
            noBackdrop: true,
            duration: 2000
        });
 

    });
    push.on('error', function(e) {
        console.info(e)
    });
}

}