public void onCommandReceived(AbstractCommand command) {
			// Filter out the messages we care about
			if (command instanceof GrantedSessionCommand) {
				// Print our our unique key, this will be used for subsequent connections
				Utilities.log("Your instanceId is " + ((GrantedSessionCommand) command).getInstanceId());

				//register for commands from the widget
				try {
					router.registerCommandSubscriber(VideoListExample.this.commandHandler, WidgetCommand.class, WIDGET_ID);
				} catch (InterruptedException e) {
					e.printStackTrace();
				}

				VideoListExample.this.startUserInput();
			} else if (command instanceof WidgetCommand) {
				// handle incoming message from a widget
				VideoListExample.this.handleWidgetMessage((WidgetCommand) command);
			} else if (command instanceof WidgetMethodCommand) {
				try {
					JSONArray videos = new JSONArray(command.getPayload());
					for (int i = 0; i < videos.length(); i++) {
						JSONObject video = videos.getJSONObject(i);
						System.out.println(i + ". Video: " + video.getString("title"));
						System.out.println("\tdescription: " + video.getString("description"));
						System.out.println("\tthumbnail: " + video.getString("thumbnail"));
						System.out.println("\turl: " + video.getString("url"));
					}
				} catch (JSONException e) {
					e.printStackTrace();
				}
			}
		}