webapp和Android应用程序的常见存储

时间:2013-10-12 10:44:08

标签: android web-applications

背景: 我正在使用Jquery,HTML5和PHP开发webapp,我使用webview创建了Android Wrapper应用程序,将我的webapp链接为Android应用程序。

目标: 我想为包装器应用程序使用推送通知,以便我可以通知目标用户有关更新或新闻的信息。

问题: 我能够使用名为PARSE的第三方推送通知api获取电话的deviceid / registration id,但我想将该deviceid / registrationid链接到我的Web应用程序的登录用户。

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

问题: 1.无论如何我可以将deviceid / registrationid链接到用户登录吗? 2.是否有一个公共存储(如localstorage),我可以保存ID,然后webapp可以从那里抓取?

提前感谢您的帮助。

1 个答案:

答案 0 :(得分: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.

希望你能理解我想说的话......