【问题标题】:common storage for webapp and android appwebapp和android app的通用存储
【发布时间】:2013-10-12 10:44:07
【问题描述】:

背景: 我正在使用 Jquery、HTML5 和 PHP 开发一个 webapp,并且我已经使用 webview 创建了 Android Wrapper 应用程序,以将我的 webapp 链接为 android 应用程序。

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

问题: 我可以使用名为 PARSE 的第 3 方推送通知 api 获取电话的设备 ID/注册 ID,但我想将该设备 ID/注册 ID 链接到我的 Web 应用程序的登录用户。

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

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

提前感谢您的帮助。

【问题讨论】:

    标签: android web-applications


    【解决方案1】:

    据我了解,您希望通过用户身份验证作为其设备的 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.
    

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

    【讨论】:

    • 感谢您的回复。我的问题是,在注册用户后,在哪里存储registrationid/deviceid,以便我的webapp 可以使用它。这是因为任何用户都可以使用 webapp,我需要将登录用户与存储在 android 上的 deviceid/registrationid 进行映射。我的webapp可以访问android的本地数据库吗?
    猜你喜欢
    • 1970-01-01
    • 2012-06-30
    • 2019-05-30
    • 1970-01-01
    • 2011-12-06
    • 2011-09-07
    • 2021-12-31
    • 2019-09-02
    • 2015-05-24
    相关资源
    最近更新 更多