Google Cloud Messaging on Google Glass

馋奶兔 提交于 2019-12-23 03:18:10

问题


Has anyone attempted Google Cloud Messaging from Google Glass?? I am guessing there may be an issue with Google Play services, but I have not looked deep into it yet and wanted to see if anyone had tried.


回答1:


You can get GCM working (just tested) using the old deprecated way with gcm.jar from the android sdk. See http://androidmyway.wordpress.com/2012/07/09/gcm-demo/




回答2:


As people report, there are no Play Services on Glass: issue on google-glass-api tracker. This means you can't use neither GCM, nor Maps API etc.

What is strange though, if you decompile GlassHome.apk, you can see in AndroidManifest.xml:

<permission android:name="com.google.glass.home.permission.C2D_MESSAGE" android:protectionLevel="signature" />

...

<receiver android:name="com.google.android.gcm.GCMBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND">
    <intent-filter>
        <action android:name="com.google.android.c2dm.intent.RECEIVE" />
        <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
        <category android:name="com.google.glass.home" />
    </intent-filter>
</receiver>

So, it seems like they've got one.

I digged deeper and found, that inside GlassHome.apk they do have com.google.android.gcm package. So, it seems like, they integrated valuable Play Services parts into GlassHome.apk, but they didn't put that API part into the system.

Glass is in the testing stage, so this situation can change in the near future...



来源:https://stackoverflow.com/questions/18519469/google-cloud-messaging-on-google-glass

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!