-
Couldn't load subscription status.
- Fork 2
How to add new SMS pattern
Josef Hruška edited this page May 16, 2016
·
3 revisions
1) At first you have to add informations about sms to sms.json (location)
a) You have to fill in all subjects ("id","ispublic","example","number","unique","sender","reg_ex","alt_numbers").
b) Every paramater except alt_numbers have to be filled.
c) What does parameters means:
id:
If a sender is typical number use unique number higher than 0 otherwise use number higher than 1000. <br>
ispublic:
Use true if it supposed to be shown in an overview list (in app) otherwise use false (used just for debug).<br>
example:
It is example of sms which is provided in overview list when you tap on sender.<br>
number:
It is a number of sender ( +420132456789; 724007007; InfoSMS; Verify ).<br>
unique:
It is a text which have to be contained in SMS body. Otherwise it can't be recognized.<br>
sender:
This text is used as a title of notifications.<br>
reg_ex:
It's a regular expression to identify sms.<br>
alt_numbers:
If the sender use more number you can add them in array.
d) here is an example of SMS pattern:
{
"id": 1002,
"ispublic":true,
"example":"Confirmation code: 41366. Never give this code out. Wargaming.net",
"number": "InfoSMS",
"unique": "Wargaming",
"sender": "WarGaming",
"reg_ex": "code: (.....)"
}
e) you can use simple UnitTest for testing SMS pattern.(location)
version:
Version number,
news:
You can add the description of SMS which you add. It will be showed as notification after update
{
"version": 32,
"news": "Netflix Authorization"
}