Google Play Upload declined due to Android Pay Error

Hello,

This is my first expo app. It is a very simple app, that is basically a wrapper to a website www.socratease.in alongwith Expo Push Notifications. When a user opens the app, a webview to a Google login page on my site gets rendered. The Expo push token is appended as a query parameter, and I can then associate my users with expo push tokens. The app works exactly as desired.

I did expo build:android and then uploaded the apk to the Play Store. I received an email from Google Play Support saying:

Hi Developers at Socratease,

We detected that at least one APK version in your recent upload isn’t using Android Pay correctly. Including APK version(s) Apk 1 in your submission could cause your app to be rejected for violating our Payments policy.

If you’d like to use Android Pay in your app, please follow these steps :

  1. Remove any digital content from your app. To use Android Pay, your app must only sell physical goods or services.
  2. Make sure your app is compliant with all policies listed in the[ Developer Program Policies]. Remember that additional enforcement could occur if there are further policy issues with your apps.
  3. [Sign in to your Play Console] and submit the app. Make sure to increment the version number of the APK.

If you’d like to use another payment method in your app, please follow these steps to remove Android Pay from your manifest :

  1. Remove <meta-data android:name=“com.google.android.gms.wallet.api.enabled” android:value=“true”/> from your manifest.
  2. Sign in to your Play Console and submit the app. Make sure to increment the version number of the APK.

I am not using Android Pay anywhere. Currently, there is no payment integrated, even on the website. When I was uploading the app onto the Play Store, I did choose the app as Free in the Pricing and Distribution.

These are my import statements in App.js:

import React from 'react';
import { AppState, Platform, ImageBackground } from 'react-native';
import WebViewWrapper from './src/components/WebViewWrapper';
import { Permissions, Notifications, SplashScreen } from 'expo';

These are my import statements in WebViewWrapper.js:

import React, { Component } from 'react';
import { WebView } from 'react-native';

These are my only two .js files. The only require statement is one where I am importing a .png file. I could post more of the code, if required. But, because this seems to be about packages, I thought this would be sufficient.

I did file an appeal on Google’s systems requesting for a re-instatement. But, they basically said that they will get back only if they need further information. If they think the information they have already shared with me is sufficient, they may not even respond to me.

On my Expo dashboard, in the build logs, I saw the following entry:

Reading program jar [/root/.gradle/caches/transforms-1/files-1.1/play-services-wallet-15.0.1.aar/b7f2af71b2eb635d02605bcf8c98cf3a/jars/classes.jar] (filtered)

Any idea how to disable payments from the app?

With regards,

Hi, thanks for the detailed report. We’re looking into this and will have a fix out soon.

@jayanthtn - this should now be fixed in production, so if you rebuild your app (expo build:android --no-publish) then you should be able to submit it to Google Play with no problems.

The issue was due to the fact that in our revamped Payments module for SDK 30, we added the following problematic line to AndroidManifest.xml in order to support Android Pay:
<meta-data android:name=“com.google.android.gms.wallet.api.enabled” android:value=“true”/>

Unfortunately, it seems that Google Play flags new apps (but not updates to existing apps) that include this line and we did not catch this. We’ve adjusted things so that this line is no longer included by default, and Android Pay is instead opt-in on ExpoKit apps.

Many apologies for the trouble, and thanks again for the timely report!

Thank you, it’s working now.

@esamelson Thanks for looking into this promptly. This problem has been fixed!

@esamelson - I am having the same problem now and when i tried to use (exp build:android --no-publish) the versionCode for the .apk was not updated. Using sdkVersion: 27.0.0

I initially faced the same issue. Don’t use the --no-publish flag. Or, better still, first publish the app, and then build it. That seemed to fix it for me.

@jayanthtn - Okay i will try publishing to google play without the --no-publish flag again. Thank You!

@nsage14 - this is actually my bad, I didn’t increment the versionCode before deploying the new builders. I will try and deploy a new version today, but either way you can actually control the versionCode of your APK yourself from app.json (see https://docs.expo.io/versions/v30.0.0/workflow/configuration#android) – this way you can increment it exactly when you need to, instead of relying on us to do so.

@esamelson - Gotcha, I had tried without the tag another time and it worked and is now on the Google Play Store! Thank you for your help!

1 Like

Unfortunately for detached projects this problem still occurs. After updating to SDK 30 our app was rejected due to this setting.

We tried solving this by manually adding the following to android/app/src/main/AndroidManifest.xml BEFORE building but the app update was still rejected.

<!-- DISABLE GOOGLE PAY -->
<meta-data
  tools:replace="android:value"
  android:name="com.google.android.gms.wallet.api.enabled"
  android:value="false" />

The binary was still rejected by Google even though the output AndroidManifest.xml has a value of false:

android/app/build/intermediates/manifests/full/dev/release/AndroidManifest.xml:

<meta-data
  android:name="com.google.android.gms.wallet.api.enabled"
  android:value="false" />

How can we disable this in our local builds?

Update: Removing the expo-payments-stripe module manually from node_modules before a build seems to have fixed the problem. The binary has now been accepted.

Note: this is an app update, not a new app.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.