|
@@ -1,6 +1,7 @@
|
|
|
package com.haochuan.dudutoy;
|
|
|
|
|
|
import android.app.Activity;
|
|
|
+import android.app.ActivityManager;
|
|
|
import android.app.AlertDialog;
|
|
|
import android.app.ProgressDialog;
|
|
|
import android.content.DialogInterface;
|
|
@@ -9,6 +10,7 @@ import android.graphics.drawable.AnimationDrawable;
|
|
|
import android.os.Build;
|
|
|
import android.os.Bundle;
|
|
|
import android.support.annotation.NonNull;
|
|
|
+import android.support.v4.content.ContextCompat;
|
|
|
import android.util.Log;
|
|
|
import android.view.KeyEvent;
|
|
|
import android.view.View;
|
|
@@ -40,6 +42,8 @@ import com.sdk.commplatform.listener.CallbackListener;
|
|
|
|
|
|
import org.json.JSONObject;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
public class MainActivity extends Activity {
|
|
|
|
|
|
String TAG = "HuaweiPay";
|
|
@@ -53,6 +57,9 @@ public class MainActivity extends Activity {
|
|
|
|
|
|
boolean enableLogger = false;
|
|
|
|
|
|
+ String intentUrl = "";
|
|
|
+ boolean hasIntentUrl = false;
|
|
|
+
|
|
|
private void Logger(String msg){
|
|
|
if(enableLogger){
|
|
|
Log.d(TAG,msg);
|
|
@@ -67,12 +74,14 @@ public class MainActivity extends Activity {
|
|
|
|
|
|
private H5Result h5Result = new H5Result() {
|
|
|
@Override
|
|
|
- public void videoPlay(String url,String title,String uId,String sourceId) {
|
|
|
+ public void videoPlay(String url,String title,String uId,String sourceId,int vipState,int isFee) {
|
|
|
Intent intent = new Intent(MainActivity.this,VideoPlayerActivity.class);
|
|
|
intent.putExtra("url",url);
|
|
|
intent.putExtra("title",title);
|
|
|
intent.putExtra("uId",uId);
|
|
|
intent.putExtra("sourceId",sourceId);
|
|
|
+ intent.putExtra("vipState",vipState);
|
|
|
+ intent.putExtra("isFee",isFee);
|
|
|
MainActivity.this.startActivityForResult(intent,requestPlayCode);
|
|
|
}
|
|
|
};
|
|
@@ -83,7 +92,6 @@ public class MainActivity extends Activity {
|
|
|
Toast("计费成功" );
|
|
|
Logger("计费成功");
|
|
|
authAfterPay();
|
|
|
-
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -100,6 +108,7 @@ public class MainActivity extends Activity {
|
|
|
Logger("计费返回");
|
|
|
Logger("开始鉴权");
|
|
|
|
|
|
+ Log.d(TAG,(isPlayPay?"当前订购页":"当前不是订购页")+ ";计费返回");
|
|
|
HuaweiPay.getInstance().authForMonth(new CallbackListener<AuthResult>() {
|
|
|
@Override
|
|
|
public void callback(int i, AuthResult authResult) {
|
|
@@ -122,7 +131,7 @@ public class MainActivity extends Activity {
|
|
|
}else{
|
|
|
Logger("不跳转到主页");
|
|
|
}
|
|
|
-
|
|
|
+ isPlayPay = false;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -150,6 +159,7 @@ public class MainActivity extends Activity {
|
|
|
@Override
|
|
|
public void run() {
|
|
|
String url = transUrl(MainActivity.this.backUrl);
|
|
|
+ Log.d(TAG,"跳转到主页,url:"+url);
|
|
|
webview.loadUrl(url);
|
|
|
}
|
|
|
});
|
|
@@ -183,14 +193,31 @@ public class MainActivity extends Activity {
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
super.onCreate(savedInstanceState);
|
|
|
setContentView(R.layout.activity_main);
|
|
|
+ Intent intent = getIntent();
|
|
|
+ if(intent != null){
|
|
|
+ if(intent.hasExtra("data")){
|
|
|
+ String jsonData = intent.getStringExtra("data");
|
|
|
+ try{
|
|
|
+ JSONObject object = new JSONObject(jsonData);
|
|
|
+ if(object.has("linkUrl")){
|
|
|
+ intentUrl = object.getString("linkUrl");
|
|
|
+ hasIntentUrl = true;
|
|
|
+ }
|
|
|
+ }catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
FrameLayout frameLayout = findViewById(R.id.webview_container);
|
|
|
webview = new WebView(this);
|
|
|
+ webview.setLayerType(View.LAYER_TYPE_SOFTWARE,null);
|
|
|
frameLayout.addView(webview,new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,ViewGroup.LayoutParams.MATCH_PARENT));
|
|
|
webview.setVisibility(View.INVISIBLE);
|
|
|
pageLoadingAnim = findViewById(R.id.loading_anim);
|
|
|
initLoadingAnimation();
|
|
|
prepare();
|
|
|
|
|
|
+
|
|
|
}
|
|
|
|
|
|
public void saveLoginUser(String userId){
|
|
@@ -227,10 +254,34 @@ public class MainActivity extends Activity {
|
|
|
|
|
|
|
|
|
private void loadH5Url(){
|
|
|
- String url = "http://202.99.114.74:56199/h5/toymallapp/index.html?is_vip=%s&uid=%s";
|
|
|
+ Log.d(TAG,"开始加载页面");
|
|
|
+ String url = "http://202.99.114.74:56199/h5/toymallapk/index.html";
|
|
|
url = String.format(url,new LocalStore(MainActivity.this).getIsVip(),userId);
|
|
|
+ if(hasIntentUrl){
|
|
|
+ url = intentUrl;
|
|
|
+ }
|
|
|
webview.getSettings().setJavaScriptEnabled(true);
|
|
|
webview.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
|
|
|
+ webview.getSettings().setAppCacheEnabled(false);
|
|
|
+ webview.getSettings().setDomStorageEnabled(true);
|
|
|
+
|
|
|
+ // 清缓存和记录,缓存引起的白屏
|
|
|
+ webview.clearCache(true);
|
|
|
+ webview.clearHistory();
|
|
|
+
|
|
|
+ webview.requestFocus();
|
|
|
+ WebSettings webSettings = webview.getSettings();
|
|
|
+ webSettings.setDatabaseEnabled(true);
|
|
|
+ // 缓存白屏
|
|
|
+ String appCachePath = getApplicationContext().getCacheDir()
|
|
|
+ .getAbsolutePath() + "/webcache";
|
|
|
+ // 设置 Application Caches 缓存目录
|
|
|
+ webSettings.setAppCachePath(appCachePath);
|
|
|
+ webSettings.setDatabasePath(appCachePath);
|
|
|
+
|
|
|
+ webview.setBackgroundColor(ContextCompat.getColor(this,android.R.color.transparent));
|
|
|
+ webview.setBackgroundResource(R.color.black);
|
|
|
+
|
|
|
webview.setWebChromeClient(new WebChromeClient() {
|
|
|
@Override
|
|
|
public void onProgressChanged(WebView view, int progress) {
|
|
@@ -242,6 +293,7 @@ public class MainActivity extends Activity {
|
|
|
public void onPageFinished(WebView view, String url)
|
|
|
{
|
|
|
super.onPageFinished(view, url);
|
|
|
+ Log.d(TAG,"webview加载完成");
|
|
|
stopLoadingAnimation();
|
|
|
webview.setVisibility(View.VISIBLE);
|
|
|
}
|
|
@@ -256,6 +308,65 @@ public class MainActivity extends Activity {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ /* private boolean isHeNanUser(String userId){
|
|
|
+ String[] strs = userId.split("_");
|
|
|
+ if(strs.length>1){
|
|
|
+ return strs[1].equals("204");
|
|
|
+ }else{
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+*/
|
|
|
+ private void checkArea(String userId,final UserCheck listener){
|
|
|
+ String url = new UrlManager().getCheckAreaUrl(userId);
|
|
|
+ Volley.newRequestQueue(this).add(new JsonObjectRequest(url, null, new Response.Listener<JSONObject>() {
|
|
|
+ @Override
|
|
|
+ public void onResponse(JSONObject response) {
|
|
|
+ try{
|
|
|
+ if(response.has("code")){
|
|
|
+ int code = response.getInt("code");
|
|
|
+ if(code == 0){
|
|
|
+ if(response.has("data")){
|
|
|
+ JSONObject data = response.getJSONObject("data");
|
|
|
+ if(data.has("order_type")){
|
|
|
+ int orderType = data.getInt("order_type");
|
|
|
+ switch (orderType){
|
|
|
+ case 10:
|
|
|
+ listener.isHuTongArea(true);
|
|
|
+ break;
|
|
|
+ case -10:
|
|
|
+ listener.isHuTongArea(false);
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ listener.isHuTongArea(false);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ listener.isHuTongArea(false);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ listener.isHuTongArea(false);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ listener.isHuTongArea(false);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ listener.isHuTongArea(false);
|
|
|
+ }
|
|
|
+ }catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
+ listener.isHuTongArea(false);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }, new Response.ErrorListener() {
|
|
|
+ @Override
|
|
|
+ public void onErrorResponse(VolleyError error) {
|
|
|
+ listener.isHuTongArea(false);
|
|
|
+ }
|
|
|
+ }));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
private void prepare(){
|
|
|
HuaweiPay.getInstance().init(this, new CallbackListener<Integer>()
|
|
|
{
|
|
@@ -264,67 +375,83 @@ public class MainActivity extends Activity {
|
|
|
{
|
|
|
switch (paramInt){
|
|
|
case ErrorCode.COM_PLATFORM_SUCCESS:
|
|
|
- //Toast("初始化成功");
|
|
|
- HuaweiPay.getInstance().authForMonth(new CallbackListener<AuthResult>() {
|
|
|
+ Toast("初始化成功");
|
|
|
+ userId = HuaweiPay.getInstance().getUserId();
|
|
|
+ Log.d(TAG,"获取userId:" + userId);
|
|
|
+ Toast("获取userId:" + userId);
|
|
|
+ //saveLoginUser(userId);
|
|
|
+ //判断该地区需不需要订购互通
|
|
|
+ Auth();
|
|
|
+ /* checkArea(userId, new UserCheck() {
|
|
|
@Override
|
|
|
- public void callback(int i, AuthResult authResult) {
|
|
|
- switch (i){
|
|
|
- case ErrorCode.COM_PLATFORM_SUCCESS:
|
|
|
- new LocalStore(MainActivity.this).saveIsVip(true);
|
|
|
- if(authResult!=null){
|
|
|
- Toast(authResult.description);
|
|
|
- Log.i(TAG,authResult.description);
|
|
|
+ public void isHuTongArea(Boolean result) {
|
|
|
+ if(result){
|
|
|
+ //判断linux平台是不是会员
|
|
|
+ Log.d(TAG,"该地区需要订购互通");
|
|
|
+ String url = new UrlManager().getHeNanVipStateUrl(userId);
|
|
|
+ Volley.newRequestQueue(MainActivity.this).add(new JsonObjectRequest(url, null, new Response.Listener<JSONObject>() {
|
|
|
+ @Override
|
|
|
+ public void onResponse(JSONObject response) {
|
|
|
+ if(response.has("data")){
|
|
|
+ try{
|
|
|
+ int data = response.getInt("data");
|
|
|
+ switch(data){
|
|
|
+ case 1:
|
|
|
+ Log.d(TAG,"是linux会员");
|
|
|
+ new LocalStore(MainActivity.this).saveIsVip(true);
|
|
|
+ runH5();
|
|
|
+ break;
|
|
|
+ case -1:
|
|
|
+ Log.d(TAG,"不是linux会员");
|
|
|
+ Auth();
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ Log.d(TAG,"其他");
|
|
|
+ Auth();
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
+ Auth();
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- runH5();
|
|
|
- break;
|
|
|
- case ErrorCode.COM_PLATFORM_ERROR_PARAM:
|
|
|
- new LocalStore(MainActivity.this).saveIsVip(false);
|
|
|
- if(authResult!=null){
|
|
|
- getBuyProductId(authResult);
|
|
|
+ }, new Response.ErrorListener() {
|
|
|
+ @Override
|
|
|
+ public void onErrorResponse(VolleyError error) {
|
|
|
+ error.printStackTrace();
|
|
|
+ Auth();
|
|
|
}
|
|
|
- runH5();
|
|
|
- Log.i(TAG,"参数错误,errorcode:" + paramInt);
|
|
|
- break;
|
|
|
- case ErrorCode.COM_PLATFORM_ERROR_UNKNOWN:
|
|
|
- new LocalStore(MainActivity.this).saveIsVip(false);
|
|
|
- if(authResult!=null){
|
|
|
- getBuyProductId(authResult);
|
|
|
- }
|
|
|
- runH5();
|
|
|
- Log.i(TAG,"SDK未初始化及其它错误,errorcode:" + paramInt);
|
|
|
- break;
|
|
|
- default:
|
|
|
- new LocalStore(MainActivity.this).saveIsVip(false);
|
|
|
- if(authResult!=null){
|
|
|
- getBuyProductId(authResult);
|
|
|
- }
|
|
|
- runH5();
|
|
|
- Log.i(TAG,"其他错误,errorcode:" + paramInt);
|
|
|
- break;
|
|
|
+ }));
|
|
|
+ }else{
|
|
|
+ Auth();
|
|
|
}
|
|
|
}
|
|
|
- });
|
|
|
- userId = HuaweiPay.getInstance().getUserId();
|
|
|
- saveLoginUser(userId);
|
|
|
+ });*/
|
|
|
+
|
|
|
break;
|
|
|
case ErrorCode.COM_PLATFORM_ERROR_ONLINE_CHECK_FAILURE:
|
|
|
Log.i(TAG,"无网络");
|
|
|
CrashHandler.getInstance().saveCrashInfoToWeb("初始化失败,无网络");
|
|
|
+ Toast("初始化失败:无网络" );
|
|
|
onInitFail();
|
|
|
break;
|
|
|
case ErrorCode.COM_PLATFORM_ERROR_FORCE_CLOSE:
|
|
|
Log.i(TAG,"初始化异常,强制退出");
|
|
|
CrashHandler.getInstance().saveCrashInfoToWeb("初始化异常,强制退出");
|
|
|
+ Toast("初始化失败:强制退出" );
|
|
|
onInitFail();
|
|
|
break;
|
|
|
case ErrorCode.COM_PLATFORM_ERROR_TIME_OUT:
|
|
|
//Toast(MainActivity.this,"网络超时:" + paramInt);
|
|
|
Log.i(TAG,"网络超时");
|
|
|
+ Toast("初始化失败:网络超时" );
|
|
|
CrashHandler.getInstance().saveCrashInfoToWeb("初始化失败,网络超时");
|
|
|
onInitFail();
|
|
|
break;
|
|
|
default:
|
|
|
Log.i(TAG,"其他错误:" + paramInt);
|
|
|
+ Toast("初始化失败:其他错误" );
|
|
|
CrashHandler.getInstance().saveCrashInfoToWeb("初始化失败,其他错误:" + paramInt);
|
|
|
onInitFail();
|
|
|
break;
|
|
@@ -333,9 +460,54 @@ public class MainActivity extends Activity {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ private void Auth(){
|
|
|
+ HuaweiPay.getInstance().authForMonth(new CallbackListener<AuthResult>() {
|
|
|
+ @Override
|
|
|
+ public void callback(int i, AuthResult authResult) {
|
|
|
+ switch (i){
|
|
|
+ case ErrorCode.COM_PLATFORM_SUCCESS:
|
|
|
+ Log.d(TAG,"是安卓会员");
|
|
|
+ new LocalStore(MainActivity.this).saveIsVip(true);
|
|
|
+ if(authResult!=null){
|
|
|
+ Toast(authResult.description);
|
|
|
+ Log.i(TAG,authResult.description);
|
|
|
+ }
|
|
|
+ runH5();
|
|
|
+ break;
|
|
|
+ case ErrorCode.COM_PLATFORM_ERROR_PARAM:
|
|
|
+ Log.d(TAG,"不是安卓会员");
|
|
|
+ new LocalStore(MainActivity.this).saveIsVip(false);
|
|
|
+ if(authResult!=null){
|
|
|
+ getBuyProductId(authResult);
|
|
|
+ }
|
|
|
+ runH5();
|
|
|
+ Log.i(TAG,"参数错误,errorcode:" + i);
|
|
|
+ break;
|
|
|
+ case ErrorCode.COM_PLATFORM_ERROR_UNKNOWN:
|
|
|
+ Log.d(TAG,"不是安卓会员");
|
|
|
+ new LocalStore(MainActivity.this).saveIsVip(false);
|
|
|
+ if(authResult!=null){
|
|
|
+ getBuyProductId(authResult);
|
|
|
+ }
|
|
|
+ runH5();
|
|
|
+ Log.i(TAG,"SDK未初始化及其它错误,errorcode:" + i);
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ Log.d(TAG,"不是安卓会员");
|
|
|
+ new LocalStore(MainActivity.this).saveIsVip(false);
|
|
|
+ if(authResult!=null){
|
|
|
+ getBuyProductId(authResult);
|
|
|
+ }
|
|
|
+ runH5();
|
|
|
+ Log.i(TAG,"其他错误,errorcode:" + i);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
private void onInitFail(){
|
|
|
- new AlertDialog.Builder(this)
|
|
|
+ /* new AlertDialog.Builder(this)
|
|
|
.setMessage("初始化失败,点击'确定'退出")
|
|
|
.setPositiveButton("确定",new DialogInterface.OnClickListener(){
|
|
|
|
|
@@ -343,7 +515,13 @@ public class MainActivity extends Activity {
|
|
|
public void onClick(DialogInterface dialog, int which) {
|
|
|
MainActivity.this.finish();
|
|
|
}
|
|
|
- }).show();
|
|
|
+ }).show();*/
|
|
|
+ runOnUiThread(new Runnable() {
|
|
|
+ @Override
|
|
|
+ public void run() {
|
|
|
+ runH5();
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
private void getBuyProductId(@NonNull AuthResult authResult){
|
|
@@ -425,14 +603,19 @@ public class MainActivity extends Activity {
|
|
|
}
|
|
|
|
|
|
@JavascriptInterface
|
|
|
- public void play(final String url,final String title,final String sourceId){
|
|
|
- listener.videoPlay(url,title,userId,sourceId);
|
|
|
+ public String getUserId(){
|
|
|
+ return HuaweiPay.getInstance().getUserId();
|
|
|
+ }
|
|
|
+
|
|
|
+ @JavascriptInterface
|
|
|
+ public void play(final String url,final String title,final String sourceId,int vipState,int isFee){
|
|
|
+ listener.videoPlay(url,title,userId,sourceId,vipState,isFee);
|
|
|
}
|
|
|
|
|
|
@JavascriptInterface
|
|
|
public void pay(String backUrl){
|
|
|
//Toast.makeText(MainActivity.this,"开始计费",Toast.LENGTH_SHORT).show();
|
|
|
- Log.d(TAG,"限时订购计费");
|
|
|
+ Log.d(TAG,"限时订购计费,backUrl:" + backUrl);
|
|
|
MainActivity.this.backUrl = backUrl;
|
|
|
gotoPayActivity(userId,buyProductId);
|
|
|
}
|
|
@@ -445,19 +628,7 @@ public class MainActivity extends Activity {
|
|
|
@JavascriptInterface
|
|
|
public void exit(){
|
|
|
//todo run in ui thread
|
|
|
- new AlertDialog.Builder(MainActivity.this)
|
|
|
- .setMessage("确认退出!")
|
|
|
- .setPositiveButton("继续观看", new DialogInterface.OnClickListener() {
|
|
|
- @Override
|
|
|
- public void onClick(DialogInterface dialog, int which) {
|
|
|
-
|
|
|
- }
|
|
|
- }).setNegativeButton("立即退出", new DialogInterface.OnClickListener() {
|
|
|
- @Override
|
|
|
- public void onClick(DialogInterface dialog, int which) {
|
|
|
- MainActivity.this.finish();
|
|
|
- }
|
|
|
- }).show();
|
|
|
+ onExit();
|
|
|
}
|
|
|
|
|
|
@JavascriptInterface
|
|
@@ -480,11 +651,47 @@ public class MainActivity extends Activity {
|
|
|
Logger("vipState:" + (vipState?"是":"否"));
|
|
|
return vipState?1:-1;
|
|
|
}
|
|
|
+
|
|
|
+ @JavascriptInterface
|
|
|
+ public void cancelCyclePay(String tradeNo){
|
|
|
+ HuaweiPay.getInstance().unSubscribe(MainActivity.this, tradeNo, new CallbackListener<PayResult>() {
|
|
|
+ @Override
|
|
|
+ public void callback(int i, PayResult payResult) {
|
|
|
+ if(i == ErrorCode.COM_PLATFORM_SUCCESS){
|
|
|
+ MainActivity.this.runOnUiThread(new Runnable() {
|
|
|
+ @Override
|
|
|
+ public void run() {
|
|
|
+ Toast.makeText(MainActivity.this,"取消订购平台已受理",Toast.LENGTH_SHORT).show();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ Log.i("TestUnsubscribe","取消订购失败:" + i);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ private void onExit(){
|
|
|
+ //GameInterface.exit();
|
|
|
+ this.finish();
|
|
|
+ /* Intent intent = new Intent(Intent.ACTION_MAIN);
|
|
|
+ intent.addCategory(Intent.CATEGORY_HOME);
|
|
|
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
|
+ startActivity(intent);*/
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ private void killOriginProcess(){
|
|
|
+ ActivityManager am = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
|
|
|
+ List<ActivityManager.RunningAppProcessInfo> runningAppProcessInfos = am.getRunningAppProcesses();
|
|
|
+ //Log.d("djbl","index 0 pacagename:" + runningAppProcessInfos.get(0).processName);
|
|
|
+ am.killBackgroundProcesses("com.haochuan.dudutoy");
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
protected void onDestroy(){
|
|
|
//清空所有Cookie
|
|
|
+ Log.d(TAG,"页面退出");
|
|
|
CookieSyncManager.createInstance(this); //Create a singleton CookieSyncManager within a context
|
|
|
CookieManager cookieManager = CookieManager.getInstance(); // the singleton CookieManager instance
|
|
|
cookieManager.removeAllCookie();// Removes all cookies.
|
|
@@ -510,8 +717,8 @@ public class MainActivity extends Activity {
|
|
|
}
|
|
|
|
|
|
HuaweiPay.getInstance().onDestroy();
|
|
|
+ killOriginProcess();
|
|
|
super.onDestroy();
|
|
|
-
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -584,13 +791,17 @@ public class MainActivity extends Activity {
|
|
|
}
|
|
|
|
|
|
public interface H5Result {
|
|
|
- public void videoPlay(String url,String title,String uId,String sourceId);
|
|
|
+ public void videoPlay(String url,String title,String uId,String sourceId,int vipState,int isFee);
|
|
|
}
|
|
|
|
|
|
public interface MyPayResult{
|
|
|
public void onSuccess();
|
|
|
public void onFail(String msg);
|
|
|
}
|
|
|
+
|
|
|
+ public interface UserCheck{
|
|
|
+ public void isHuTongArea(Boolean result);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|