Closed rahulgupta2211985 closed 7 years ago
I compiled the ane for using it with Flash. When trying to use it, I am getting this error - "TypeError: Error #1009". Please if I can get some help, its kind of urgent.
My app-xml manifest section looks like this:
The as3 code is something like this:
try { var objPush:PushNotification=PushNotification.getInstance(); } catch(er:Error) { tt.appendText("\n" + er.getStackTrace()); }
objPush.registerForPushNotification("XXXXXXXXXX");
// Register for events objPush.addEventListener(PushNotificationEvent.PERMISSION_GIVEN_WITH_TOKEN_EVENT, onPushNotificationToken);
objPush.addEventListener(PushNotificationEvent.PERMISSION_REFUSED_EVENT, onPushNotificationTokenFailed);
// Handle events function onPushNotificationToken(e:PushNotificationEvent):void { tt.appendText("\nonPushNotificationToken"); tt.appendText("\nMy push token is: " + e.token); }
function onPushNotificationTokenFailed(e:PushNotificationEvent):void { tt.appendText("\nonPushNotificationTokenFailed"); tt.appendText("\n" + e.errorMessage); }
I compiled the ane for using it with Flash. When trying to use it, I am getting this error - "TypeError: Error #1009". Please if I can get some help, its kind of urgent.
My app-xml manifest section looks like this:
The as3 code is something like this:
try {
var objPush:PushNotification=PushNotification.getInstance(); } catch(er:Error) { tt.appendText("\n" + er.getStackTrace());
}
objPush.registerForPushNotification("XXXXXXXXXX");
// Register for events objPush.addEventListener(PushNotificationEvent.PERMISSION_GIVEN_WITH_TOKEN_EVENT, onPushNotificationToken);
objPush.addEventListener(PushNotificationEvent.PERMISSION_REFUSED_EVENT, onPushNotificationTokenFailed);
// Handle events function onPushNotificationToken(e:PushNotificationEvent):void { tt.appendText("\nonPushNotificationToken"); tt.appendText("\nMy push token is: " + e.token); }
function onPushNotificationTokenFailed(e:PushNotificationEvent):void { tt.appendText("\nonPushNotificationTokenFailed"); tt.appendText("\n" + e.errorMessage); }