I'm having trouble getting the onesignal device id.
I'm trying to use the following method:
var getId = function(){
window.plugins.OneSignal.getIds(function(ids) {
alert('getIds: ' + JSON.stringify(ids));
});
}
Before that I'm starting the onesginal and are receiving notifications normally.
window.plugins.OneSignal
.startInit("APP_ID")
.handleNotificationOpened(notificationOpenedCallback)
.endInit();
On the console is giving this error:
Refused to execute inline event handler because it violates the following Content Security Policy directive: "default-src 'self' data: gap: link 'unsafe-eval' ". Either the 'unsafe-inline' keyword, the hash ('sha256 -...'), or a nonce ('nonce -...') is required to enable inline execution. Note also that 'script-src' was not explicitly set, so 'default-src' is used as a fallback.