包名为获取 非写死

This commit is contained in:
ningwenqiang 2024-09-05 18:10:08 +08:00
parent c4a24be6f7
commit 55b53fb955
7 changed files with 13 additions and 13 deletions

View File

@ -4,7 +4,7 @@
>
<queries>
<package android:name="com.newpandora.yo"/>
<package android:name="${applicationId}"/>
<package android:name="com.facebook.orca"/>
<package

View File

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

View File

@ -417,7 +417,7 @@ public class CommonHttpUtil {
.params("purchaseToken", purchaseToken)
.params("productId", productId)
.params("orderno", orderno)
.params("package_name", "com.newpandora.yo")
.params("package_name", CommonAppContext.sInstance.getPackageName())
.execute(callback);
}
@ -425,7 +425,7 @@ public class CommonHttpUtil {
HttpClient.getInstance().get(CommonHttpConsts.NOTIFY_GOOGLE, CommonHttpConsts.NOTIFY_GOOGLE)
.params("purchaseToken", purchaseToken)
.params("productId", productId)
.params("package_name", "com.newpandora.yo")
.params("package_name", CommonAppContext.sInstance.getPackageName())
.execute(callback);
}
@ -434,7 +434,7 @@ public class CommonHttpUtil {
.params("purchaseToken", purchaseToken)
.params("orderno", orderNo)
.params("trade_no", tradeNo)
.params("package_name", "com.newpandora.yo")
.params("package_name", CommonAppContext.sInstance.getPackageName())
.execute(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.newpandora.yo.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.newpandora.yo.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.newpandora.yo.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.newpandora.yo"));
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.newpandora.yo"));
i.setData(Uri.parse("https://play.google.com/store/apps/details?id="+context.getPackageName()));
context.startActivity(i);
context.finish();
}

View File

@ -128,7 +128,7 @@ 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.newpandora.yo"));
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) {

View File

@ -24,6 +24,6 @@ android.nonTransitiveRClass=false
systemProp.http.proxyHost=127.0.0.1
systemProp.https.proxyHost=127.0.0.1
systemProp.https.proxyPort=10809
systemProp.http.proxyPort=10809
systemProp.https.proxyPort=9098
systemProp.http.proxyPort=9098
android.enableR8.fullMode=true