Back to project page SmartCocktailShaker.
The source code is released under:
MIT License
If you think the Android project SmartCocktailShaker listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.tonydicola.smartshaker; /* w ww .j a va 2 s .co m*/ import com.tonydicola.smartshaker.interfaces.ConnectionProvider; import com.tonydicola.smartshaker.interfaces.DeviceConnection; import java.io.IOException; import java.util.ArrayList; import java.util.List; public class MockConnectionProvider implements ConnectionProvider { @Override public List<DeviceConnection> getConnections() { ArrayList<DeviceConnection> devices = new ArrayList<DeviceConnection>(); devices.add(new Connection("Foo")); devices.add(new Connection("Bar")); return devices; } public class Connection implements DeviceConnection { private String name; public Connection(String name) { this.name = name; } @Override public String toString() { return name; } @Override public void open() throws IOException { // Do nothing } @Override public void close() { // Do nothing } @Override public Double getMeasure() throws IOException { return 0.0; } @Override public void requestPermission(Runnable granted) { granted.run(); } } }