2013-10-12 126 views
1

背景常见的存储: 我正在使用jQuery,HTML5和PHP web应用程序,我已经使用的WebView到我的web应用程序链接为Android应用程序创建的Android包装应用。为Web应用程序和Android应用

目的: 我想用推送通知,包装应用,这样我可以告诉目标用户有关的更新或新闻。

问题: 我能够使用名为PARSE的第三方推送通知API获取手机的deviceid /注册ID,但我想将该deviceid/registrationid链接到我的Web应用程序的登录用户。

我的想法是将deviceid/registrationid保存在android的通用存储中,当用户登录到我的webapp时,然后获取该公共存储的设备ID并保存在会话中以使用它来发送推送通知。

问题: 1.是否有反正我可以/ registrationid链接设备ID用户的登录? 2.是否有一个公共存储(如localstorage)可以保存id,然后webapp可以从那里抓取?

感谢您的帮助提前。

回答

0

根据我的理解,您希望通过身份验证用户身份访问您的后端数据库作为其设备的ID。

  If so then you can achieve it as " Initially when you are 
    calling push notification function and register device for 
    push notification service at that time you casn store that 
    device id in your local database also as user id. 


     So whenever user will start your application and 
    it will register device for push notification you just 
    need to check weather that device id is available or 
    not (As if user re install app) and insert in database. 

希望你能明白我想说....

+0

感谢您的答复。我的问题是,在注册用户后,在哪里存储registrationid/deviceid,以便我的webapp可以使用它。这是因为webapp可以被任何用户使用,并且我需要将登录用户与存储在android上的deviceid/registrationid映射。我的webapp可以访问android的本地数据库吗? – meh208

相关问题