i've been doing on my project which i should send a notification from my device to the other device.
lets say : i've got a edittext, when i insert a number greater than 140 and press the submit button, my device will send a notification to the another device, so a notif will appears on the other device. anyone know how to connected these devices?
well, i've been thinking using webservices/server/internet to connected it, does anyone know how to do it? it'll be more helpfull if u can show me the example code, thanks before :D
Just use pushbullet:
http://www.pushbullet.com/.
When you install pushbullet you can also install Push Tasker (so you can do Task when you receive certain notifications).
Related
I am facing delayed notification when phone is ideal and not in use for few minutes. Even sometimes I am getting notification when phone start to use, not before that. Is it app issue or phone settings issue? I tried to change phone settings like Turn Off Adaptive Battery, Don’t Optimize for that app. I checked app side; I didn’t find anything wrong from app. Can anyone help me please?
Thanks
To solve this problem, I had to set the priority of the messages from the backend to high priority.
Check this out: https://firebase.google.com/docs/cloud-messaging/concept-options#setting-the-priority-of-a-message
With a fresh install app on my Samsung Note 5 device and also on my emulator, some notifications was sent via the Firebase console are received properly on those 2 devices.
But after a day, my emulator was reopened, my phone was reconnected to the Wifi, I started creating some few notification messages on Firebase console again, but those devices did not receive any message from Firebase.
I turned off and turned on my phone's Wifi, then the phone received those notifications. I turned on and turned off plane mode on my emulator, then the emulator received those notifications. Is there something wrong with my app? Or with Firebase? (I already use WAKE_LOCK permission). Any suggestion?
Thanks!
It seems to work fine now after I changed my device's Wifi connection.
From #AL's comment:
There might be a chance that the Android device is connected to the
Wifi, but your Wifi needs something like a refresh for the internet
connection to work again, which is the same case for the devices
connected to it.
I still not sure why, but his comment make this works.
Great to know that, #AL gave a hint of the problem and you got it working too. I'm here for putting some of my thoughts here regarding your issue.
As you've worked with push notification already, I think you know pretty much about how this works actually. If you want a short brief, you might take a look at this answer.
Now, you already have known, you need to get a push registration ID from FCM when your application starts. This push registration ID, is the unique ID by which FCM knows when and how to send you a push notification. This push registration ID doesn't change every time you launch your application, but yes, it changes some times. When your push registration ID has been changed, but you couldn't get your new push registration ID from FCM, the push notification won't work properly in that time. This is usually a network issue though, but don't panic if that happens.
Another thing I need to point out is, push notification is not always guaranteed to be received in your device/devices. So if you're performing some action when a push notification is received in your application, you might need to make the action fail safe too (e.g. you might consider polling after a certain time if no push is received).
I want that my app will send data (Equation) to another android device and when the other device will get that data he will make calculation with that data (equation).
any idea's how to send data ??
Thanks.
P.s: its similar to this preview question: Send an equation to another android user for solving auto
You can use GCM. it's the Android push notification.
The notifications will arrive to the device regardless if the app is in the background or forground.
About the user noticing it, it's up you. The push notification itself is not showing anything to the user. It enters a callback (OnReceive) and you as the developer decides what to do with it. you can show an alert at the status bar, Send a broadcast to a service, update the DB or in your case do something with an equation etc...
Are you considering Bluetooth as an option?
If so, this lib may help you https://github.com/buddles/AndBT
I put in reference this Link
I implemented it it works but am facing troubles:
first sometimes I need to restart the android emulator so the push notification could be delivered when the emulator is restarted the push notification work properly.
after a while the push notification does not work and it need about 15 min to the push notification to get delivered. if I restart the emulator the push notifications get delivered and so on...
what do you think the problem here?
Its your wifi router probably, check the description here
https://play.google.com/store/apps/details?id=com.andqlimax.pushfixer
I opened an issue to google here:
https://productforums.google.com/forum/#!category-topic/nexus/connecting-to-networks-and-devices/fslYqYrULto
and they agree there is a TCP timeout on some conditions.
if you are expecting a notification but there a huge delay in android emulator.
You can perform following step to get instant notification.
Turn off the mobile data in Emulator then turn it on again, you will get the notification as soon as you turn it on
hope this helps :)
Is there any way to check/manage the push notifications (C2DM or from other service) is available for the Android phone or its based on application to application and have to manage in application only.
Regards,
Android_IT
If your push messages are wap push messages and they are not from your facebook/gmail account, it definitely comes from your other installed application. To detect from which application it comes from just install free app called Airpush detector and detect which apps send push messages and uninstall them.
Here is link for Airpush dector
Yes you can disable it..
Let me explain how? When you want push notification from server then you have to register your device. So same as there is option ofunregisteredif you do not want push notification anymore.So simply check if your device is already registered then unregistered your device.
But next and most important thing which i think you want. In android device there is not option explicitly to stop push notifications.So you have to implement by using code.
On this topic many people have discuss so i am giving you reference.Go through it May this help you
Click me for more help
i too have been receiving annoying push messages on my samsung galaxy s7562. what i did to stop it... i just go to the messaging-settings-push message settings and i simply unchecked the "receive push message from network"...hope this will help.