Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try
- {
- Core.init();
- Parse.init( APP_KEY );
- trace( "Parse Supported: " + Parse.isSupported );
- trace( "Parse Version: " + Parse.service.version );
- if (Parse.isSupported)
- {
- Parse.service.addEventListener( ParseEvent.NOTIFICATION, parse_notificationHandler );
- Parse.service.addEventListener( ParseEvent.REGISTER_SUCCESS, parse_registerHandler );
- Parse.service.addEventListener( ParseEvent.ERROR, parse_errorHandler );
- //
- // The important setup call with your APPLICATION ID and CLIENT KEY from Parse
- Parse.service.setupApplication( "PARSE_APPLICATION_ID", "PARSE_CLIENT_KEY" );
- }
- }
- catch (e:Error)
- {
- trace( "ERROR:" + e.message );
- }
- ...
- private function parse_registerHandler( event:ParseEvent ):void
- {
- // Your application is now setup and registered for push notifications
- }
- private function parse_errorHandler( event:ParseEvent ):void
- {
- trace( "ERROR:: " + event.data );
- }
- private function parse_notificationHandler( event:ParseEvent ):void
- {
- trace("Remote notification received! :: " + event.type );
- trace( event.data );
- }
- // com.distriqt.Parse
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement