新增判断 判断是否有google服务

This commit is contained in:
hch
2023-12-08 14:17:36 +08:00
parent d0b7b065b2
commit f8ac4617ed
3 changed files with 22 additions and 8 deletions

View File

@@ -174,6 +174,19 @@ public class GoogleUtils {
}
}
public boolean getGoogleService() {
boolean flag;
try {
Class<?> clz = mActivity.getClassLoader().loadClass("com.shayu.lib_google.utils.GoogleBillingManage");
googlePay = clz.getConstructor(Activity.class).newInstance(mActivity);
flag = (boolean) googlePay.getClass().getMethod("getGoogleService").invoke(googlePay);
} catch (Exception e) {
throw new RuntimeException(e);
}
return flag;
}
public void setFirebaseTokenListener(Activity activity, FirebaseTokenListener firebaseTokenListener) {
Timer timer = new Timer();
TimerTask task = new TimerTask() {