Nowadays, context-aware applications have become a hot research field. However, many context-aware applications dont fully connect to the characteristics of the Internet and the developed applications are limited by the platform, thus, the cross-platform deployment cant achieve. This paper presents a mechanism which can shield the difference among terminal operating systems andgather, store, and interpret the context information on the same smart terminal,based on the research achievements about the arithmetic of context-aware and the design of the cross-platform and context-aware middleware. To some extents, this frame can not only lessen the developers workload and avoid duplication of effort, but also speed up the applications development time and reduce the power consumption of mobile terminal.