How to send Random Number on given mobile number using ODK

Hi Team,

I want to send random number on respondent's Mobile number and than verify this by asking him again in upcoming questions using odk...

could you please send me the solution that how can i achieve this using odk..

i am using ODK Collect - on Google App engine using Aggregate v1.7.3


Hi @noman.s2325
welcome to the forum! Please introduce yourself here!

I'm not 100% sure if I understand well so could you elaborate?
Is your case like:

  1. Send a random number to a respondent.
  2. Ask they to pass the number
  3. Confirm it''s the same?

Yes @Grzesiek2010 you are absolutely right. just one more step need to add is

1.Send a random number to a respondent.
2.Ask they to pass the number
3.Confirm it''s the same by entering in odk by upcoming text type question.?

As I understand two devices are used in that scenario?

you can say that, it the same process as we use when we do some transaction a bank send a code to us then we put that code in computer to verify ourselves...

complete explanation:
we conduct an interview to a shopkeeper and we ask him about his personal mobile number,
after getting mobile number , we enter mobile number in ODK form and send a random number to shopkeeper's mobile number, than we ask him about that random number. in next question which is text type question we enter that random number, and device will verify that random number.


Ok so two devices but just one ODK Collect app? I mean you will send the number and then fill a form using the same device and the same form?

yep!!!, you are right..

@Grzesiek2010 is there any solution..

I think it's possible but I I am too busy to answer. I'll try to help you on Monday in the worst case.

@Grzesiek2010 Thank you very much, but a small request please do this for me as soon as possible. my project is ready but just stuck due to this option...

i hope you understand my situation,,


ok if it's urgent here you go:
smsVeryficationCodeTest.xls (6.5 KB)

Please test it and let me know if it meets your exceptions.

Thanks @Grzesiek2010, i am going to test it and let you know in case of any further help.

@Grzesiek2010 it working great but only 1 problem, interviewer should not be aware of that code

So how do you imagine it?
You said that there is just one ODK Collect app (interviewer's one), he needs to ask about that random number ad pass it right?

@Grzesiek2010 you are right,
but random number should be send in hidden process.
interviewer should not know what the random number send by ODK Collect Application.


@Grzesiek2010 you can say background/automated sms send... so interviewer is not be able to know about random number sent to respondent's mobile number until respondent told him...

Unfortunately we can't send such a message automatically, only user's default app for making calls or text messages can do that.
We even had an option to send forms automatically via SMS but we had to remove it because of that restriction, more info

@Grzesiek2010 , if you get the solution, please consider me the first person who need this..

I don't think google is going to change anything in this area so it won't be possible. You must do that in another way. Don't know what's best for you.

Thanks @Grzesiek2010