Commit f8fed3fd authored by wangxuewei's avatar wangxuewei

[提交人]:王雪伟

[提交简述] :幸福农场
[实现方案] :加入广告
parent a4d3a63b
...@@ -124,7 +124,6 @@ interface IGameApi { ...@@ -124,7 +124,6 @@ interface IGameApi {
*/ */
@POST(NetConfig.Game.URL_GAME_INCR_SEED) @POST(NetConfig.Game.URL_GAME_INCR_SEED)
fun getVideoSeedReceive(@Query("id") id: Int): Observable<Response<StatusEntity>> fun getVideoSeedReceive(@Query("id") id: Int): Observable<Response<StatusEntity>>
/** /**
* 看视频获得加速剂 * 看视频获得加速剂
* @param * @param
...@@ -132,15 +131,25 @@ interface IGameApi { ...@@ -132,15 +131,25 @@ interface IGameApi {
* @return * @return
*/ */
@POST(NetConfig.Game.URL_GAME_INCR_ACCELERATORS) @POST(NetConfig.Game.URL_GAME_INCR_ACCELERATORS)
fun getVideoAcceleratorsReceive(): Observable<Response<StatusEntity>> fun getVideoAcceleratorsReceive(@Query("id") id: Int): Observable<Response<StatusEntity>>
/** /**
* 看视频获得加速剂 * 开宝箱
* @param * @param
* @paramq * @paramq
* @return * @return
*/ */
@POST(NetConfig.Game.URL_GAME_OPEN_BOX) @POST(NetConfig.Game.URL_GAME_OPEN_BOX)
fun getopenBox(): Observable<Response<StatusEntity>> fun getopenBox(): Observable<Response<StatusEntity>>
fun getVideoAcceleratorsReceive(@Query("id") id: Int): Observable<Response<StatusEntity>>
/**
* 看视频上报
* @param
* @paramq
* @return
*/
@POST(NetConfig.Game.URL_GAME_AD_VIDEO_REPORT)
fun adVideoReport(): Observable<Response<StatusEntity>>
} }
\ No newline at end of file
...@@ -234,6 +234,7 @@ public class NetConfig { ...@@ -234,6 +234,7 @@ public class NetConfig {
public static class Game{ public static class Game{
public static final String URL_GAME_AD_VIDEO_REPORT="app/v1/game/report";//看视频上报 public static final String URL_GAME_AD_VIDEO_REPORT="app/v1/game/report";//看视频上报
public static final String URL_GAME_BUY_SEED="app/v1/game/farm/buy_seed";//金币购买种子 public static final String URL_GAME_BUY_SEED="app/v1/game/farm/buy_seed";//金币购买种子
public static final String URL_GAME_CLOUD_SPEED="app/v1/game/farm/cloud_speed";//云朵加速 public static final String URL_GAME_CLOUD_SPEED="app/v1/game/farm/cloud_speed";//云朵加速
public static final String URL_GAME_DO_WD="app/v1/game/farm/do_wd";//发起提现 public static final String URL_GAME_DO_WD="app/v1/game/farm/do_wd";//发起提现
......
...@@ -79,28 +79,6 @@ public class PermissionsActivity extends Activity { ...@@ -79,28 +79,6 @@ public class PermissionsActivity extends Activity {
isRequireCheck = true; isRequireCheck = true;
} }
private void createDialog() {
alertBuilder = new AlertDialog.Builder(this)
.setTitle(R.string.permission_help)
.setNegativeButton(R.string.permission_quit, (dialog, which) -> {
setResult(PERMISSIONS_DENIED);
isAlertDialogShow = false;
finish();
})
.setPositiveButton(R.string.permission_setting, (dialog, which) -> {
isAlertDialogShow = false;
dialog.dismiss();
startAppSettings();
})
.setOnKeyListener((dialog, keyCode, event) -> {
if (keyCode == KeyEvent.KEYCODE_BACK) {
return true;
}
return false;
})
.setCancelable(false);
}
// 启动应用的设置 // 启动应用的设置
private void startAppSettings() { private void startAppSettings() {
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
......
...@@ -213,7 +213,6 @@ object ToponManager { ...@@ -213,7 +213,6 @@ object ToponManager {
override fun onRewardedVideoAdPlayEnd(entity: ATAdInfo) { override fun onRewardedVideoAdPlayEnd(entity: ATAdInfo) {
listener.onRewardedVideoAdPlayEnd(entity) listener.onRewardedVideoAdPlayEnd(entity)
//移除本次并预加载 //移除本次并预加载
mRewardVideoAd?.show(activity)
AdMap.aTRewardVideoAdMap.remove(placementId) AdMap.aTRewardVideoAdMap.remove(placementId)
AdMap.aTRewardVideoAdMap[placementId] = AdMap.aTRewardVideoAdMap[placementId] =
preloadingLoadReward(activity, placementId) preloadingLoadReward(activity, placementId)
...@@ -256,6 +255,7 @@ object ToponManager { ...@@ -256,6 +255,7 @@ object ToponManager {
Toast.makeText(activity, "看完视频即可获得奖励", Toast.LENGTH_SHORT).show() Toast.makeText(activity, "看完视频即可获得奖励", Toast.LENGTH_SHORT).show()
isShowToast = false isShowToast = false
} }
mRewardVideoAd?.show(activity)
Log.i(TAG, "isAdReady = true") Log.i(TAG, "isAdReady = true")
removeCallbacksAndMessages(null) removeCallbacksAndMessages(null)
} else { } else {
......
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