Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以通过服务器而不是 Android 应用程序中的 http 调用为 GCM 注册 Android 设备?假设我有设备令牌和应用程序 ID。Python 代码示例/指向 Python 代码的链接将非常棒!
不可以。您必须从 GCMRegistrar 类中获取注册 ID。这取决于设备和应用程序安装。从理论上讲,您可能能够挖掘 GCMRegistrar 的源代码(如果有的话),并且您可能能够找到一种自己生成 id 的方法,但我对此表示怀疑。