add push idk
This commit is contained in:
parent
3bf73369d6
commit
b8eb5043c6
Binary file not shown.
Binary file not shown.
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="distributionType" value="LOCAL" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleHome" value="$APPLICATION_HOME_DIR$/gradle/gradle-2.14.1" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/listviewlibrary" />
|
||||
<option value="$PROJECT_DIR$/qy" />
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveModulePerSourceSet" value="false" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
|
@ -1,10 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/asProjects.iml" filepath="$PROJECT_DIR$/asProjects.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/listviewlibrary/listviewlibrary.iml" filepath="$PROJECT_DIR$/listviewlibrary/listviewlibrary.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/qy/qy.iml" filepath="$PROJECT_DIR$/qy/qy.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
|
@ -50,6 +50,7 @@ dependencies {
|
|||
compile files('libs/universal-image-loader-1.9.2.jar')
|
||||
compile files('libs/utdid4all-1.0.4.jar')
|
||||
compile 'com.google.code.gson:gson:2.8.0'
|
||||
compile project(':PushSDK')
|
||||
}
|
||||
//tasks.withType(JavaCompile) {
|
||||
// options.encoding = "GBK"
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.qiyou.mb.android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:versionCode="44"
|
||||
android:versionName="1.29.1" >
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="8"
|
||||
android:targetSdkVersion="22" />
|
||||
android:targetSdkVersion="22"
|
||||
tools:overrideLibrary="com.umeng.message.lib"/>
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" >
|
||||
</uses-permission>
|
||||
|
@ -150,8 +152,18 @@
|
|||
<meta-data
|
||||
android:name="UMENG_APPKEY"
|
||||
android:value= "550aa4e4fd98c5a25c000284" > <!-- "4eaee02c527015373b000003" -->
|
||||
</meta-data>
|
||||
|
||||
</meta-data>
|
||||
|
||||
<meta-data
|
||||
android:name="UMENG_MESSAGE_SECRET"
|
||||
android:value="197851521b5b70767e60ae59b0955a44">
|
||||
</meta-data>
|
||||
|
||||
<meta-data
|
||||
android:name="UMENG_CHANNEL"
|
||||
android:value="i7lv" >
|
||||
</meta-data>
|
||||
|
||||
<activity android:name="com.umeng.socialize.view.ShareActivity"
|
||||
android:configChanges="orientation|keyboard"
|
||||
android:launchMode="singleTask"
|
||||
|
|
|
@ -142,6 +142,8 @@ import com.qiyou.mb.android.utils.enums.TrackStatus;
|
|||
import com.qiyou.mb.android.utils.enums.TrackType;
|
||||
import com.qiyou.mb.android.utils.log.QLog;
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.umeng.message.PushAgent;
|
||||
import com.umeng.message.IUmengRegisterCallback;
|
||||
//import com.qiyou.mb.android.service.TrackDbService;
|
||||
|
||||
public class QiYouApplication extends Application {
|
||||
|
@ -397,8 +399,29 @@ private ConcurrentHashMap<String,Object> webObjcache;
|
|||
setPhoneId();
|
||||
QLog.getLogger().d(dTAG, "mobileid is"+ getPhoneId());
|
||||
getStaticsTracks();
|
||||
|
||||
initialPushSDK();
|
||||
|
||||
}
|
||||
|
||||
|
||||
void initialPushSDK(){
|
||||
PushAgent mPushAgent = PushAgent.getInstance(this);
|
||||
//注册推送服务,每次调用register方法都会回调该接口
|
||||
mPushAgent.register(new IUmengRegisterCallback() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(String deviceToken) {
|
||||
//注册成功会返回device token
|
||||
QLog.getLogger().d(dTAG, " deviceToken of push is "+ deviceToken);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(String s, String s1) {
|
||||
QLog.getLogger().d(dTAG, " push agent regist failed ");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
public Crypto crypto;
|
||||
public Entity entity;
|
||||
private void initCryto(){
|
||||
|
|
|
@ -15,7 +15,7 @@ public final static String BASE_MD_URL = BASE_URL;//+"upload/";
|
|||
public final static String BASE_STATIC_URL = BASE_URL +"staticmap/";
|
||||
public final static String TENCENT_APP_ID = "1104563148";
|
||||
// TODO Turn off when deploying.
|
||||
public static boolean DEVELOPER_MODE = false;
|
||||
public static boolean DEVELOPER_MODE = true;
|
||||
|
||||
public static boolean PLAYBACK_CAN_RECORD = false /*DEVELOPER_MODE*/ ;
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ import com.umeng.socialize.sso.UMQQSsoHandler;
|
|||
import com.umeng.socialize.weixin.controller.UMWXHandler;
|
||||
import com.umeng.socialize.weixin.media.CircleShareContent;
|
||||
import com.umeng.socialize.weixin.media.WeiXinShareContent;
|
||||
|
||||
import com.umeng.message.PushAgent;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
|
@ -243,7 +243,9 @@ public class MainActivity extends Activity_qiyouBase {
|
|||
MobclickAgent. startWithConfigure(config);
|
||||
MobclickAgent.openActivityDurationTrack(false);
|
||||
}
|
||||
|
||||
|
||||
PushAgent.getInstance(this).onAppStart(); //push start
|
||||
|
||||
mController.getConfig().removePlatform(SHARE_MEDIA.DOUBAN, SHARE_MEDIA.RENREN);
|
||||
//分享给QQ好友
|
||||
UMQQSsoHandler qqSsoHandler = new UMQQSsoHandler(this, QiYouConstant.TENCENT_APP_ID, "bB5QKjxU4MpHoCq0");
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
include ':listviewlibrary'
|
||||
include ':listviewlibrary', ':PushSDK'
|
||||
include ':qy'
|
||||
|
|
Loading…
Reference in New Issue