With the rapid development of high-precision positioning service applications, there is a growing demand for accurate and seamless positioning services in indoor and outdoor (I/O) scenarios. To address the problem of low localization accuracy in the I/O transition area and the difficulty of achieving fast and accurate I/O switching, a Kalman filter based on the salp swarm algorithm (SSA) for seamless multi-source fusion positioning of global positioning system/inertial navigation system/smartphones (GPS/INS/smartphones) is proposed. First, an Android smartphone was used to collect sensor measurement data, such as light, magnetometer, and satellite signal-to-noise ratios in different environments; then, the change rules of the data were analyzed, and an I/O detection algorithm based on the SSA was used to identify the locations of users. Second, the proposed I/O detection service was used as an automatic switching mechanism, and a seamless indoor–outdoor localization scheme based on improved Kalman filtering with K-L divergence is proposed. The experimental results showed that the SSA-based I/O switching model was able to accurately recognize environmental differences, and the average accuracy of judgment reached 97.04%. The localization method achieved accurate and continuous seamless navigation and improved the average localization accuracy by 53.79% compared with a traditional GPS/INS system.