All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.digitaldan.harmony.shell.StartActivityCommand Maven / Gradle / Ivy

The newest version!
package com.digitaldan.harmony.shell;

import org.kohsuke.args4j.Argument;

import com.digitaldan.harmony.HarmonyClient;

public class StartActivityCommand extends ShellCommand {
    @Argument(required = true)
    private String activity;

    @Override
    public void execute(HarmonyClient harmonyClient) {
        try {
            harmonyClient.startActivity(activity);
        } catch (IllegalArgumentException e) {
            harmonyClient.startActivityByName(activity);
        }
        println("Activity %s started", activity);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy