如何在Android中向同一应用程序的注册用户发送通知 [英] How to send notification to registered users of same application in android

查看:102
本文介绍了如何在Android中向同一应用程序的注册用户发送通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我以管理员身份添加内容时,我都希望通知已下载应用程序的用户.

I want to notify the users who have downloaded application, whenever something added by me as a administrator.

每个下载该应用程序的用户都将注册.我掌握了有关用户的所有信息.

Each user downloaded the application will register. I have all the info about the users.

我想通知何时将某些内容添加到我的应用程序中(通常我添加的数据将存储在数据库中).

I want to notify when something added to my application ( Usually data i added will be stored in database).

请让我知道如何实现这一目标.

Please give me idea how to make this happen.

推荐答案

如果要向安装应用程序的用户发送消息,则必须具有服务器.您有以下选择,

If you wanted to send messages to the users who installed your application, you must have a server. You have the following options,

1. Google云消息传递

您可以通过GCM向您的用户发送推送通知,例如可以使用新更新".

You can send push notifications to your users Via GCM saying like "New update available" or something.

您可以将Google Appengine用于服务器,它是免费的.有一个用于GCM集成的开源项目 http://gcm4public.appspot.com/

You can use Google Appengine for server and it is free. There is an open source project for GCM integration http://gcm4public.appspot.com/

2.解析SDK

您可以使用Parse SDK进行推送通知&在线数据.如果您使用的是Parse SDK,则无需执行任何服务器端编码.您可以使用Parse进行社交媒体登录,注册,在线分数,数据,推送通知等.

You can use Parse SDK for Push notifications & Online data. You dont need to do any server side coding if you are using Parse SDK. You can use Parse for Social media login, Registration, Online score, data, Push notifications etc..

解析SDK

3.如果您拥有用于通知更新的服务器,请参考

http://www.androidsnippets.com/check-for-每天更新一次

4.如果您可以将更新后的更改放入文本文件中,然后像在线存储一样上传到Dropbox中,请参考

Android-WVersionManager

5.如果您只是想检查Google Play是否提供新版本,请使用以下功能(注意:-不要忘记添加Jsoup库)

private boolean isNewVersionReleasedONGooglePlay(){
    try {       
    String currentVersion = applicationContext.getPackageManager().getPackageInfo(package_name, 0).versionName; 
    String newVersion = currentVersion;
    newVersion = Jsoup.connect("https://play.google.com/store/apps/details?id=" + package_name + "&hl=en")
            .timeout(30000)
            .userAgent("Mozilla/5.0 (Windows; U; WindowsNT 5.1; en-US; rv1.8.1.6) Gecko/20070725 Firefox/2.0.0.6")
            .referrer("http://www.google.com")
            .get()
            .select("div[itemprop=softwareVersion]")
            .first()
            .ownText();
    return (value(currentVersion) < value(newVersion)) ? true : false;
    } catch (Exception e) {
    e.printStackTrace();
    return false;
    }
}

6.有关更多信息,请参阅Apptentive& Turkcell SDK

Apptentive SDK

TurkcellUpdater

这篇关于如何在Android中向同一应用程序的注册用户发送通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆