Firebase Phone Authentication SMS limit - android

I have implemented Phone Authentication in my application, and it had been working fine until last night, when suddenly no codes by SMS were received anymore. The authentication process proceeded smoothly, but no SMS.
When I tried using another phone number from my app in my phone, an SMS was received, but of course the authentication wasn't complete, since it wasn't my phone that received it.
I read in the official docs about the limits on SMS sent, but that was 500/IP/hour, which the frequency of my testing (I tested 34 times in the period of around a day) comes no where near...
The problem is that I depend on onCodeSent() method which is invoked when an SMS with the code is sent to display a dialog, which when dismissed will complete the sign-in process. Without the SMS, onCodeSent() isn't invoked, therefore the dialog won't be displayed, and thus can't be dismissed, which in turn won't complete the sign-in process.
Can somebody help?
P.S.: If the question isn't in the right place, please tell me. I can be considered a fairly new member of Stack Overflow, so I don't know that much about the rules.

Ok, I figured out what was happening:
Basically, for some reason, the instant verification or auto retrieval of code in my phone (which for some reason wasn't working before) kicked in, perhaps because of the number of SMS sent to the same number.
After searching the net for some time, some misunderstandings I had about the process of phone number authentication of firebase got corrected:
onCodeSent() is not invoked in cases of instant verification or auto-retrieval of code, the latter of which detects the incoming of the SMS to your phone.
onVerificationCompleted() is only invoked in cases of instant verification or auto-retrieval of code.
In other words, both work separately from each other, and I had to take measures to finish the sign-in process in case no SMS was sent.
Hopefully this helps anyone with the same problem.

Related

how to send multiple android sms invitations to my app at once?

So i'm new to programmation and my boss wants me to build an app function which sends an sms invitation to all the user's contacts. Now, aside from this function being the most horrible thing i've ever heard, this is my job and i'd like to get some help on how to do it.
didn't try cause i've never programmed android

sinch messaging APi Recieving duplicate messages

I am using the sinch.com's service for instant messaging but I recieve old messages anytime a user logs in or reinstall the app.
actually those messages have already been retrieved from their servers.. according to their documentation the messages are persisted only when the user is not online and also the persist the message for maximum of 30 days after when it will be deleted.
the issue might be the way you have implemented the sinch api. you can limit the IM retrieval only for certain time range. Can you share your code snippet or explain a bit more!
When you log out, our servers dont know that the messages have been delivered to that device. We keep messages for delivery for 30 days. AS a developer you will experience this more since you are wiping the install when you deploy.
If you just kill the app and launch it again you will see that its not delivered again.

GCM duplicated messages

I have an app based on Google Cloud Messaging and it was working well. Now (today) all of a sudden it started having a problem we've never seen before. For each message sent between devices, the receiving device will get it twice. The first will arrive almost instantly (within less than 3 seconds of sending). The second arrives a few minutes later. There are two devices in the test, the problem is the same whichever one is the sender/receiver. So if a device sends a few message to the other, the other will get them pretty much instantly--but then at a later time, it will receive a barrage of messages which are the second copies of the messages it has received.
I have put in breakpoints to make sure that the sending device wasn't the culprit: the message was sent exactly once (i.e. the web service for sending was called exactly once--and the code for the backend, which runs on Google App Engine, hasn't changed for ages.) However, the message somehow gets delivered to the receiving device twice. By using breakpoints I also made sure our own code on receiving side isn't responsible: it is verified that GCMIntentService::onMessage() indeed gets invoked twice for each sent message.
We also made sure the registration id in our database is the latest. At this point I'm stumped and need ideas to make any further progress. So any ideas?
https://groups.google.com/forum/#!topic/android-gcm/EHZUTEJMeyw
Check the official GCM thread above. Everyone is experiencing this issue. Google's fault!
We also have the same problem, and we are sure we don't send the message twice.
It could be an issue related to what's explained here about "Canonical IDs": http://developer.android.com/google/gcm/adv.html
[...] However, if a bug in the application triggers multiple registrations for the same device, it can be hard to reconcile state and you might end up with duplicate messages.
Same problem here. We have many apps integraded with MyMalcom and Urban Airship and all of them are getting pushes twice since Monday. We have checked also the canonicalId changes as suggested by Ferran, but the delivered to GCM messages are ok (no cannonical Id changes).

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