The location-based smartphone service brings new development opportunities for seamless indoor/outdoor positioning. However, in complex scenarios such as cities, tunnels, overpasses, forests, etc., using only GNSS on smartphones cannot provide stable and reliable positioning results. Usually, additional sensors are needed to assist GNSS. This paper investigates the GNSS positioning algorithm assisted by pedestrian dead reckoning (PDR) in complex scenarios. First, we introduce a step detection algorithm based on the peak-valley of acceleration modulus, and the Weinberg model and the Mahony algorithm in PDR are used to estimate step length and heading. On this basis, we evaluated the performance of GNSS/PDR fusion positioning in an open scenario, a semiopen scenario, and a blocked scenario, respectively. Finally, we develop a GNSS/PDR real-time positioning software, called China University of Mining and Technology-POSitioning (CUMT-POS) version 1.0, on the Android 10 platform. By comparing GNSS solutions, PDR solutions, GNSS/PDR solutions, and real-time kinematic (RTK) solutions, we verify the potential auxiliary ability of PDR for GNSS positioning in complex environments, proving that multisource sensor fusion positioning significantly improves reliability and stability. Our research can help the realization of urban informatization and smart cities.