Software Archive
Read-only legacy content
17061 Discussions

google cloud messaging

nicolas_r_
Beginner
545 Views

google cloud messaging ask for a registration id that is needed to send the push notifications i need to register that also in a DB im using PHP and ionic as framework how can i get that registration id and send to the database? also on emulator i can register users using the same php and can read users from db to device(emulated)  but on real device doesn't work i think i have to add some kind of white list but im sure which one pls help me whit that also.

​the next one is the code that i use to send users from device to DB and where in want to get the registration id and send to db.

 $('#inclusao').on('click', function(){

                        $id = $('#id').val(); 
                        $nome = $('#nome').val();
                        $sobrenome = $('#sobrenome').val(); 
                        $numero = $('#numero').val();  
                         
                        $.ajax({
                            type: "get",
                            url: $server+"/conecta.php",     
                            data: "id="+$id+"&nome="+$nome+"&sobrenome="+$sobrenome+"&numero="+$numero+"&acao=inclusao",
                            success: function(data) {
                            window.alert("Registrado ok");

                                Lista();
                            }
                        });
                    });

0 Kudos
7 Replies
Swati_S_Intel1
Employee
545 Views

Are you having issue on iOS device? Currently we are having issues with iOS build and the AJAX calls are not working. Build engineers are working on the fix. We will post when the issue is fixed. If it's not iOS device then make sure the whitelisting rules are properly set. 

0 Kudos
nicolas_r_
Beginner
545 Views

im just using android for now, i don't know what to put on the whitelist for that. 

0 Kudos
Swati_S_Intel1
Employee
545 Views

Please follow this article for specifying whitelisting rules. https://software.intel.com/en-us/articles/cordova-whitelisting-with-intel-xdk-for-ajax-and-launching-external-apps

0 Kudos
nicolas_r_
Beginner
545 Views

and how can i get the registration id? for the pushing notifications.

0 Kudos
nicolas_r_
Beginner
545 Views

google cloud message works on html 5 using intel xdk? all the guides that i saw are made whit android studio. 

0 Kudos
Swati_S_Intel1
Employee
545 Views

As far as I know google cloud messaging works with web apps. I haven't seen their cross platform implementation, i.e. for hybrid apps. 

You may want to use the pushwoosh plugin for push notification. It is in our featured plugins list.

Under the Plugins Management > Add Plugins > Featured plugins > Push Services.

0 Kudos
nicolas_r_
Beginner
545 Views

PushPlugin is working fine for intel xdk? u have used pushwoosh and make it works?

0 Kudos
Reply