Page 1 of 1
Notification on Statusbar.. Send Location sms
Posted: 07 Feb 2014 11:09
by Rahul
Hi..
I m using ninja sms app and its not letting automagic to receive sms.. As sms received trigger never start.. So i want a flow where if i have notification by ninja app with some certain keyword from my contact list .. My trigger should start and send a sms to that number..so is it possible? And if it's work with what's app notification then its great..
I tried some expression like. Matches(notification_text, ".*keyword.*")
And indexOf (notification_text," keyword")
But nothing worked..
Pls help me on this..
Thank you
Re: Notification on Statusbar.. Send Location sms
Posted: 09 Feb 2014 13:30
by Rahul
By function matches(title, ". *keyword. *) now expression is true by that certain keyword find in notification bar.. But now stuck on next step.. Where i want to send Location sms to that sms sender which name also appearing in title.. I think some script can make this work.. So pls anyone give me some help on this..
Re: Notification on Statusbar.. Send Location sms
Posted: 10 Feb 2014 17:58
by Martin
There is currently no action to find the phone number by a contact name, so you would either have to extract the phone number form the notification text or you could also create a script to send the SMS to a few known contacts.
What does the notification look like in your case? Does it just contain the contact name or also the phone number of the contact?
Regards,
Martin
Re: Notification on Statusbar.. Send Location sms
Posted: 11 Feb 2014 08:26
by Rahul
In ninja app.. notification only contains contact name.. There is no Number in there.. And there is no notification_text variable .. Its doesn't show in log.. Only " title" variable have contact name and all other text..
And in app settings there is no option where i can enable to get msg by other app.. Is there anyway in automagic that it's force to get msg
Thank you
Re: Notification on Statusbar.. Send Location sms
Posted: 11 Feb 2014 18:01
by Martin
You could try to extract the contact name from the variable
title and then use a script to map the name to a number.
To extract the name, you can use the scripting-functions
substring and
indexOf.
For example when
title contains following text:
Contact 1
Text...
This script extracts 'Contact 1' and assigns number '1234567' to the variable number:
Code: Select all
index = indexOf(title, "\n"); //search for first newline
contact_name = substring(title, 0, index);
if(contact_name=="Contact 1")
{
number = "1234567";
}
else if(contact_name=="Contact 2")
{
number = "7654321";
}
Re: Notification on Statusbar.. Send Location sms
Posted: 13 Feb 2014 06:17
by Rahul
Thanks Martin for script.. Its work perfectly.. But i want to know if i want more then two contact how to add them in script and by that how many contacts i can add them in there..
Thank u
Re: Notification on Statusbar.. Send Location sms
Posted: 13 Feb 2014 10:15
by MURTUMA
You can add those "else if" lines as many as you need.