Activity recognition and transportation mode detection are the key research areas for context-aware systems. In smart environments such as cities, buildings, transportation systems etc., ambient intelligence applications watch on human activities in order to increase the quality of transportation, health, traffic and human-oriented services. Literature review shows that existing studies typically deal with recognition of motorized and non-motorized daily activities under the name of human activity recognition and transport mode detection. Only few studies worked on these problems with rich datasets in terms of the number of classes. To the best of our knowledge, for the first time, a study examines nearly the whole motorized/non-motorized transportation modes of people including still, walk, run, climbing upstairs, climbing downstairs, bicycle, motorbike, car, metro, train, high speed rail (HSR), tram and metrobus, excluding ferry and airplane. To outperform existing solutions on such a large dataset, an extended version of the well-known HTC dataset, especially consisting of similar classes, such as train, metro, tram and high speed rail, we propose a combined solution of an Long Short-Term Memory network and Healing algorithm. In our experiments, we first reveal the limits of traditional machine learning algorithms on such number of classes. In addition to that, apart from other studies exploiting deep learning approach, we then examine the potential input types for LSTM network, including raw sensor data, knowledge-based features and features obtained via Auto Encoder. Experimental results show that our proposed idea, feeding knowledge-based features into frames of LSTM network make a remarkable difference and bring out a robust, orientation-independent and generic solution for these well-known problems including activity recognition and transport mode detection. Besides, we examined the hyperparameters of our deep learning approach and specified the effective parameter set including window size, number of frames, unit size, dropout rate and batch size. Our test results reveal that we could achieve a success rate of 95.5% and outperform the state-of-the art solutions for 12 different transportation modes with the help of our former algorithm, namely Healing, on a totally journeyindependent dataset where instances for train, validation and test datasets are selected from different journeys.