frequent c2dm message request - android

I had develop an android app that allow user to request info from their phone based on chrometophone example.
Everything is working well but i noticed that c2dm message only sent once to the device and subsequence c2dm will only reach phone after screen unlock.
This make me annoy as my app required to get data from phone without unlock screen multiple times.
Anyone can help on this?
Thanks and sorry for my bad English.

thanks lonel for reply.
I think I found the answer. there is a parameter called "delay_while_idle", chrometophone set this param to true so C2DM will send only when phone not in IDLE.

If I understand your question, you want to send messages to the phone while it is in an idle state.Sadly, you can't do it because C2DM messages are only received when the phone is not idle (i.e. unlocked).
On top of that the devices stop the wifi while they have the screen locked and they only bring it up from time to time.

Related

Know when notification reaches mobile

My question is about
How can i know when the notification sent by backend (node js) is received at mobile ( android and ios) to make the chat i’m building with seen feature like whatsapp
Anyone have any ideas ?
Edit:
I’m trying to do chat that have seen and sent features
When client send msg to server via socket i can know when it’s delivered to the server
But how the server knows when the notification he sent received by the phone when the app is killed ?
If there isn't a function in react, node or whatever tech stack you are using that actively responds to the camera on the phone registering the data that holds its users face when your notification goes off, then you need to know system programming for the phone. But, I think you may be chasing the wrong metrics.
If 3 apps go off, and somebody looks at the phone, how do you know if your notification got the attention of your user?
If 3 apps go off at different times of the day, but the user opens his or her phone 3 hours from the time of the first app and see's all notifications on the home screen, is that a good metric? Well, it's data but its not the metric you WANT.
A better metric would be : If my app goes off, and the users face looks at the phone within 5 seconds then that is data I can use.

Delayed push notification on Android phone

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

Android device doesn't receive Firebase Notification realtime, sometime

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

Intercept incoming flash messages on android mobile

can anyone help me to intercept the incoming Flash messages (specially the ones from the telecom company, where they send our current balance after some activity like message sent).
My application deals with sending SMSes in bulk and I don't want the flash message popping now and then. So is it possible on Android ?
EDIT: Everyone says its not possible above Android 1.6 but I found a similar App on Google Play but I want the source of that kind of App. Please Help.
Edit: More than a year has passed and still I didnt got the solution. Can anyone help to resolve this thread..??
Might depend on the channel [of communication] used by your service provider. I guess they don't use SMS, probably they use WAP/PUSH or some pre-installed provider app for the notifications, which makes this harder to block. If it was SMS, you'd definitely have lots of ways to block their notifications, but in this case, I doubt there might be an easy / direct way to do this.
Flight Mode should ideally block telco / service-provider messages / notifications, but then this also blocks your connectivity, right? So, am not so certain on this one. Isn't there a way to opt-out of service provider notifications, maybe via a ussd routine? I've heard of this once...
Flash sms it is the same as usual sms except data coding flags. It has "class 0" indication in DCS.
For details about sms coding see: GSM 3.38 specification / 4 SMS Data Coding Scheme.
Some fragment from spec about it
When a mobile terminated message is class 0 and the MS has the capability of displaying short messages, the MS shall display the message immediately and send an acknowledgement to the SC when the message has successfully reached the MS irrespective of whether there is memory available in the SIM or ME. The message shall not be automatically stored in the SIM or ME.
So, in most cases, phone just displays this message and skips usual chain of actions.
Probably, you can't catch this message with usual API... probably you need deep hook and rooted device.
[Or may be just switch off this service by calling customer support?]

Problem in getting Contact Info

I m working on application in which i have to send all contacts from Android mobile to other mobile through SMS. I don't have any problem in getting contact information but when I send those Contacts after few messages there is Alert Window pop up saying "A large number of message have being send" and ask if you want to send or not.
I am testing this application on HTC Hero.
Is this problem is for specific mobiles or for all?
I don't know what should i do to avoid this window because I cant get SMS Sent event.
Please help me with any ideas that i can implement........
The alert window doesn't appear after a "few messages" — the limit is 100 messages, per application, per hour, before that warning appears.
If you really must use SMS, then I would suggest bundling multiple contacts together or batching the sends over time — short of rooting the phone, there is no way to get around this (sensible and useful) warning.
See also: http://groups.google.com/group/android-developers/browse_thread/thread/587f0d3a03ced88a
I think this a security check back to inform the user that an app is wasting a lot of money through sending a lot of SMS messages. If the use case of your app is valid you have to convince the user that sending all this messages is necessary and that he has to click the send button.
I hope and thinkg that there is no way to program around this because this a very sensible thing to do for a phone.

Categories

Resources