How can NaCl use Google Cloud Messaging (gcm)?

24 views
Skip to first unread message

DevelopDaily

unread,
Aug 22, 2015, 11:29:30 PM8/22/15
to Native-Client-Discuss
Is it possible to implement a NaCl client to access gcm? Could you please offer some advice?

Right now, the gcm works for Android, iOS, and Chrome extensions and packaged apps (not hosted apps). 

If the gcm is possible for the Objective-C (the iOS), it should be possible for the C/C++ (the NaCl), shouldn't it? 

Well, Chrome does not allow hosted apps to access the gcm. If you try it, you will get this:

  • 'gcm' is only allowed for extensions and packaged apps, but this is a hosted app.

I hope Chrome would not do the same thing to a hosted NaCl app.

Victor Khimenko

unread,
Aug 23, 2015, 6:50:20 AM8/23/15
to Native Client Discuss
Chrome absolutely WOULD do the same to "NaCl app". Don't consider "NaCl app" a separate entity - because it's not. Instead consider "NaCl" as a permission to access the CPU (with threads!) and GPU in accelerated way. Any extension, hosted or packaged app could request it, but of course all other limitations stay the same.

In fact all external resources (access to the web sites, access to the files, and yes, access to gcm, too) are handled by the same code as for JavaScript thus NaCl and JavaScript have access to the same set of APIs. Well, that's the goal: in reality some APIs are available in JavaScript while they are not available in NaCl, these are bugs, we are working on fixing these. But additional permissions for access to some resources not available in JavaScript? Not planned.

Reply all
Reply to author
Forward
0 new messages