Send an event from Javascript

Discussion forum about all things TD Mobile.
FRBhote
India
Posts: 1231
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

Send an event from Javascript

Post by FRBhote » 09 Aug 2018, 08:26

Trying to make a app which will capture SMSs. Once an SMS is received I would like to send a message to the program to process it.

How could I send this message (event)?

Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 772
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Send an event from Javascript

Post by Igor Ivanovic » 10 Aug 2018, 11:37

The way to go is with cordova plugins, either existing, if you can find one, or you can make your own, which will call your callback javascript function when an SMS is received.

We made a similar solution but with phone calls only. We made our own plugin which was writen in Java using Android Studio and included in Cordova build.

It was an app made for a traffic safety campaign "A day without mobile phones in traffic" here in Croatia.
The sole purpose of the app is to reject calls while you are driving and send an SMS to the caller with a predefined text.

The app also stores the statistics about its usage locally on the phone and communicates with the server when data connection is available.
So it works even if there is no data coverage.

You can check it out on Google Play: https://play.google.com/store/apps/deta ... laUPrometu
It's for android only, we never made a version for IOS.
Igor Ivanovic
Image

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests