Compare commits

..

11 Commits

20 changed files with 129 additions and 8 deletions

View File

@@ -60,7 +60,7 @@ android {
if (abi == null) {
abi = "universal"
}
outputFileName = "piko_${buildType.name}_v${defaultConfig.versionName}_${abi}_${date}.apk"
outputFileName = "piko_${buildType.name}_v${defaultConfig.versionName}_${defaultConfig.versionCode}_${abi}_${date}.apk"
}
}

View File

@@ -355,6 +355,24 @@
android:name=".ui.webview.CommonWebViewActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.wallet.PaymentResultActivity"
android:exported="true"
android:launchMode="singleTask"
android:theme="@style/transparent_activity"
android:windowSoftInputMode="adjustPan">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="payment"
android:path="/result"
android:scheme="pekoapp" />
</intent-filter>
</activity>
<activity
android:name=".ui.webview.SimpleWebViewActivity"
android:screenOrientation="portrait" />
@@ -521,7 +539,7 @@
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name=".treasure_box.activity.TreasureBoxActivity"
android:theme="@style/dialog_web_view_activity" />
android:theme="@style/transparent_activity" />
<activity
android:name=".treasure_box.activity.BoxRankingActivity"
android:theme="@style/room_message_activity" />

View File

@@ -620,6 +620,12 @@ public class AVRoomActivity extends BaseMvpActivity<IAvRoomView, AvRoomPresenter
case RoomEvent.MY_SELF_KICK_OUT_ROOM_BY_S_ADMIN:
toBack(true);
break;
case RoomEvent.FAIRY_DRAW_GIFT_L5:
ChatRoomMessage message = roomEvent.getChatRoomMessage();
if (message != null) {
IMNetEaseManager.get().addMessages(message);
}
break;
default:
}
}

View File

@@ -151,8 +151,8 @@ class RoomEffectBoxView @JvmOverloads constructor(
.subscribe { roomEvent: RoomEvent? ->
if (roomEvent == null || AvRoomDataManager.get().isSelfGamePlaying) return@subscribe
when (roomEvent.event) {
RoomEvent.BOX_NOTIFY -> addBoxNotify(roomEvent.chatRoomMessage)
RoomEvent.BOX_NOTIFY_SVGA -> addBoxNotify(roomEvent.chatRoomMessage)
// RoomEvent.BOX_NOTIFY -> addBoxNotify(roomEvent.chatRoomMessage)
// RoomEvent.BOX_NOTIFY_SVGA -> addBoxNotify(roomEvent.chatRoomMessage)
RoomEvent.DATING_ALL_NOTIFY -> addDatingAllNotify(roomEvent.chatRoomMessage)
RoomEvent.RADISH_NOTIFY,
RoomEvent.RADISH_NOTIFY_SVGA -> addRadishNotify(roomEvent.chatRoomMessage)

View File

@@ -32,12 +32,14 @@ import com.netease.nimlib.sdk.chatroom.model.ChatRoomNotificationAttachment
import com.opensource.svgaplayer.*
import com.opensource.svgaplayer.SVGAParser.Companion.shareParser
import com.yizhuan.erban.R
import com.yizhuan.erban.application.XChatApplication
import com.yizhuan.erban.avroom.activity.AVRoomActivity
import com.yizhuan.erban.avroom.bean.RoomPlayBean
import com.yizhuan.erban.avroom.helper.AnimHelper
import com.yizhuan.erban.base.TitleBar
import com.yizhuan.erban.common.svga.SimpleSvgaCallback
import com.yizhuan.erban.databinding.LayoutRoomEffectBinding
import com.yizhuan.erban.treasure_box.activity.TreasureBoxActivity
import com.yizhuan.erban.ui.utils.ImageLoadUtils
import com.yizhuan.erban.ui.utils.isDestroyed
import com.yizhuan.erban.ui.utils.load
@@ -310,7 +312,7 @@ class RoomEffectView @JvmOverloads constructor(
val isPlay = onPlayAnimCallback?.invoke() ?: false
when (messagesPlay[0].event) {
RoomEvent.BOX_NOTIFY -> {//寻爱
if ((mContext as AVRoomActivity).isTopActivity) {
if ((mContext as AVRoomActivity).isTopActivity || XChatApplication.gStack.topActivity is TreasureBoxActivity) {
playNotifyStateLiveData?.value = true
resetPlayNotifyMargin()
showBoxNotify(
@@ -320,7 +322,7 @@ class RoomEffectView @JvmOverloads constructor(
}
RoomEvent.BOX_NOTIFY_SVGA -> {//寻爱
if ((mContext as AVRoomActivity).isTopActivity) {
if ((mContext as AVRoomActivity).isTopActivity || XChatApplication.gStack.topActivity is TreasureBoxActivity) {
playNotifyStateLiveData?.value = true
resetPlayNotifyMargin()
showBoxNotifyBySVGA(messagesPlay.removeAt(0))

View File

@@ -0,0 +1,56 @@
package com.yizhuan.erban.ui.wallet
import android.app.Activity
import android.content.Intent
import android.os.Bundle
import com.chuhai.utils.log.ILog
import com.yizhuan.erban.application.XChatApplication
import com.yizhuan.erban.other.activity.SplashActivity
import com.yizhuan.xchat_android_core.auth.AuthModel
import com.yizhuan.xchat_android_core.pay.PayModel
/**
* Created by Max on 2024/1/31 10:50
* Desc:
**/
class PaymentResultActivity : Activity(), ILog {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
logD("onCreate()")
handler(intent)
}
private fun handler(intent: Intent?) {
val uri = intent?.data
logD("handler() uri:${uri}")
if (XChatApplication.gStack.activityNum == 1) {
logD("handler() open->splash")
SplashActivity.start(this)
finish()
} else {
val status = uri?.getQueryParameter("status")?.toIntOrNull()
logD("handler() status:$status")
val uid = AuthModel.get().currentUid
if (status == 1 && uid != 0L) {
PayModel.get().getWalletInfo(uid).subscribe()
}
}
finish()
}
override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent)
logD("onNewIntent()")
handler(intent)
}
override fun onDestroy() {
super.onDestroy()
logD("onDestroy()")
}
override fun getLogTag(): String {
return super.getLogTag()
}
}

View File

@@ -54,6 +54,7 @@ import com.yizhuan.xchat_android_core.web.bean.WebJsBeanInfo;
import com.yizhuan.xchat_android_core.web.event.WebViewRefreshEvent;
import com.yizhuan.xchat_android_library.rxbus.RxBus;
import com.yizhuan.xchat_android_library.utils.ResUtil;
import com.yizhuan.xchat_android_library.utils.SingleToastUtil;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
@@ -195,6 +196,7 @@ public class CommonWebViewActivity extends BaseActivity implements ShareDialog.O
@SuppressLint("SetJavaScriptEnabled")
private void initData() {
webView.getSettings().setAllowFileAccess(true);
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setUseWideViewPort(true);
webView.getSettings().setLoadWithOverviewMode(true);
@@ -210,14 +212,13 @@ public class CommonWebViewActivity extends BaseActivity implements ShareDialog.O
webView.addJavascriptInterface(jsInterface, "androidJsObj");
webView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
webView.setWebViewClient(new WebViewClient() {
String packageName;
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
Logger.e("shouldOverrideUrlLoading--------" + url);
LogUtil.e("shouldOverrideUrlLoading" + url);
targetUrl = url;
if (url.contains("tel:")) {
//删除直接拨打电话的功能
return true;
@@ -225,6 +226,7 @@ public class CommonWebViewActivity extends BaseActivity implements ShareDialog.O
// ------- 处理结束 -------
if (!(url.startsWith("http") || url.startsWith("https"))) {
handleIntent(url);
return true;
}
@@ -268,6 +270,42 @@ public class CommonWebViewActivity extends BaseActivity implements ShareDialog.O
super.onPageStarted(view, url, favicon);
mProgressBar.setVisibility(View.VISIBLE);
}
private void handleIntent(String url) {
Intent intent;
try {
if (url.startsWith("intent://")) {
//MyCard、Line
intent = Intent.parseUri(url, Intent.URI_INTENT_SCHEME);
packageName = intent.getPackage();
} else { //第三方支付
intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
}
startActivity(intent);
} catch (Exception e) {
handleCatch(e);
}
}
private void handleCatch(Exception ex) {
if (packageName != null) {
toGooglePaly(packageName);
} else {
SingleToastUtil.showToast(ex.getMessage());
}
}
private void toGooglePaly(String packageName) {
try {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + packageName)));
} catch (android.content.ActivityNotFoundException anfe) {
try {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + packageName)));
} catch (Exception e) {
e.printStackTrace();
}
}
}
});
//获取webviewtitle作为titlebar的title
wvcc = new WebChromeClient() {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 KiB

After

Width:  |  Height:  |  Size: 113 KiB

View File

@@ -17,6 +17,7 @@
<item name="android:windowTranslucentStatus">true</item>
<item name="android:statusBarColor" >@color/transparent</item>
<item name="android:windowSplashScreenBackground" tools:targetApi="s">#9168FA</item>
</style>