Giter Site home page Giter Site logo

lixiaohui1090 / android-udpsender Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hastarin/android-udpsender

0.0 1.0 0.0 3.59 MB

Simple application to allow sending UDP packets. Supports Intent.ACTION_SENDTO with a udp://host:port/data format URI.

Java 100.00%

android-udpsender's Introduction

android-udpsender

UDP Sender is a simple application to allow sending UDP packets.

Landscape Screenshot

It supports the implicit Intent Intent.ACTION_SENDTO with a udp://host:port/data format URI.

  • data is treated as hex if it starts with 0x.
  • If a string starting with 0x is to be sent it can be escaped as \0x

Added in v1.3.1 - Current in Beta see http://goo.gl/reibxw to join

  • Allow broadcast packets to be sent.
  • Fixed a bug causing a period to be prematurely inserted when entering an IP.

Added in v1.3

  • Added support for Tasker to do variable replacement for the host/port as well as the text.
  • Remembers your settings when you quit and re-launch the app.

Added in v1.2

  • Now supports multi line text messages.
  • Bugfix for Send button not working in Landscape mode.

Added in v1.1

  • Also acts as a plugin for Locale and Tasker.
  • Variable replacement is supported for the Tasker plugin in the text field.
  • Changed theme to Holo (Dark)
  • Removed unused permissions
  • Various tweaks/fixes

Tasker Integration

Tasker plugin support is now complete and should be straight forward to use.

Tasker Plugin

Alternatively UDP packets can be sent via Tasker with the Misc/Send Intent action.

Just set it up as follows:

  • Action = android.intent.action.SENDTO
  • Data = udp://host:port/data
  • Target = Activity

Tasker Intent

Example for a www.limitlessled.com Wi-Fi bridge at 192.168.1.100 to turn on all the white LEDs

  • Action = android.intent.action.SENDTO
  • Data = udp://192.168.1.100:50000/0x350055
  • Target = Activity

Tasker Example Project

Lights Scene

You can get a copy of my current Tasker project (or at least a portion of it) Lights.prj.xml that I'm using for controlling my lights.

To give you an idea of how I'm using it I have the following:

  • Gesture control via my launcher (Nova) to turn all lights on/off/full bright/night mode and dim/brighten lights.
  • Using the Scene shown above I can turn all/individual zones on/off and control bright/dim/warm/cool.
  • NOTE: A swipe up/down in the colored square controls a bright/dim ramp and left/right for warm/cool.
  • An NFC tag on my bed that when tapped will turn the lights off, or keep some in night mode if I have guests.
  • When my phone connects to the Wi-Fi, and it's between sunrise and sunset, my entry hall light is turned on.

NOTE: It should be obvious but you will need to edit this to use it

  • Insert your own Weather Underground API key instead of <YOURAPIKEYHERE>.

See http://www.wunderground.com/weather/api/d/docs for more info on getting one.

It's used by the "Get Sunrise/set" which is called once a day to update the global variables. I use this in "Check Night Time" to only turn my entry light on at night when I arrive home and connect to my Wi-Fi.

  • You'll want to replace the string for my SSID with your own. Search and replace C86241. Or remove the Stop commands that prevent things working when not on the correct Wi-Fi.

  • You'll obviously need to change IPs and Names to suit your setup.

  • Finally if you're using a device that has a different size screen (my S4 is 1920x1080) you'll need to edit the scene so it fits and adjust the maths for the gestures.

android-udpsender's People

Contributors

hastarin avatar

Watchers

眩粟 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.