In order to provide personalized services, an activity recognition system has to decide the current activity performed by the user before the user finishes the activity, and it has to predict the next likely activity. This requirement strongly suggests the need for online recognition of activities to provide context-aware assistance or guidance. For online recognition the system must keep track of the changes in the sensing environment, and for each change in the sensor outputs, it has to decide whether there is any change in the activity performed by the user. The system can use the previous inputs upto the most recent one to decide which activity is performed. But, the system should not wait for future inputs for making decisions. This paper proposes an extension of the earlier methods for automatically constructing an automaton for online recognition of user activities. When tested with a publicly available data set, the proposed methods achieve highly promising results.