Push Notifications: how to implement an Android App using GCM and ADM? - android

At the moment I have an android app on the Play Store and on the Amazon Store.
I need to implement push notifications and I need to use Amazon Simple Notification Service.
I've already implemented the Android part and it's all ok, but when I run the app on an amazon device push notification system doesn't work. I've discovered that GCM is not supported by Amazon devices. (nice..)
So, I guess that what I need to do is that my android app utilizes GCM if running on an Android Device and ADM if running on an amazon device.
Is it possible to do that with a single application? Is there anybody who did this in the past? I can't find a lot on the internet regarding this topic
Thank you very much for helping me

Yes using GCM on Android and ADM on Amazon devices is the correct way to go. For using ADM with SNS, this guide will probably help http://docs.aws.amazon.com/sns/latest/dg/mobile-push-adm.html
As far as using a single application, it looks like others have asked this and it's not the best approach but it seems like it can work. Checkout
Is it possible to reliably detect at runtime which store installed an Android App (Google Play or Amazon Market)?
Detect app is running on Kindle Fire
Hope this helps

Related

Push Notifications for different platforms and devices in China

I read a lot of articles about how to implement Push Notifications with Cordova (and Ionic 2) and I'm not sure how to implement that in China when not using Google's push server.
I think using https://github.com/phonegap/phonegap-plugin-push is a good idea. But all the Howtos are focussing on creating an account in Google's FCM which is not really helpful in China. I doubt Chinese phones use Google to poll for notifications. Which leads to my next question.
I was assuming that there exists only one central push service for all platforms (Android, iOS and Windows) and vendors for the following reasons:
One platform is only polling from one fixed push server to save battery life.
If an app (server side) is sending a push notification, it does not know anything about the receiver's device, so it can only count on a centralized service delivering the message to the device regardless of platform or vendor.
But do Apple, Google and Microsoft all use the same push service? I doubt it, and that's what makes me confused. Also, if I'm in China, as Google's services are unstable here, the Android phones distributed in China are not using Google and even not install Google Play Store.
When I install a Chinese app (hosted in China) on a German phone (Android) I still get all notifications for that app even if I'm obviously polling from Google's push server. That means, the notification messages of the Chinese app is somehow delivered to Google.
The only explanation for that is that the different push services are working together. Is that the case? If so, than does it make a difference where I create an account (Google FCM: https://medium.com/#ankushaggarwal/gcm-setup-for-android-push-notifications-656cfdd8adbd#.rr2lfivfh), it is still usable on different push servers? Also, when I send a notification, could I use any server all over the world?
How can I find out which push server my phone is connected with (Android)?
A lot of confusing here, I really appreciate if someone could bring light to that topic :-)
The reason GCM / FCM does not work in China is simply because the Great Firewall of China blocks connectivity to all the various Google services, FCM included.
Also, most, if not all, China-sold phones do not come with Google Play Services, a requirement for FCM to work.
Even if you were to take a German phone, as you mentioned, into China, it would not receive notifications albeit having Google Play Services, due to the firewall.
But there are alternative push notification gateways you could use instead, which are far more reliable and do not depend on Google Play Services. One of those is Pushy.
Pushy (https://pushy.me/) offers a highly-reliable push notification gateway for Android apps that works independently from FCM, using its own background MQTT connection. It also offers iOS support so you can push all of your users via a single API for cross-platform support.
Full disclosure: I founded Pushy.
With Cordova, you can use the plugin cordova-plugin-xiaomi-push done with the Xiaomi Android SDK. I have tested and it works well with all the phones when the application is running. And even when the app is closed with Xiaomi phones :)
The advantage to use Xiaomi is that their developer website is in English and their server's APIs are simple.
There are also 2 plugins for Huawei and Oppo, which work well with the respective brand phones, even if the app is closed. But the API side is more complicated than with Xiaomi. To cover all the supplier with notifications when app is closed, it seems necessary to build one version per manufacturer/stores which include the required plugin (That is possible using a bash script) + build a push server that would send the notification to the right provider.
Google FCM notification not works in china country. You have to use some different push notification provider like Pushy.
For China Country, I used pushy service. You can go through this link if you wanna interested to use pushy service. Please check this link.This will help you

Enabling background server push notifications in Ionic2 / Cordova application

I wish to be able to push notifications from my own asp.net Web API REST service to be received by an Ionic 2 application, whether or not it is running, perhaps show a notification and then be able to click on this to open the Ionic2 application. I know nothing about Mobile notifications and want to know if I am on the right track.
I see there is an Ionic Native plugin here to enable the app itself to run in background, but going here for more information, there is the following statement...
Store Compliance ‼️
The plugin focuses on enterprise-only distribution and may not compliant with all public store vendors.
This makes me think I will have problem particularly with the apple store.
I then wondered if the other option is to run a separate service (perhaps using Xamarin as it seems to be able to do this) on the Android/iOS devices, send the notifications to this, and then have the service open the application perhaps using the Deep Linking
Alternatively, I found this article on something called PushSharp. I am a little confused with this as it used this library, and also seems to use SignalR (why both - not sure where the SignalR comes into it)
Also, is mentions "Google Cloud Messaging for Android". Even though I am sending notifications from me own server, is this something I use as an "in between", ie my server sends notifications via the "Google Cloud Messaging"?
Am I on the right track here, do I need a separate service, or the Mobile platforms have notifications built in, so I can use this can have this open my perhaps not running application?
Thanks in advance for any pointers here

Push notifications, Pushwoosh.com

Related to Android Mobile Application.
Developed with Eclipse IDE.
Once we create an Android App with some activities, we will get .apk after execution.
That .apk, uploaded in Google Play Store.
Later, I need to send push notifications to .apk which is installed in several mobile devices.
In this scenario, Pushwoosh should get only Google Project ID and then it can deliver push notifications to devices. is it not?
Why we need to include pushwoosh.jar? Rolling back all AndroidManifest and MainActivity?
Really I could not understand.
I dont know, I may wrong. But still, Kindly clarify.
You need to learn the basics of the push notifications technology. You will need to integrate Pushwoosh SDK in order to send Push Token from the device to Pushwoosh Servers. Each and every device has its own unique push token.

online notification in android

I've built an Android application by android studio.
I want to be associated with users online and notify changes and news.even when my application is closed.
This is what is on my mind,I have web server, i want create a internet connection listener and when connection is available,application or a part of it connect with the server and get new information and notify the user with a notification.even when my application is closed.
How can I implement and enforce it?
Try "Google Cloud Messaging."
Per their Developer Console Help page: "Google Cloud Messaging (GCM) is a free service that helps developers send messages across multiple platforms: Android, iOS, and Chrome. For example, a server can send messages directly to single devices, groups of devices, or devices subscribed to topics. Also, the application on a device can send messages directly to a server and to devices belonging to the same group."
Use the Google Cloud Messaging service alongside the Google Plugin for Eclipse. Google Cloud Platform explains as: "When targeting Android devices, it is easy to get started by using Google Plugin for Eclipse (GPE). GPE allows you to generate an App Engine Connected Android Project that provides the basic logic needed for sending push notifications using Google Cloud Messaging for Android from a mobile backend running on Google App Engine."
This could send messages for you without having to do the work on your own server. If this answer helped you, please consider up-voting or accepting it as the answer. Thanks, and best of luck on your project!
No,These systems are always some limitations and managed with others.I do not need to communicate with iOS or chrome ,I need to design a system that's all for me.Experience has shown me great services, such as Google services and any other company affected by political issues.for example i live in iran right now.
All production-oriented and knowledge-based services for this country is banned.
due to this problems i prefer to have my own messaging and notification system.

Amazon SNS topic,subscription and push notifications management from Android,iOS device

I am a newbie to AWS and am exploring it for a mobile application targeted for Android and iOS platforms.One of my application's requirement is to provide push notifications wherein users subscribe to particular topic(s) and then get notifications for those topics.I had gone through Amazon SNS which intends to do exactly the same. Moreover, I have also tested sending push notifications to registered devices from AWS console. This works like a charm.
However,this is a manual process and I want this to be dynamic but without using an intermediate server. Rather I want to do this from the device(s) themselves using AWS Android, iOS SDKs. Thus I have following queries-
Can the Topics for SNS push notifications be created from within app?
Can Subscriptions to a particular topic be managed from the app itself?
Most importantly can push messages be published from devices to all subscribed devices of that topic?
Thanks in advance !
I am currently working on AWS SNS on iOS, and the answer to your questions are :
YES, topics can be created from within the app itself
YES, Subscriptions can be managed from the app also
YES, Push messages can be published from devices to all subscribed devices of a topic.
Please correct me if I'm wrong. And let me know if sample codes are needed.
Thank you.

Categories

Resources