We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/** * setLocation 设置GPS的位置 * */ private void setLocation(double longitude, double latitude) { Location location = new Location(mMockProviderName); location.setTime(System.currentTimeMillis()); location.setLatitude(latitude); location.setLongitude(longitude); location.setAltitude(2.0f); location.setAccuracy(3.0f); if (Build.VERSION.SDK_INT > 16) { //api 16以上的需要加上这一句才能模拟定位 , 也就是targetSdkVersion > 16 location.setElapsedRealtimeNanos(SystemClock.elapsedRealtimeNanos()); } locationManager.setTestProviderLocation(mMockProviderName, location); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: