The BETA-version of the game can be downloaded here:
https://play.google.com/store/apps/details?id=be.swink.game.app.menu
Personal blog about Software development & Technology
https://play.google.com/store/apps/details?id=be.swink.game.app.menu
Link to source
Start > Control Panel > Search for Folder Options > Enable "show hidden files,.. > Apply
Texteditor > Right click > Run as Administrator
Menu > Open file > C:\Program Files\VideoLAN\VLC\lua\http\.hosts
-> uncomment private addresses
Menu > View > Add interface > Web
Start > search for "cmd" > open de cmd.exe
When cmd is opened > Type "ipconfig" > press enter
http://<ipaddres>:8080If a page gets loaded you are set to start using the VLCRemote application. You only need to fill in the IP-address in the application and add some songs to the playlist.
Screenshot phone |
Screenshot tablet |
# IMPORTS USED IN THIS EXAMPLEfrom gi.repository import GdkPixbuffrom CellRendererIcon import CellRendererIcon from gi.repository import Gtk # MAIN CODE # VIEWPORT CREATED WITH GLADE self.viewport = self.builder.get_object('viewport') # CREATE LISTSTORE & TREEVIEW self.liststore = Gtk.ListStore(str, str) self.treeview = Gtk.TreeView(self.liststore) # COLUMNS column_text = Gtk.TreeViewColumn("Name") column_text.set_expand(True) column_icon = Gtk.TreeViewColumn("Delete") column_icon.set_expand(False) # ADD COLUMNS self.treeview.append_column(column_text) self.treeview.append_column(column_icon) # CREATE TEXTRENDERER cellrenderer_text = Gtk.CellRendererText() column_text.pack_start(cellrenderer_text, False) column_text.add_attribute(cellrenderer_text, "text", 0) # CREATE ICONRENDERER cellrenderer_icon = CellRendererIcon() column_icon.pack_start(cellrenderer_icon, False) column_icon.add_attribute(cellrenderer_icon, "stock-id", 1) # CONNECT SIGNALS FOR CALLBACK CLICK ON CELL cellrenderer_icon.connect('clicked', self.on_custom_function) # CONNECT LISTSTORE WITH TREEVIEW self.treeview.set_model(self.liststore) # FILL DATASET IN TABLE for row in dataset: self.liststore.append([row['name'], Gtk.STOCK_DELETE]) # SHOW & ADD treeview to viewport self.treeview.show() self.viewport.add(self.treeview)
#!/usr/bin/python # import needed for this project from gi.repository import Gtk from gi.repository import GObject class CellRendererIcon(Gtk.CellRendererPixbuf): __gsignals__ = { 'clicked' : (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, (GObject.TYPE_STRING,)), } def __init__(self): Gtk.CellRendererPixbuf.__init__(self) self.set_property('mode', 1) self.set_property('follow-state', True) def do_activate(self, even, widget, path, background_area, cell_area, flags): self.emit('clicked', path)
standardizeddcps/Lighting Controls_1/UPnP-ha-DimmableLight-v1-Device*.pdf
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /> <Button android:text="Start Device" android:id="@+id/Button01" android:layout_width="wrap_content" android:layout_height="wrap_content"></Button> <Button android:text="Stop Device" android:id="@+id/Button02" android:layout_width="wrap_content" android:layout_height="wrap_content"></Button> <Button android:text="Toggle on/off" android:id="@+id/lightswitch" android:layout_width="wrap_content" android:layout_height="wrap_content"></Button> </LinearLayout>
public class LightSwitch extends Activity { private UPnPControlPoint mCP1; // BUTTON private Button toggleButton; // UPNP private CpSwitchPower.InvokeHandler mCpSwitchPowerInvokeHandler; private CpSwitchPower mCpSwitchPower; private Object mCpSwitchPowerObject; ... }Reference button and add onClickListener to the button in onCreate-function
/** Called when the activity is first created. */ public void onCreate(Bundle savedInstanceState) {
// ONCREATE AND CONTENTVIEW // START AND STOP BUTTONS ... // FIND REFERENCE TO BUTTON toggleButton = (Button)findViewById(R.id.lightswitch); // DISABLE BUTTON UNTIL INITIATED BY SERVICE toggleButton.setEnabled(false); // DEFINE ONCLICK EVENT toggleButton.setOnClickListener(new OnClickListener() { public void onClick(View v) { if((Boolean)v.getTag()){ // lightbulb is on -> switch off mCpSwitchPower.action_SetTarget.Invoke(false, mCpSwitchPowerObject, mCpSwitchPowerInvokeHandler); }else{ // lightbulb is off -> switch on mCpSwitchPower.action_SetTarget.Invoke(true, mCpSwitchPowerObject, mCpSwitchPowerInvokeHandler); } // DISABLE BUTTON UNTIL CALLBACK v.setEnabled(false); } }); }
public void OnAddedDevice(UPnPDevice device) { //STORE REFERENCE OF INVOKE HANDLER mCpSwitchPowerInvokeHandler = mHandler_SwitchPower; // INITIATE SERVICE UPnPService service; service = device.GetService(CpSwitchPower.ServiceType).get(0); service.userObject = new CpSwitchPower(service); ((CpSwitchPower)service.userObject).LoadSCPD(null, new CpSwitchPower.LoadedSCPDHandler() { /** Called when service is initated */ public void OnCpSwitchPower_LoadedSCPD(CpSwitchPower sender,boolean success, Object userObject) { // STORE REFERENCE TO UPNP OBJECTS mCpSwitchPower = sender; mCpSwitchPowerObject = userObject; // GET INITIAL STATE OF LIGHTBULB mCpSwitchPower.action_GetTarget.Invoke(mCpSwitchPowerObject, mCpSwitchPowerInvokeHandler); } }); }
CpSwitchPower.InvokeHandler mHandler_SwitchPower = new CpSwitchPower.InvokeHandler() { public void OnGetStatus(int errorCode, boolean ResultStatus, Object userState) { } public void OnGetTarget(int errorCode, boolean newTargetValue, Object userState) { final boolean value = newTargetValue; runOnUiThread(new Runnable() { public void run() { // store state of lightbulb toggleButton.setTag(value); // enable button toggleButton.setEnabled(true); } }); } public void OnSetTarget(int errorCode, Object userState) { runOnUiThread(new Runnable() { public void run() { // switch state of lightbulb Boolean isOn = ((Boolean)toggleButton.getTag() == true) ? false : true; // store state of lightbulb toggleButton.setTag(isOn); // enable button toggleButton.setEnabled(true); } }); } };