You need several USB relays in a tight form factor ? The Yocto-MaxiPowerRelay controls 5 relays. Each of these relay can handle up to 250V and 5 Amp. The relay state is reflected by a LED. This module does not need external power, but the host computer or the hub to which the module is connected must be able to provide up to 250 mA.
This device can be connected directly to an Ethernet network using a YoctoHub-Ethernet, to a WiFi network using a YoctoHub-Wireless-g, it can even be connected to a GSM network thanks to the YoctoHub-GSM.
USB cables and enclosure to be ordered separately.
Do I need an USB entry to every activity
<meta-data android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" android:resource="@xml/device_filter" />
My device ask every time I connect the USB to the it, whether I want to give access to it or not. I activate the checkbox too,that should make the relay as a default usb connect.
I use <uses-feature android:name="android.hardware.usb.host"/>
as well in the manifest
What can I do to make the relay as default relay to a device.
@webjoy: You do not need to add "android.hardware.usb.action.USB_DEVICE_ATTACHED" for every activity but only to the one that you want to start when de Yocto-MaxiPowerRelay is plugged.
In our application we have only one Activity that have the "android.hardware.usb.action.USB_DEVICE_ATTACHED" option, and depending of the state of the application we start one activity or another. See the app "Doc-Example" in the Android Library.
Regarding the "use as default" checkbox, Android has strange limitation: If your application is already started when you plug the device, the "use as default" option will be cleared on the next reboot. So if you want to get ride of this pop-up you need to ensure that your application is not running the first time that you plug the Yocto-MaxiPowerRelay.
If you still have trouble with the "android.hardware.usb.action.USB_DEVICE_ATTACHED" you can contact the support (firstname.lastname@example.org).
Is it possible to use 2 Yocto-MaxiPower Relay at one android pc? One relay works fine, but 2 relais crashes.
Yes, it should be no problem unless you are using Android 5.0 or 5.1, because of a bug introduced by Android 5.0 USB kernel. We have submitted a bug report to Android, and but the fix has only been made in Android 6.0 and not Android 5.x.
It is Android 5.1... Is it possible to use an Ethernet connector like YoctoHub-Ethernet with Android 5.1 or maybe a USB-hub ?
@webjoy: Yes, going through Ethernet would work around the problem, since the Android bug is in the USB stack