此项目包含:
dependencies {
compile 'com.github.zcolin.TPartyLibs:libAmapLocation:latest.release'
}
<meta-data
android:name="com.amap.api.v2.apikey"
android:value="b1452dfd87b5777103a64ae2c6537645"/>
PermissionHelper.requestLocationPermission(mActivity, new PermissionsResultAction() {
@Override
public void onGranted() {
final LocationUtil location = new LocationUtil(mActivity);
location.startLocation(new LocationUtil.OnGetLocation() {
@Override
public void getLocation(AMapLocation location) {
}
@Override
public void locationFail() {
}
});
}
@Override
public void onDenied(String permission) {
ToastUtil.toastShort("请授予本程序[定位]权限]");
}
});
dependencies {
compile 'com.github.zcolin.TPartyLibs:libBaiduMapLocation:latest.release'
}
<meta-data
android:name="com.baidu.lbsapi.API_KEY"
android:value="s4bbFGqQTwZtiXjsGS9DrcUDGkaGBnkx"/>
dependencies {
compile 'com.github.zcolin.TPartyLibs:libShareSdk:latest.release'
}
<meta-data android:name="Mob-AppKey" android:value="你的key"/>
<meta-data android:name="Mob-AppSecret" android:value="你得Secret"/>
在assets中新建ShareSDK.xml文件
文件内容参照libShareSdk->assets中的ShareSDK_demo.xml
ShareSocial.setHiddenPlatForms(String...);
ShareSocial.addCustomerLogo(Bitmap, String, View.OnClickListener);
ShareSocial.instance()
.setTitle("分享")
.setContent("分享内容")
.setTargetUrl("http://www.baidu.com")
.setImgUrl("http://pic6.huitu.com/res/20130116/84481_20130116142820494200_1.jpg")
.setShowPlatform(Wechat.NAME, WechatMoments.NAME)//不调用此函数则默认全部
.share(mActivity);
dependencies {
//360渠道自动更新包引用
360Compile "com.github.zcolin.TPartyLibs:autoUpdate_360:latest.release"
//百度渠道自动更新包引用
BaiduCompile "com.github.zcolin.TPartyLibs:autoUpdate_Baidu:latest.release"
}
<meta-data
android:name="BDAPPID"
android:value="百度AppId" />
<meta-data
android:name="BDAPPKEY"
android:value="百度AppKey" />