调整代码中包名获取方式

681送审版本
This commit is contained in:
zlzw 2024-08-22 10:04:55 +08:00
parent 38f3b721e0
commit daf881f6a7
6 changed files with 14 additions and 14 deletions

View File

@ -22,7 +22,7 @@
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="com.newpdlive.sy.fileprovider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data

View File

@ -397,15 +397,15 @@ public class CommonHttpUtil {
* 谷歌支付成功后通知自己服务器
*/
public static void notifyMeGoogle(String purchaseToken, String productId, String orderno, HttpCallback callback) {
HttpClient.getInstance().get(CommonHttpConsts.NOTIFY_GOOGLE, CommonHttpConsts.NOTIFY_GOOGLE).params("purchaseToken", purchaseToken).params("productId", productId).params("orderno", orderno).params("package_name", "com.newpdlive.sy").execute(callback);
HttpClient.getInstance().get(CommonHttpConsts.NOTIFY_GOOGLE, CommonHttpConsts.NOTIFY_GOOGLE).params("purchaseToken", purchaseToken).params("productId", productId).params("orderno", orderno).params("package_name", AppManager.getInstance().getMainActivity().getPackageName()).execute(callback);
}
public static void notifyGoogle(String purchaseToken, String orderNo, String tradeNo, String allData, String gps_adid, HttpCallback callback) {
HttpClient.getInstance().get(CommonHttpConsts.NOTIFY_GOOGLE, CommonHttpConsts.NOTIFY_GOOGLE).params("purchaseToken", purchaseToken).params("orderno", orderNo).params("trade_no", tradeNo).params("allData", allData).params("gps_adid", gps_adid).params("package_name", "com.newpdlive.sy").execute(callback);
HttpClient.getInstance().get(CommonHttpConsts.NOTIFY_GOOGLE, CommonHttpConsts.NOTIFY_GOOGLE).params("purchaseToken", purchaseToken).params("orderno", orderNo).params("trade_no", tradeNo).params("allData", allData).params("gps_adid", gps_adid).params("package_name", AppManager.getInstance().getMainActivity().getPackageName()).execute(callback);
}
public static void Google_sec_pay(String purchaseToken, String orderNo, String tradeNo, HttpCallback callback) {
HttpClient.getInstance().get("Charge.Google_sec_pay", "Charge.Google_sec_pay").params("purchaseToken", purchaseToken).params("orderno", orderNo).params("trade_no", tradeNo).params("package_name", "com.newpdlive.sy").execute(callback);
HttpClient.getInstance().get("Charge.Google_sec_pay", "Charge.Google_sec_pay").params("purchaseToken", purchaseToken).params("orderno", orderNo).params("trade_no", tradeNo).params("package_name", AppManager.getInstance().getMainActivity().getPackageName()).execute(callback);
}
public static void notifySamsung(String purchaseId, String selfOrderId,HttpCallback callback) {

View File

@ -83,7 +83,7 @@ public class ProcessImageUtil extends ProcessResultUtil {
if (mNeedCrop) {
Uri uri = null;
if (Build.VERSION.SDK_INT >= 24) {
uri = FileProvider.getUriForFile(mContext, "com.newpdlive.sy.fileprovider", mCameraResult);
uri = FileProvider.getUriForFile(mContext, mContext.getPackageName()+".fileprovider", mCameraResult);
} else {
uri = Uri.fromFile(mCameraResult);
}
@ -195,7 +195,7 @@ public class ProcessImageUtil extends ProcessResultUtil {
mCameraResult = getNewFile();
Uri uri = null;
if (Build.VERSION.SDK_INT >= 24) {
uri = FileProvider.getUriForFile(mContext, "com.newpdlive.sy.fileprovider", mCameraResult);
uri = FileProvider.getUriForFile(mContext, mContext.getPackageName()+".fileprovider", mCameraResult);
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
} else {
uri = Uri.fromFile(mCameraResult);
@ -255,7 +255,7 @@ public class ProcessImageUtil extends ProcessResultUtil {
startActivityForResult(intent, mCropResultCallback);
} catch (Exception e) {
try {
Uri resultUri = FileProvider.getUriForFile(mContext, "com.newpdlive.sy.fileprovider", mCorpResult);
Uri resultUri = FileProvider.getUriForFile(mContext, mContext.getPackageName()+".fileprovider", mCorpResult);
if (resultUri == null || mFragment == null || mContext == null) {
return;
}

View File

@ -63,7 +63,7 @@ public class VersionUtil {
@Override
public void onConfirmClick(Dialog dialog, String content) {
Intent i = new Intent(android.content.Intent.ACTION_VIEW);
i.setData(Uri.parse("https://play.google.com/store/apps/details?id=com.newpdlive.sy"));
i.setData(Uri.parse("https://play.google.com/store/apps/details?id="+context.getPackageName()));
context.startActivity(i);
context.finish();
}
@ -85,7 +85,7 @@ public class VersionUtil {
@Override
public void onConfirmClick(Dialog dialog, String content) {
Intent i = new Intent(android.content.Intent.ACTION_VIEW);
i.setData(Uri.parse("https://play.google.com/store/apps/details?id=com.newpdlive.sy"));
i.setData(Uri.parse("https://play.google.com/store/apps/details?id="+context.getPackageName()));
context.startActivity(i);
context.finish();
}

View File

@ -125,15 +125,15 @@ public class APKUpdateCustomPopup extends CenterPopupView {
public void onViewClicks() {
if (CommonAppConfig.IS_GOOGLE_PLAY == 1) {
Intent i = new Intent(android.content.Intent.ACTION_VIEW);
i.setData(Uri.parse("https://play.google.com/store/apps/details?id=com.newpdlive.sy"));
i.setData(Uri.parse("https://play.google.com/store/apps/details?id="+mContext.getPackageName()));
mContext.startActivity(i);
mContext.finish();
} else if (CommonAppConfig.IS_GOOGLE_PLAY == 2) {
//华为
launchHwAppDetail(mContext, "com.newpdlive.sy", "com.huawei.appmarket");
launchHwAppDetail(mContext, mContext.getPackageName(), "com.huawei.appmarket");
} else if (CommonAppConfig.IS_GOOGLE_PLAY == 3) {
//三星
launchSmAppDetail(mContext, "com.newpdlive.sy", "com.sec.android.app.samsungapps");
launchSmAppDetail(mContext, mContext.getPackageName(), "com.sec.android.app.samsungapps");
} else {
versionImmediateUse.setVisibility(GONE);
updateLine.setVisibility(VISIBLE);

View File

@ -4,8 +4,8 @@ ext {
buildToolsVersion: "29.0.2",
minSdkVersion : 23,
targetSdkVersion : 34,
versionCode : 664,
versionName : "6.6.1"
versionCode : 694,
versionName : "6.8.1"
]
manifestPlaceholders = [
//