Synchronize notifications on multiple devices - android

I have an App which allows the user to send images to other users. It is available for Windows (x86), iOS (tablet and phone), Android (iPhone and iPad) and Windows Phone. Now, if a user is working on a Windows PC and his Smartphone is lying next to him, he gets a notification on both devices, this is could become very annoying.
Are there any known solutions how to "synchronize notifications" on multiple devices? (Only one notification is shown on the used device)
For example skype has solved this problem with his so called "active endpoints"-feature. Does anyone know how they could have implemented this?

Essentially, this feature is totally built-in to PubNub - indeed it's the raison d'etre of PubNub.
http://www.pubnub.com/blog/five-ways-you-can-use-pubnub-presence/
"Presence detects when users enter or leave your app, and gives the online/offline status of machines and devices connected to your app..."
Maybe you need to ask a more detailed question - "Can I do 'active endpoints feature' with PubNub?" - either here or on the PubNub forum.
Note that if you're using Parse, that is basically now back4app.com.

Related

No FCM diagnostics when dialing *#*#426#*#*

I'm currently debugging issues where FCM push messages are sporadically not delivered to my Android app.
The principal setup and configuration works, most (high prio) push messages are delivered in a timely manner - but sometimes they are not.
When perusing the official troubleshoot guide (https://firebase.google.com/support/troubleshooter/fcm/delivery/diagnose/android), it advises me to dial *#*#426#*#* to get some diagnostics.
I've tried this now on three phones (Samsung Galaxy S7, Samsung XCover 4S, Motorola Moto X) but nothing happens - the phone just tries to do the call.
I've assumed that "dial this code" means "Open up the dialer app, enter this code, pick up". Was that incorrect?
Ok, found it.
This only works with Android's default dialer app or the Phone by Google app that can be loaded from the Play Store.
The custom dialers included by some handset makers (glaring at you Samsung) can't do it.
So, to get the diagnostics: Make sure to use the right dialer.

Can I receive android push notifications via AWS?

Essentially, what I would like to do is provision an AWS resource to mimic a user's phone to track push notifications from various applications. For example, the Netflix app will occasionally receive push notifications to inform users about new content being released. Is there any way I could set up a service via AWS (maybe an EC2 instance) to receive these notifications from multiple applications (say I want to receive push notifications from Hulu and Netflix, e.g.) and log them without the need to actually have these applications installed on a physical device. Is this possible? Any advice would be greatly appreciated.
You'll need to be running Android or iOS, to receive push notifications. So, you're looking at physical mobile devices, or emulated devices.
AWS Device Farm is one option. It is more intended for short, ephemeral use, though. Please consider the Pricing and FAQ while considering this solution. If you'll use a device full-time, consider a private device.
Another option is to run an Android or iOS emulator on a physical machine. Android notifications do arrive on the emulator, although with very poor reliability, in my experience. You could run on Android emulator on an EC2 host, or in an EC2 Container.
The most interesting aspect of your project is how to read/process the incoming notification data, once you have it, though. I recommend to start with this aspect of the problem.

How I can avoid battery optimization of Samsung devices? (S6, S7 and S8)

I have a GPS tracking Android app that receives continuous push messages when someone requires user's position.
Everytime that I receive a push, I start the location service that send positions during X time while he is receiving push messages.
The problem started with android Doze system, that block http requests. I could receive messages but I never could send my current position (I received timeouts of http connections and error in pings to Google). But i could solve it with ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS request and adding the app into battery whitelist programatically.
Now, the app works fine in all devices except on Samsung devices over S6, that have "Smart manager" system. I tried to add manually the app into Samsung's battery whitelist (Setttings -> Device Maintenance -> Battery -> Unmonitored apps) but the problem persist.
If I keep the device with screen off and no charging, in a few time, it stops sending positions, but he still recieving push messages.
Can anyone help me with a magical solution? I saw a alleged "packages list" with a lot of apps that Samsung includes automatically into whitelist (Facebook, Whatsapp, Life360, for example) but I couldn't find what I need to do to add my app into this list automatically.
Based on the link provided by #ManmeetP, it looks like your only option is to use Samsung's "Knox" SDK: ApplicationPolicy.addPackageToBatteryOptimizationWhiteList()
https://seap.samsung.com/api-references/android-standard/reference/android/app/enterprise/ApplicationPolicy.html
This would mean bundling that SDK into your app for all your users =(

Android send notification message to device without client app installed on the device

I would like to know is there any way to send notification from a server to an Android device without a client app installed on the device. Does android OS has such functionality. Based on the answer here Does Android support near real time push notification? Google Cloud Messaging do similar things, but it seems the client app need to be installed on user mobile.
Basically what I want do when an android device comes in range of an iBeacon
I need to send the notification messages to the user mobile.
Is there any way to achieve it. Any possible solution?
Edit:
The real scenario is like,
I have the beacon placed in somewhere, when the a device comes in range of the beacon, some how I have to detect the device(if the device Bluetooth is on) and get some id of the device send notification from cloud server. Where as the device(Android phone) don't know the beacon is there, or there is no app installed on the device to detect the beacon.
I am not sure whether it's possible to achieve the above goal in such a scenario.
Please let me know your valuable feedback.
Chrome 42 or higher for Android supports push notifications from websites, which allows you to send notifications without installing an app.
If you're specifically looking to start notifications from a beacon, Chrome 49 added support for beacons

samsung gear app communication

I am planning to develop an app for the gear (s) and a samsung galaxy mobile (note 3).
I want the user to be able to choose from a list (same like in the gear app of samsung) of all installed apps. The notifications of the selected apps shall get sent to the gear and the notifications of the apps that are not selected in the list shall get sent to another bluetooth device.
Since I know that the communication of the samsung gear is very weird, I wanted to ask if it is possible for my app to communicate with the gear S to rely the notifications to the gear.
Also, since the note 3 runs android and the gear S runs tizen, how does the communication have to look? Do I send my notifications as JSONs to the gear, or how can the gear know that it shall display the notifications?
Standard Android notifications are passed to the Gear using the method you describe.
There is a deeper mechanism that you can use called Rich Notifications. Part of the solution runs on Android and you can write JavaScript web apps to respond to the messages on Tizen. JSON is not necessary for Rich Notification. If you want to set up a two-way communication link between watch and phone, use the Accessory SDK.
There are sample apps in the SDKs showing how the communication occurs on both sides.

Categories

Resources