src/main/java/com/simpligility/maven/plugins/android/AbstractAndroidMojo.java
protected void deployApk( final File apkFile ) throws MojoExecutionException, MojoFailureException
    {
        if ( undeployBeforeDeploy )
        {
            undeployApk( apkFile );
        }
        doWithDevices( new DeviceCallback()
        {
            public void doWithDevice( final IDevice device ) throws MojoExecutionException
            {
                String deviceLogLinePrefix = DeviceHelper.getDeviceLogLinePrefix( device );
                try
                {
                    device.installPackage( apkFile.getAbsolutePath(), true );
                    getLog().info( deviceLogLinePrefix + "Successfully installed " + apkFile.getAbsolutePath() ); 
                    getLog().debug( " to " + DeviceHelper.getDescriptiveName( device ) );
                }
                catch ( InstallException e )
                {
                    throw new MojoExecutionException( deviceLogLinePrefix + "Install of " + apkFile.getAbsolutePath()
                            + " failed.", e );
                }
            }
        } );
    }
protected void deployApk( final File apkFile ) throws MojoExecutionException, MojoFailureException
    {
        if ( undeployBeforeDeploy )
        {
            undeployApk( apkFile );
        }
        doWithDevices( new DeviceCallback()
        {
            public void doWithDevice( final IDevice device ) throws MojoExecutionException
            {
                String deviceLogLinePrefix = DeviceHelper.getDeviceLogLinePrefix( device );
                try
                {
                    device.installPackage( apkFile.getAbsolutePath(), true );
                    getLog().info( deviceLogLinePrefix + "Successfully installed " + apkFile.getAbsolutePath() ); 
                    getLog().debug( " to " + DeviceHelper.getDescriptiveName( device ) );
                }
                catch ( InstallException e )
                {
                    throw new MojoExecutionException( deviceLogLinePrefix + "Install of " + apkFile.getAbsolutePath()
                            + " failed.", e );
                }
            }
        } );
    }
Deploys an apk file to a connected emulator or usb device.

@param apkFile the file to deploy
@throws MojoExecutionException If there is a problem deploying the apk file.