Haiku Notifications on Android working

ihf

Active Member
I don't know if anyone else is interested in being able to receive Haiku Helper notifications on their Android phone but it is quite easy to do. There are probably multiple ways to get this working but I chose to use NotifyMyAndroid with the onNotification function in HH. If anyone needs the snippet of script code or more info, just let me know.
 
This will send any system notification to NMA (just replace XXX with your NMA apikey).
 
function onNotification(kind,message){
    
var req2 = new XMLHttpRequest();
req2.open("POST", "https://www.notifymyandroid.com/publicapi/notify");
req2.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
req2.send("apikey=XXX&application=HaikuHelper&event=" + message + '&description=' + message);
}
 
ihf said:
This will send any system notification to NMA (just replace XXX with your NMA apikey).
 
 

function onNotification(kind,message){
    
var req2 = new XMLHttpRequest();
req2.open("POST", "https://www.notifymyandroid.com/publicapi/notify");
req2.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
req2.send("apikey=XXX&application=HaikuHelper&event=" + message + '&description=' + message);
}
 
 
 You might want to use the "code" tags around that, otherwise the forum software auto-shortens the URL and you can't copy and paste it and expect it to work!
 
Back
Top