Android's current megatrends are already widespread using Androidstudio (install package [https://yunpan.cn/ckc54idj3JVJb access password 664f]). This is a good environment for integration.
Today to engage in a Baidu positioning integration.
First look at the Baidu Positioning SDK.
See this 4 step, we actually follow this to come.
First step: Request a key
Here's what to look for:
Someone doesn't know what SHA1 is?
is the ecplise to develop the Android project when the creation of the certificate turned to look.
View please refer to: http://blog.csdn.net/forlong401/article/details/44120547
Step Two: Configure the integration environment
Since we want to use Baidu's positioning, it is necessary to integrate the relevant classes provided by Baidu to call his related interface (commonly known as the SDK). SDK Download
Unzip after download is complete
Next configure the Baidu SDK in the so file read
Next set
Set Androidmanifest.xml
Permissions used by claims
<!--this permission for network positioning--><uses-permission android:name= "Android.permission.ACCESS_COARSE_LOCATION" ></ uses-permission><!--This permission to access the GPS location--><uses-permission android:name= "Android.permission.ACCESS_FINE_ Location ></uses-permission><!--to access WiFi network information, WiFi information will be used for network positioning--><uses-permission android:name= "Android.permission.ACCESS_WIFI_STATE" ></uses-permission><!--get carrier information to support interfaces that provide carrier information-->< Uses-permission android:name= "Android.permission.ACCESS_NETWORK_STATE" ></uses-permission><!-- This permission is used to get WiFi access, WiFi information will be used for network location--><uses-permission android:name= "Android.permission.CHANGE_WIFI_STATE" ></uses-permission><!--used to read the current status of the phone--><uses-permission android:name= "android.permission.READ_ Phone_state "></uses-permission><!--write extended storage, write data to the expansion card for writing offline location data--><uses-permission android:name = "Android.permission.WRITE_EXTERNAL_STORAGE" ></uses-permission><!--access network, network location requires internet-->< Uses-permissionAndroid:name= "Android.permission.INTERNET"/><!--SD card Read access, user writes offline location data--><uses-permission android:name= "Android.permission.MOUNT_UNMOUNT_FILESYSTEMS" ></uses-permission>
Set Acesskey
<meta-data android:name= "Com.baidu.lbsapi.API_KEY" android:value= "key"/> //key: Developer Application KEY
Okay, here's the SDK integration done.
Android studio--Baidu positioning Integration 001