Bonjour,

je développe une application mobile sous AIR et je n'arrive pas faire fonctionner les notifications push

j'utilise l'extension native Asterisk

pour initialiser les notifs :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
 
 
trace("\n\nInitializing GCMPushInterface...");
 
			//create instance of extension interface and add appropriate listeners to it
			_gcmi = new GCMPushInterface();
			_gcmi.addEventListener(GCMEvent.REGISTERED, handleRegistered, false, 0, true);
			_gcmi.addEventListener(GCMEvent.UNREGISTERED, handleUnregistered, false, 0, true);
			_gcmi.addEventListener(GCMEvent.MESSAGE, handleMessage, false, 0, true);
			_gcmi.addEventListener(GCMEvent.ERROR, handleError, false, 0, true);
			_gcmi.addEventListener(GCMEvent.RECOVERABLE_ERROR, handleError, false, 0, true);
 
			register();
 
private function register():void
		{
			trace("\n\nRegistering device with GCM...");
 
			//check if device is already registered otherwise start registration process and wait for REGISTERED event
			var response:String = _gcmi.register(GCM_SENDER_ID);
			trace(response);
 
			if(response.indexOf("registrationID:") != -1)
			{
				trace("\n\nDevice was already registered.\n" + response);
				this.dispatchEvent(new GenericEvents(GenericEventsType.NOTIF,["\n\nDevice was already registered.\n" + response + "\n"]));
				//extract GCM registration id for your device from response, you will need that to send messages to the device
				//create your own backend service or use public services
				_gcmDeviceID = response.substr(response.indexOf(":") + 1);
				handleRegistrationIDReceived();
				//if device was already registered check if there is any pending payload from GCM
				//this can be true when android shut down your app and its restarted instead of being resumed
				checkPendingFromLaunchPayload();
			}
		}
ici ma response est toujours egale à null, je ne recupere donc jamais de token
quelqu'un peut t'il m'aider ?

Merci d'avance pour votre aide