How to send notification to registered users of sa

2019-02-20 03:43发布

问题:

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.

回答1:

You should use GCM for push notification. You can follow this tutorial for GCM push notification.



回答2:

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 cloud messaging

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

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. Parse SDK

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..

Parse SDK

3. If you own a server for notifying update refer this,

http://www.androidsnippets.com/check-for-updates-once-a-day

4. If you can put the updated changes in a text file and uploaded in Dropbox like online storage then refer this,

Android-WVersionManager

5. If you just wanted to check whether new version is available on google play use the following function (Note:- Dont forget to add Jsoup library)

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. For more information have a look into Apptentive & Turkcell SDK

Apptentive SDK

TurkcellUpdater