Google Pay using Sripe : Getting an unexpected developer error in Android - android

I have Implemented google pay using stripe payment processor and it is in test Environment. When I used to test google pay with real card payment it shows a dialog box that
"Request Failed"
UnExpected developer error, Please try again later.
I am unclear why this error is showing. How to resolve these issue. Can Anyone help me out?
Manifest file
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="myproject"
android:roundIcon="#drawable/ic_launcher"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<meta-data
android:name="com.google.android.gms.wallet.api.enabled"
android:value="true" />
</application>

More detailed information is shared in the logs. Make sure to remove any process/application specific filtering, since these logs emanate away from your application. If you filter using a keyword such as "wallet", you should be able to see more specific hints into your problem.
Let me know whether that helps.

Related

Unable to upload app bundle on Google Play Console [duplicate]

In manifest not added android.permission.READ_PHONE_STATE. permission.
Why error comes when I upload a new apk version error comes below.
Your app has an apk with version code 1 that requests the following permission(s): android.permission.READ_PHONE_STATE. Apps using these permissions in an APK are required to have a privacy policy set.
I have attached a screenshot of my google play store account.
my manifest file.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.my.package.name">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name=".utils.PreferenceManager"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:largeHeap="true"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".SplashScreen"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:screenOrientation="portrait" />
<activity
android:name=".CategoryListActivity"
android:screenOrientation="portrait" />
<activity
android:name=".ImagesActivity"
android:screenOrientation="portrait" />
</application>
</manifest>
Your app's manifest.xml having these permission to access information from your's device but you don't have privacy policy link while submitting on the play store. so you getting this warning.
Need privacy policy for the app If your app handles personal or sensitive user data
Adding a privacy policy to your app's store listing helps provide transparency about how you treat sensitive user and device data.
Update 1
The privacy policy setting in Google Play Console has changed locations.
In Google Play Console,
Select Store presence → App content.
Under Privacy Policy.
Update 2
Select Policy → App content at the far bottom left.
Under Privacy Policy.
Just try to add this line to your manifest file:
<uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove" />
and add attribute xmlns:tools="http://schemas.android.com/tools" to your <manifest> tag to define namespace tools
From the documentation for tools:node="remove":
Remove this element from the merged manifest. Although it seems like you should instead just delete this element, using this is necessary when you discover an element in your merged manifest that you don't need, and it was provided by a lower-priority manifest file that's out of your control (such as an imported library).
It's third party library. You can find the culprit in build/outputs/logs/manifest-merger-release-report.txt
The dependencies you have in your project, will add their own permissions.
Please do the below to find from where "READ_PHONE_STATE" is coming.
Rebuild your android application
Press "Ctrl+Shift+F" in android studio (basically do a search all in the editor of your preference).
Search for "READ_PHONE_STATE", you would find the entry in a regenerated manifest file (not the one you originally created). By the path of it you can know, from which dependency the permission is getting added.
It may be because of any third party lib which may include that permission so from my experience in this field You have to add the privacy policy regarding to that particular information it means if you ask get accounts permission in your app than you have to declare that with your privacy policy file we use that data i.e. email address or whatever with reasons like to login in google play game.
Also can do this
<uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove" />
Hope This Will Guide you What You can do for this warning create privacy policy for your app and attach that with store listing.
you need to specify the min and target sdk version in the manifest file.
If not the android.permission.READ_PHONE_STATE will be added automaticly while exporting your apk file.
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="19" />
If you use React Native
This problem has been completely solved here
https://facebook.github.io/react-native/docs/removing-default-permissions
It can be that you need to add or update your privacy policy.
You can easily create a privacy policy using this template
https://app-privacy-policy-generator.firebaseapp.com/
Currently some people are facing the same issue because of using 12.0.0 version of AdMob lib.
Update it to 12.0.1. This should fix it. You can read more here
You need to provide a privacy policy for your app in the Google Play Console, or remove the permissions which require a privacy policy.
Go here: https://play.google.com/console/app/app-content/summary
Or open the Google Play Console for your app, scroll all the way to the bottom of the nav menu on the left and under the heading "Policy" click "App Content".
For more information on when and why the privacy policy is required, see the docs here.
If you're testing your app on a device > android 6.0 you have also to explicitely ask the user to grant the permission.
As you can see here READ_PHONE_STATE have a dangerous level.
If a permission have a dangerous level then the user have to accept or not this permission manually. You don't have the choice, you MUST do this
To do this from your activity execute the following code :
if the user use Android M and didn't grant the permission yet it will ask for it.
public static final int READ_PHONE_STATE_PERMISSION = 100;
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.M && checkSelfPermission(Manifest.permission.READ_PHONE_STATE)
!= PackageManager.PERMISSION_GRANTED) {
requestPermissions(new String[]{Manifest.permission.READ_PHONE_STATE}, READ_PHONE_STATE_PERMISSION);
}
then override onRequestPermissionsResult in your activity
#Override
public void onRequestPermissionsResult(int requestCode, #NonNull String[] permissions, #NonNull int[] grantResults) {
switch (requestCode){
case READ_PHONE_STATE_PERMISSION: {
if (grantResults[0] == PackageManager.PERMISSION_GRANTED){
//Permission granted do what you want from this point
}else {
//Permission denied, manage this usecase
}
}
}
}
You should read this article to know more about it
Probably you're using PlayServices of version 9.6.0. Then you should update it, it's library's bug. More info here.
OR
Add
<uses-permission
android:name="android.permission.READ_PHONE_STATE"
tools:node="remove" />
to your manifest file.
Are you using AdSense or other ads in your app, or maybe Google Analytics ? I think if you do so, even if you don't have the android.permission.READ_PHONE_STATE in your manifest this is added by the ads library.
There are free templates that might help you create a privacy policy.
This is the email i received from Google about it :
Hello Google Play Developer, Our records show that your app, xxx, with
package name xxx, currently violates our User Data policy regarding
Personal and Sensitive Information. Policy issue: Google Play requires
developers to provide a valid privacy policy when the app requests or
handles sensitive user or device information. Your app requests
sensitive permissions (e.g. camera, microphone, accounts, contacts, or
phone) or user data, but does not include a valid privacy policy.
Action required: Include a link to a valid privacy policy on your
app's Store Listing page and within your app. You can find more
information in our help center. Alternatively, you may opt-out of this
requirement by removing any requests for sensitive permissions or user
data. If you have additional apps in your catalog, please make sure
they are compliant with our Prominent Disclosure requirements. Please
resolve this issue by March 15, 2017, or administrative action will be
taken to limit the visibility of your app, up to and including removal
from the Play Store. Thanks for helping us provide a clear and
transparent experience for Google Play users. Regards, The Google Play
Team
You should drop android.permission.READ_PHONE_STATE permission. Add this to your manifest file:
<uses-permission
android:name="android.permission.READ_PHONE_STATE"
tools:node="remove" />
1.You need to create privacy policy page on your website and update your privacy policy for the permissions you are asking.
2.Update new SDK remove unwanted permissions and resubmit the app.
I found this free website that will make for you the policy AND host it:
https://www.freeprivacypolicy.com/
Then add it to the play store under Store Listing - at the bottom add the public link for the policy that you got from https://www.freeprivacypolicy.com/
I solved this problem by this way:
Google play console
find App content-> Privacy policy
and then
Privacy policy URL set to
you can submit your page.
2018 update:
For AdMob users, this causes AdMob version 12.0.0 (currently last version). It wrongly requests READ_PHONE_STATE permission, so even if your app doesn't require READ_PHONE_STATE permission in manifest, you won't be able to update your app in the Google Play Console (it will tell you to create a privacy policy page for your app, because your app requires this permission).
See this: https://developers.google.com/android/guides/releases#march_20_2018_-_version_1200
Also, they wrote they will publish an update to 12.0.1 fixing this soon.
I was facing same issue and got the error while uploading apk to Google play.
I used ads in my app, and I was not even mentioned READ_PHONE_STATE permission in my manifest file. but yet I got this error. Then I change dependencies for ads in build.gradle file. and then it solved my issue. They solved this issue in 12.0.1.
compile 'com.google.android.gms:play-services-ads:12.0.1'
See steb by step and you will understood
public static String getVideoTitle(String youtubeVideoUrl) {
Log.e(youtubeVideoUrl.toString() + " In GetVideoTitle Menu".toString() ,"hiii" );
try {
if (youtubeVideoUrl != null) {
URL embededURL = new URL("https://www.youtube.com/oembed?url=" +
youtubeVideoUrl + "&format=json"
);
Log.e(youtubeVideoUrl.toString() + " In EmbedJson Try Function ".toString() ,"hiii" );
Log.e(embededURL.toString() + " In EmbedJson Retrn value ".toString() ,"hiii" );
Log.e(new JSONObject(IOUtils.toString(embededURL)).getString("provider_name").toString() + " In EmbedJson Retrn value ".toString() ,"hiii" );
return new JSONObject(IOUtils.toString(embededURL)).getString("provider_name").toString();
}
} catch (Exception e) {
Log.e(" In catch Function ".toString() ,"hiii" );
e.printStackTrace();
}
return null;
}
If you are using the package device_id to get the unique device id then that will add an android.permission.READ_PHONE_STATE without your knowledge which eventually will lead to the Play Store warning.
Instead you can use the device_info package for the same purpose without the need of the extra permission. Check this SO thread
I could not release my app on Google as error show after uploading app apk file on Google testing "internal testing release."
Attached screen shot please resolve advise how to resolve this error.
App generated on Mobiroller app generator.
Even though after I have [Error massage seen: "Your APK or Android App Bundle is using permissions that require a privacy policy: (android.permission.CAMERA)."
1added privacy policy in Mobiroller in my app.
Error massage seen: "Your APK or Android App Bundle is using permissions that require a privacy policy: (android.permission.CAMERA)."

Bitmap not posting(share) in facebook in android?

I am share to bitmap into facebook all are working fine when app is installed in mydevice.problem when app is not in installed in device.Why this happen i didn't understand.I am using HelloFacebookSample.Java
and i am adding following code Into Manifest.xml file
<activity
android:name=".HelloFacebookSampleActivity"
android:screenOrientation="portrait"
android:theme="#style/AppBaseTheme"/>
<activity android:name="com.facebook.LoginActivity" android:screenOrientation="portrait"/>
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/app_id"/>
<provider android:authorities="com.facebook.app.NativeAppCallContentProviderXXXXX92272288220"
android:name="com.facebook.NativeAppCallContentProvider"
android:exported="true"/>
and am adding all permissions also.I am research alot i didn't findout mistake where i done.Advance thanks to all .Sorry ,to my poor english.
When the app is not installed, you can do one of two things:
fallback to a web dialog, but there's no support for sharing a bitmap via a web dialog, so you can only share a link.
Ask for the publish_actions permission, and upload the photo via the Graph API (see https://developers.facebook.com/docs/reference/android/current/class/Request/#newUploadPhotoRequest).
You should always wrap your FacebookDialog calls with a canPresentShareDialog check. See the sample code https://developers.facebook.com/docs/android/share or in the HelloFacebookSample. It will tell you if the share dialog feature is available (if the app is installed and it's of the right version), and you can decide the proper fallback technique to use.

Facebook on Android — Debug popup Hashkey keep appear

I'm trying to add the Facebook API in my application. I build it in ActionScript3-AIR to proceed an export on iOS/Android and use the GoViral API to apply the connection with Facebook.
After the creation of the application on Facebook Developer, it works on iOS, but not on Android.
When this line is read GoViral.goViral.initFacebook( XXXXXXX ), on Android, the application show a popup which display the Key Hashes Here, the screenshot:
Then, nothing happen. The connexion don't seem to be done and, if I try an authentication with GoViral.goViral.authenticateWithFacebook( "user_likes,user_photos,publish_actions" ) it does nothing. And by that, I really mean nothing in the way that it don't even return the GVFacebookEvent.FB_LOGIN_FAILED event.
I used the "Mail It" button on this popup. Took the hash key and pasted it in the Android section of my application in the Facebook Developer Here, the screenshot:
But, nothing changes and the popup always appears.
After that and by the results of some google research, I've try to make my own Hash Key, helped by some tutorials. The Key has been generated but didn't correct anything about the popup.
So, actually, I'm a little confuse about this issue.
Especially as I've try to put another fake App ID in the initFacebook method : the popup continues to appear. So I wonder if it can really see it.
For information, I created the application project on the Google Developers Console.
The manifest I use to apply the Facebook API is this one :
<uses-sdk android:targetSdkVersion="12"/>
<uses-sdk android:minSdkVersion="8"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<application>
<activity android:name="com.facebook.LoginActivity"
android:theme="#android:style/Theme.Translucent.NoTitleBar"
android:label="Login"/>
</application>
Thanks a lot to help me to fix this issue.
------ EDIT ------
I found the problem about the Debug Pop-up with the Hash Key. It was relative to the GoViral API which ( I didn't know this ) has two version : One normal and one for the debug which always makes appear the hash key in a pop-up at connection.
The Facebook connection still not working, but it's sound to be another problem so I can say this problem is solved.
I've found the solution which is way simple than I imagined. In the sources of GoViral, there was two ANE, I used the one which was makes for debug. It makes appear the popup to give us the hashkey. After what, we have to put the other ane to make it work.

admob ads doesn't show up using milkmangames extension in flash

I have made an app in flash for android and I have followed everything as said here: http://www.adobe.com/devnet/air/articles/admob-ane-android.html to show ads in my app, but the ads ain't showing up, if I place this code:
if(AdMob.isSupported)
{
AdMob.init("my publisher id");
}
else
{
trace("AdMob won't work on this platform!");
return;
}
AdMob.addEventListener(AdMobErrorEvent.FAILED_TO_RECEIVE_AD,onFailedReceiveAd);
function onFailedReceiveAd(e:AdMobErrorEvent):void
{
trace("Ad failed to load.");
}
AdMob.showAd(AdMobAdType.BANNER,AdMobAlignment.LEFT,AdMobAlignment.BOTTOM);
above all the other code nothing works anymore and if I place this code below all the rest code the app works but the ads never show up, does someone know how I can show my ads??
AdMob.isSupported will always return false if you're testing on the simulator. So you've to test on device to be able to test AdMob in general.
I manage to notice that milkmangames Admob ANE has some issues. Just out of the sudden no ads and i mean not a single ad is displayed under intervals of time. milkman games ads aren't displayed without notice. At first i thought it was google fault but unity ads are working perfectly. People are loosing serious amounts of money because of this.
Perhaps google is blocking ads for milkman games ANE?
I had a similar problem, and wrote to Milkman. They politely suggested I read the manual - GettingStarted.pdf, and sure enough, in there is a note about setting up your -app.xml properly.
You need to include certain manifestAdditions in the android section of -app.xml:
<android>
<manifestAdditions><![CDATA[
<manifest android:installLocation="auto">
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application>
<!-- this meta-data tag is required for AdMob -->
<meta-data android:name="com.google.android.gms.version" android:value="4452000"/>
<!-- this activity is required for AdMob -->
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="#android:style/Theme.Translucent.NoTitleBar"/>
</application>
</manifest>
]]></manifestAdditions>
</android>

Android SyncAdapter

I am writing a syncadapter using google account and app engine. The account appears in account and sync, but when I try to select the account for syncing, I am getting a hard database error. I am trying to figure if this error is on mobile or the app engine. Further, what can be causing this error
Another error that I am getting is failed to find provider info.
Thanks for your help!
Turns out I had not added the provider in manifest. It should be something like this:
<
provider android:name=".BlaBlaProvider"
android:label="#string/app_name"
android:authorities="com.example.android.blabla"
android:syncable="true" />

Categories

Resources