1. It depends which algorithms you are using for preprocess the data and other stuff. Usually, online BCIs need to use a less accurate methods for noise removal in order to guarantee real-time performance. You can also use some data collected offline to train a first classifier, but since the brain signals change quite quickly (even on the same subject), I suggest to retrain the classifier from time to time with the new data collected.
2. This question is a bit generic. The output of a BCI is always a command or, to be precise, a "class" of the classifier. Depending from the number of classes that you have, you can create different commands. So, for example, if you use motor imagery, you can map the thought of moving the left arm to the command "volume up" of the smartphone, and so on. However, this doesn't change from the offline to the online approach.
It is quite hard to perform real time processing in Matlab. The only option probably would be Simulink. I would rather suggest you to use LabView or directly program in C in Eclipse.
In addition to the previous comments, check BCILAB, reported by Kothe, C.A., and Makeig, S. (2013). BCILAB: a platform for brain-computer interface development. J Neural Eng 10, 056014.
Also, see this paper that reviews BCI Software:
Brunner, C., Andreoni, G., Bianchi, L., Blankertz, B., Breitwieser, C., Kanoh, S.I., Kothe, C., Lécuyer, A., Makeig, S., Mellinger, J., Perego, P., Renard, Y., Schalk, G., Susila, I., Venthur, B., and Müller-Putz, G. (2013). "BCI Software Platforms," in Towards Practical Brain-Computer Interfaces, eds. B.Z. Allison, S. Dunne, R. Leeb, J. Del R. Millán & A. Nijholt. Springer Berlin Heidelberg), 303-331.