Advances in low-cost GNSS chipsets and access to raw GNSS data on Android smartphones have spurred demand for high-precision positioning in fields such as Location-Based Services (LBS), driving the application of precise positioning technologies like PPP-RTK on mobile devices. However, achieving reliable high-precision positioning in urban environments remains challenging due to non-line-of-sight (NLOS) errors and multipath effects from dense obstructions. Recently, the data-driven approach has demonstrated potential in enhancing GNSS positioning, offering widespread applicability without additional hardware modifications. In this contribution, we propose a novel method that combines machine learning with PPP-RTK to improve real-time positioning performance of smartphones in urban areas. This method integrates signal strength, satellite elevation angle, pseudorange consistency, and pseudorange residual, employing two multi-layer perceptron (MLP) classifiers to detect NLOS signals and predict pseudorange errors. Furthermore, predictions from the machine learning models are incorporated into a new stochastic model and applied to the PPP-RTK processing. Vehicular experiments conducted in diverse urban situations validate the effectiveness of the proposed method. Results indicate that this approach significantly enhances positioning accuracy in urban street situations by 55.0%, 49.0%, and 22.8% in the east, north, and up directions, respectively. In urban canyon and boulevard situations, the 3D positioning accuracy improves by over 30% compared to the traditional method. Notably, in urban street situations, the availability of horizontal positioning within 2 m dramatically increases from 0.5 to 55.8%.