UDP Listener For Tasker
The official app & game
Distributed by ApkOnline
Run this app named UDP Listener For Tasker or download it using ApkOnline. You can do it using our Android online emulator.
Due to constant Google changes this app will not be updated.
PLEASE SEE THE APP'S HELP FILE AS THERE IS INSUFFICIENT SPACE HERE TO DESCRIBE ALL THE DETAILS.
Note: where you see "Multicast" it should be "Broadcast". Sorry.
Note: Disable battery saving to remove notification on later Android.
In trying to do some home automation stuff with Tasker, I could not find a good way to get notified of UDP events sent to the device on which Tasker is running. HTTP and TCP events, yes. Sending UDP events, yes. But none listening for UDP. So I decided to build one & this is the result.
Receipt of UDP datagrams on monitored port(s) fires Intents with event data in the Intent's EXTRAs. Tasker & other automation mechanisms that know how to receive Intents can trigger your own actions when this occurs.
Upon start up, this app displays a list of ports being monitored for UDP activity. To start monitoring all the Active entries on the list you simply press the Start Server button. If all goes well, the monitoring will be underway. About the only thing that might go wrong is that the specified port number is already in use by some other app. You should see a message if this is the case.
Initially, of course, the list of ports being monitored is empty. From the app's menu, choose Add Port to Monitor and supply the necessary information. Note that port numbers MUST be > 1024. Each port can optionally:
* service multi-cast datagrams or not
* be enabled/disabled for monitoring
* have UDP data payloads converted into a string of hexadecimal digits before sending
* suppress duplicate datagrams to a port from the same IP within a timeout period
* append the port number to its Intent action strings
If the server is currently running at the time a new entry is added to the list, you must stop & re-start the server for monitoring of the entire list to begin anew.
Ports may be modified & deleted from the list with a long press of the entry you wish to change. As with additions, you must stop & re-start the server for monitoring of the entire list to begin anew.
For many situations, it is desirable for monitoring to begin when your device boots. This can be accomplished by checking Start Server At Boot on the app's menu. While this works fine on the vast majority of devices, you must be aware that some devices do not support this. You can start & stop the server by sending these Intents:
Datagram Receipt Processing
Once the server is running, it waits for UDP datagrams for be delivered on each of the specified, Active ports. When a datagram is received, it is processed into an Intent that is broadcast to the system so that Tasker or other automation apps can handle the Intent's reception & do whatever you want done. You will need to know the action name on the Intent and that is always at least:
but optionally, the port number can be appended to the above.
In each Intent, the app places named extra data strings for the following datagram metadata:
* time - the time at which the datagram was processed as expressed in the number of seconds since midnight of 1/1/1970
* port - the monitored port to which the datagram was sent
* sender - the IP address of the datagram's origination
* sender_port - the port of the datagram's origination
Finally, an extra data string is sent named message. This is the datagram's data payload. It you have specified that the receiving port should convert this into a string of hexadecimal digits, this will be completed before the Intent is broadcast. This is highly recommended if the payload is binary data or if you are not sure. This app performs no processing to ensure the data is valid and has not been corrupted in transmission. The data is simply extracted from the datagram using the offset & length specified in the packet.
Run or download UDP Listener For Tasker using our android online emulator from ApkOnline.net
Developer: David P. White
Recent changes: Added an underscore before appended port on Intent actions strings to improve readability if Append Port is enabled.
Added in-app purchase now required to support more than a single port being monitored. Earlier users who have already added more than a single port will continue to work as before until such time as they try to use the Add Port to Monitor menu item.
Added menu item to email log to developer.