Code example for BaseInputConnection

        result = super.onCreateInputConnection(outAttrs);
        if (result == null) {
            if (inputConnection == null)
                inputConnection = new BaseInputConnection(this, false);
            result = inputConnection;
        return result;
    public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
    public void surfaceCreated(SurfaceHolder holder) {
        running = true;
        context.addButtonsView(input, availableHeight(), isLandscape());
Connect your IDE to all the code out there  Get Codota for Java