android4.3 GPS Positioning problem

Source: Internet
Author: User

Recently when debugging GPs, GPS needs to be positioned for a long time to locate, it takes a few minutes to dozens of minutes variable. This is unacceptable to the user. Use Logcat to view debugging information, found that the serial port has the correct positioning information, access to GPS data is not complete, log information as follows: W/locationmanagerservice (2725): Dropping incomplete location : Location[gps 0.000000,0.000000 acc=??? Et=+32s243ms alt=0.0 {bundle[{satellites=0}]}]. This is because the GPS data in Android 4.2 is strictly judged, more iscomplete () function, so in order to be compatible with the 4.0 system, the default can be blocked:

Drop Iscomplete ()-----Force escalation data, the specific code is frameworks/base/services/java/com/android/server/ Locationmanagerservice.java, comment out the following:

/* if (!location.iscomplete ()) {
LOG.W (TAG, "dropping incomplete location:" + location);
Return
}*/

After the system has been recompiled, it can be used normally, but after using 5 or 6 times, it is found to be unable to locate. Finally, the reason is because the previous modified init.rc, revert to the previous settings:

# Set GPS serial and reset GPIO pin
SetProp Ro.kernel.android.gps/dev/athrnmea
SetProp Persist.gps.oacmode @f
Symlink/dev/ttymxc2/dev/gpsdevice

Because the/system/etc/gps/orion.ini has a serial name that sets the receiving data, it needs to be matched. Once you've finished modifying it again, no matter how many times you open it.

Recommend a better article here: http://m.blog.csdn.net/blog/tianruxishui/41514815

android4.3 GPS Positioning problem

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.