Send notification to Android from sever without installing any app in it - android

Scenario: Suppose I have set up some WiFi and have one server in it. When android user connect to that WiFi area then I want to send notifications to those devices which is connected with WiFi. I don't want user, to install any app in their devices to receive notifications.
Can I use any system service to receive notification which is already running in the device? or something else which help me in this.

You can create a login page to force users to allow notifications. After the user allows the notification, internet is free to use.
That way, you can send notifications without installing any app.

Related

How to connect mobile notifications to laptop

When mobile has some notifications Immediately the Laptop should recognize the notifications and should display those .
I want to know how could I implement it
Any Help??
Well there are many ways to do it.This is how I might do.
//Logic Only//
Laptop should be connected to wifi. Whenever user gets notification then that notification should be uploaded to a server(or sent as a sms to server if internet not available) and then sent to laptop.Then the laptop should display it.

Handling Push Notification scenarios on iOS and Android

I want to implement Push Notification for an App (both iOS and Android) and need clarifications on the following scenarios.
I understand how the Push Notification works in general and the limitations. I did read the docs but that just got me confused and didnt answer all my questions.
How are the following scenarios handled in iOS and Android:
When the device is turned off
When the device is not connected to 3G or Wifi networks
When the device has crashed and need restart
When the App is in foreground
When the App is in the background
When user is currently using the App
When my app is closed (not opened / launched)
When a push notification is user specific and both users share the same device and app. Example: If a husband and wife share same device and use a bank App with Push notification.
Can you send User specific notification if device is shared by multiple users?
When user has installed App on multiple devices
Can you send a notification to all devices registered by a user at once?
Do you store the device type (iOS or Android) with the registrationID in the User table or is there a way to differentiate the type of device by inspecting the token or registrationID?
Can you cancel a previously sent notification which is not read yet and send a new one?
Is it still true that Android Push Notifications does not work on Kindle Fire and will need to implement Amazon Device Messaging
Anything else that I need to think of or plan? I am aware of handling un-registering and feedback service
I would answer some of your questions, specific to android thought. Don't know about iPhone, If its of similar kind or not.
The device receives notification from Google Cloud server as and
when the notification is triggered by the server and it doesn't have
any relation with application state (Running, Closed, Background or
foreground).
If the notification is sent to a device when its not connected to
the internet ( switched off or not connected to the net) , it gets
notification only when it connects to the network. However, if the device
is crashed and restarted after the notification is received, you
won't get the notification again.
Is it user specific?
It depends on the individual servers implementation.
Do we store device type?
Yes we can.
Can we differentiate the IDs of iPhone and android?
Yes, android Device IDs are longer in length than iPhone's.
Can we cancel an already sent notification?
No, it is a one way communication channel as far as I know.
When the device is turned off:
Answer:
IOS/Android Server (Not your Server) will handled when to send the Push Notification. It checks that device is reachable or not. We can define that how many times IOS/Android Server should try to send Push Notification.
When the device is not connected to 3G or Wifi networks
Answer:
Nothing related to 2G/3G/Wi-Fi. Device should be connected to Internet via any network.
When the device has crashed and need restart
Answer:
IOS/Android Server checks that device is reachable or not.
When the App is in foreground
Answer:
Nothing related to app in foreground.
When the App is in the background
Answer:
Nothing related to app in background.
When user is currently using the App
Answer:
Nothing related to app being used currently.
When my app is closed (not opened / launched)
Answer:
Nothing related to app is closed.
When a push notification is user specific and both users share the same device and app. Example: If a husband and wife share same device and use a bank App with Push notification.
Answer:
It depends on how you have implemented on YOUR Server. You will be managing Device Id for each user. So it's upto your implementation logic to send to same device for multiple users.
Can you send User specific notification if device is shared by multiple users?
Answer:
It depends on how you have implemented on YOUR Server. You will be managing Device Id for each user. So it's upto your implementation logic.
When user has installed App on multiple devices
Answer:
It depends on how you have implemented on YOUR Server.
Can you send a notification to all devices registered by a user at once?
Answer:
Yes again as per your implementation logic.
Do you store the device type (iOS or Android) with the registrationID in the User table or is there a way to differentiate the type of device by inspecting the token or registrationID?
Answer:
Yes you need to store the device type, to identify to which Server (IOS/Android), you need to send request for Push Notification.
Can you cancel a previously sent notification which is not read yet and send a new one?
Answer:
No you cannot cancel the request.
Is it still true that Android Push Notifications does not work on Kindle Fire and will need to implement Amazon Device Messaging
Answer:
Need to google it around.
Anything else that I need to think of or plan? I am aware of handling un-registering and feedback service
Answer:
Need to google it around.

Turn off notifications of an app programatically on Android

I am developing a package manager application which shows checkboxes to turn off notifications from different applications installed on the Android device.
Since Android 4.1, users can turn off notifications of an app from application manager. Can I turn on/off notifications from an app programatically? Is there an API for doing that?
No, you cannot do that from your code. Perhaps on rooted devices you could do some magic, but that shall not really count for wider audience.
If you are App dev, you should manage that on server side, having a webservice (REST API) allowing the user to unsubscribe to the notifications.
Then implement a Settings section in your App where user can uncheck a notification box and that call this service.
Then, your server will not send the notification to this user.

Android GCM doesn't work with wifi networks when 3G network is available

I am developing app on Android GCM push notification. Everything works fine .But I am not able to get the notification message when my device is on wifi rather than on data plan of service provider. In my case data plan is 3G but and notification comes as usual to devices but when device is connected through wifi I am not able to get any notifications.
Well this should not be the case, I have an android app that receives GCM push notifications regardless it is connected via 3G or Wi-Fi.
What I would suggest to troubleshoot this problem:
When you send the push notification from the server make sure to NOT include delay_while_idle, so the notification get delivered right away. Also make sure you have set time_to_live to a reasonable value (default is 4 weeks)
Try to hold a Wi-Fi lock in your app
Test with different device and/or Android version (maybe it is a problem with certain hardware/API version)

sending notification between Android devices

I have App "A" in android device "A" and i have the App "A" in android device "B" . Is it possible for me to send the notifications between the devices through WIFI??
Thanks in advance
There's a variety of ways to do this, but ultimately it all boils down to have an app running on the second device that receives some trigger to show a notification.
Some examples....
You can have an app with a open server socket on device b and then discover and connect to it to send a message that triggers a notification over TCP/IP. http://jmdns.sourceforge.net/ can help with discovery.
If they both have a network connection, you can build something on the App Engine to send a C2DM message to device B, and then upon receiving that message trigger a notification.

Categories

Resources