Commit 6d6902f1 authored by mengcuiguang's avatar mengcuiguang

添加阅读赚钱

parent 3555a778
......@@ -242,6 +242,7 @@ dependencies {
implementation(name: 'x5fit-1.2.2', ext: 'aar')
implementation(name: 'gdtfit-1.2.2', ext: 'aar')
implementation files("libs/qq_x5.jar")
// 鱼丸盒子
implementation(name: 'xzzq_ywsdk_1.0.6', ext: 'aar')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.41"
......@@ -305,6 +306,10 @@ dependencies {
// 多盟
implementation(name: 'domob_rvads_1.0.0', ext: 'aar')
implementation 'com.google.protobuf:protobuf-lite:3.0.0'
// 酷问新闻
// implementation 'com.tencent.tbs.tbssdk:sdk:43903'
implementation 'com.liulishuo.filedownloader:library:1.7.4'
testImplementation 'junit:junit:4.12'
......
......@@ -151,6 +151,7 @@
<activity android:name=".ui.activitys.SettingActivity" />
<activity android:name=".ui.activitys.PhoneActivity" />
<activity android:name=".ui.activitys.EraseActivity" />
<activity android:name=".ui.activitys.AdWebActivity" />
<activity
android:name=".ui.activitys.WebActivity"
android:windowSoftInputMode="adjustResize" />
......
......@@ -18,6 +18,7 @@ import com.component.dly.xzzq_ywsdk.YwSDK;
import com.downloader.PRDownloader;
import com.downloader.PRDownloaderConfig;
import com.lechuan.midunovel.view.FoxSDK;
import com.liulishuo.filedownloader.FileDownloader;
import com.mintegral.msdk.MIntegralSDK;
import com.mintegral.msdk.out.MIntegralSDKFactory;
import com.mints.highgold.common.AppConfig;
......@@ -43,6 +44,7 @@ import com.orhanobut.logger.FormatStrategy;
import com.orhanobut.logger.Logger;
import com.orhanobut.logger.PrettyFormatStrategy;
import com.tencent.ep.shanhuad.adpublic.ShanHuAD;
import com.tencent.smtt.sdk.QbSdk;
import com.tendcloud.tenddata.TCAgent;
import com.tmsdk.module.coin.AbsTMSConfig;
import com.tmsdk.module.coin.TMSDKContext;
......@@ -159,6 +161,9 @@ public class MintsApplication extends MultiDexApplication {
//移动安装联盟 获取OAID等设备标识符
initMiitHelper();
// 酷问新闻
initPipi();
// 机型适配
initRudenessScreen();
......@@ -236,6 +241,7 @@ public class MintsApplication extends MultiDexApplication {
// 极光一键登录
initJLogin();
}
/**
......@@ -479,6 +485,25 @@ public class MintsApplication extends MultiDexApplication {
});
}
/**
* 酷问新闻
*/
private void initPipi() {
FileDownloader.setup(this);
QbSdk.PreInitCallback cb = new QbSdk.PreInitCallback() {
@Override
public void onViewInitFinished(boolean arg0) {
LogUtil.d(TAG, "onViewInitFinished is " + arg0);
}
@Override
public void onCoreInitFinished() {
}
};
//x5内核初始化接口
QbSdk.initX5Environment(this, cb);
}
/**
* app退出
*/
......
......@@ -30,7 +30,7 @@ public class WxLoginPresenter extends BasePresenter<WxLoginView> {
private UserBean.ConsumerBean consumer;
/**
* 登录
* 微信登录
*/
public void login(Context context, String wxInfo) {
view.showLoading("加载中...");
......@@ -89,6 +89,66 @@ public class WxLoginPresenter extends BasePresenter<WxLoginView> {
});
}
/**
* 极光一键登录
*/
public void jPushlogin(Context context, String token) {
view.showLoading("加载中...");
HashMap<String, Object> vo = new HashMap<>();
try {
vo.put("shumeiId", ShumeiManager.getInstance().getShumeiDeviceId());
} catch (Exception e) {
e.printStackTrace();
}
vo.put("device", new DeviceUuidFactory(context).getDeviceUuid().toString());
vo.put("loginToken", token);
AppHttpManager.getInstance(loanApplication)
.call(loanService.jPushlogin(vo),
new BaseSubscriber<BaseResponse<UserBean>>() {
@Override
public void onCompleted() {
if (isLinkView()) return;
view.hideLoading();
}
@Override
public void onError(Throwable e) {
if (isLinkView()) return;
view.hideLoading();
view.showToast(e.getMessage());
}
@Override
public void onNext(BaseResponse<UserBean> baseResponse) {
if (isLinkView()) return;
int code = baseResponse.getStatus();
String message = baseResponse.getMessage();
UserBean data = baseResponse.getData();
switch (code) {
case 200://成功
if (data != null) {
UserManager.getInstance().saveUserInfo(data);
consumer = data.getConsumer();
if (consumer != null) {
saveTerminalInfo(context);
}
view.loginSuc();
}
break;
default:
view.showToast(message);
break;
}
}
});
}
/**
* 提交设备信息
*
......
......@@ -91,6 +91,14 @@ public interface LoanService {
@POST("api/v125/wechatlogin")
Observable<BaseResponse<UserBean>> wechatlogin(@Body Map<String, Object> vo);
/**
* 极光一键登录
*
* @return
*/
@POST("api/v125/JPushlogin")
Observable<BaseResponse<UserBean>> jPushlogin(@Body Map<String, Object> vo);
/**
* 注册极光设备
......
......@@ -239,10 +239,7 @@ public class WxLoginActivity extends BaseActivity implements WxLoginView, OnLogi
if (code == 6000) {
//登录成功
// toSuccessActivity(5,token);
showToast("登录成功");
readyGo(MainActivity.class);
wxLoginPresenter.jPushlogin(getContext(), token);
} else if (code != 6002) {
showToast(operator);
}
......
......@@ -44,6 +44,7 @@ import com.mints.highgold.mvp.model.UserTaskMsgBean;
import com.mints.highgold.mvp.model.VedioAdingBean;
import com.mints.highgold.mvp.presenters.LoanPresenter;
import com.mints.highgold.mvp.views.LoanView;
import com.mints.highgold.ui.activitys.AdWebActivity;
import com.mints.highgold.ui.activitys.AwardActivity;
import com.mints.highgold.ui.activitys.FriendsNewActivity;
import com.mints.highgold.ui.activitys.MainActivity;
......@@ -357,7 +358,8 @@ public class MainFragment extends BaseFragment
Bundle bundle;
switch (view.getId()) {
case R.id.tv_fragment_main_whatgold:// 如何赚金币
readyGo(WhatGoldActivity.class);
// readyGo(WhatGoldActivity.class);
readyGo(AdWebActivity.class);
break;
case R.id.rl_fragment_main_redbox:// 红包
readyGo(RedboxActivity.class);
......
package com.mints.highgold.utils;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
public class SystemUtils {
/**
* @param context
* @param packagename
* @return
*/
public static boolean isAppInstalled(Context context, String packagename) {
PackageInfo packageInfo;
try {
packageInfo = context.getPackageManager().getPackageInfo(packagename, PackageManager.GET_UNINSTALLED_PACKAGES);
} catch (PackageManager.NameNotFoundException e) {
packageInfo = null;
e.printStackTrace();
}
if (packageInfo == null) {
//System.out.println("没有安装");
return false;
} else {
//System.out.println("已经安装");
return true;
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<Button
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="跳转"
android:id="@+id/btn"/>
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipe_container"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<com.tencent.smtt.sdk.WebView
android:id="@+id/webview"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
tools:context="com.ns.pipidemo.AdWebActivity">
</com.tencent.smtt.sdk.WebView>
</android.support.v4.widget.SwipeRefreshLayout>
<TextView
android:id="@+id/tv_start_download"
android:layout_width="match_parent"
android:layout_height="44dp"
android:background="#f29445"
android:gravity="center"
android:text="立即下载"
android:textColor="#ffffff"
android:textSize="15sp"
android:visibility="gone"/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment