Amazon Fire (TV) In-app Purchase: Subscription - android

I am currently working on a test app for Amazon's In-App Purchasing SDK for Android. Specifically, I am working on Fire TV, but the problems also seems to appear on a Fire Tablet.
I created a (currently unpublished) App on my Developer account and added a subscription with both an annual and a monthly option.
Here is the exported JSON:
{
"inapppurchasingtestabo.monthly": {
"price": 1.07,
"subscriptionParent": "inapppurchasingtestabo",
"smallIconUrl": "http://",
"title": "Subscription",
"itemType": "SUBSCRIPTION",
"description": "This is the subscription!",
"languageTitleMap": {
"DE": "Abo",
"US": "Subscription"
},
"languageDescriptionMap": {
"DE": "Das ist das Abo!",
"US": "This is the subscription!"
},
"currencyPriceMap": {
"US": 0.0
}
},
"inapppurchasingtestabo.annually": {
"price": 10.72,
"subscriptionParent": "inapppurchasingtestabo",
"smallIconUrl": "http://",
"title": "Subscription",
"itemType": "SUBSCRIPTION",
"description": "This is the subscription!",
"languageTitleMap": {
"DE": "Abo",
"US": "Subscription"
},
"languageDescriptionMap": {
"DE": "Das ist das Abo!",
"US": "This is the subscription!"
},
"currencyPriceMap": {
"US": 0.0
}
}
}
I installed the Amazon App Tester App on the device and copied the JSON to /mnt/sdcard/amazon.sdktester.json.
While everything seems to work in principle - from the app I can see the subscription along with the available prices, the descriptions, etc. and I can also make a purchase which then shows up in the App Tester App - I see no indication as to which price is for which subscription period.
Compare the following screenshots:
Can you tell which price is for the monthly and which is for the annual subscription? (Also, keep in mind, that for all the user knows, they could be bi-weekly and semi-annual, too).
So my question is: What am I doing wrong and how do I get the purchase dialog to display the period along with the price?

Amazon app tester has not been updated with the new offerings they have developed in the in app purchases. I would advice to conduct a beta test to ensure that app works. App tester is a mock app that pretends to fulfill purchases. Beta test (Live app test) would test your app against the actual amazon services that executes in app purchases in real world (production for published app).

This is likely a bug or limitation with the Amazon App Tester app. From my experience, it does not fully replicate the production environment. It's useful for testing the basic workflow locally.
I would recommend you to use Live App Testing which allows you to test in the production environment.

Related

Android Management API : Change GCP project and Pub/Sub for devices notifications?

I have a question about the Google "Android Management API".
https://developers.google.com/android/management/reference/rest/v1/enterprises
What we have today :
We have one enterprise per environment (preprod, prod) to manage our devices.
PREPROD : LC02htlxxx
PROD : LC00izayyy
With these enterprises, we can perform these actions :
enroll a device ;
send policies to the enrolled devices ;
send commands (reboot kiosks for example)
Each enterprise is linked to a GCP project and a pub/sub topic.
With this pub/sub topic, we can receive the enrollments and report events.
When I perform a GET https://androidmanagement.googleapis.com/v1/enterprises/LC02htlxxx
The result is :
{
"name": "enterprises/LC02htlxxx",
"enabledNotificationTypes": [
"ENROLLMENT",
"STATUS_REPORT",
"COMMAND"
],
"pubsubTopic": "projects/mobile-retail-xxxx/topics/admin-android-test",
"contactInfo": {
"dataProtectionOfficerName": "",
"dataProtectionOfficerEmail": "",
"dataProtectionOfficerPhone": "",
"euRepresentativeName": "",
"euRepresentativeEmail": "",
"euRepresentativePhone": ""
}
}
What we want to do :
We would like to change both the GCP project and the pub/sub topic used to receive the notifications for the enterprise.
Indeed, we are currently switching of GCP project for technical migration matter.
So we would like
enterprise enterprises/LC02htlxxx with projects/mobile-retail-xxxx/topics/admin-android-test
to become
enterprise enterprises/LC02htlxxx with projects/kdm-mdm-staging-yyyy/topics/admin-android-test
What we tried to do :
We tried to perform a PATCH https://androidmanagement.googleapis.com/v1/enterprises/LC02htlxxx
with this body :
{
"name": "enterprises/LC02htlxxx",
"enabledNotificationTypes": [
"ENROLLMENT",
"STATUS_REPORT",
"COMMAND"
],
"pubsubTopic": "projects/kdm-mdm-staging-yyyy/topics/admin-android-test",
"contactInfo": {
"dataProtectionOfficerName": "",
"dataProtectionOfficerEmail": "",
"dataProtectionOfficerPhone": "",
"euRepresentativeName": "",
"euRepresentativeEmail": "",
"euRepresentativePhone": ""
}
}
And the answer is :
{
"error": {
"code": 400,
"message": "Invalid pub/sub topic projects/kdm-mdm-staging-yyyy/topics/admin-android-test. Choose a topic from the mobile-retail-xxxx Google Cloud Platform project.",
"status": "INVALID_ARGUMENT"
}
}
Finally, our questions :
Is it possible to change the GCP PROJECT for an Enterprise ?
(it looks like the enterprise is linked to only a GCP project on its creation (???) I cannot change it)
If it is possible, how can we do it ? We tried without any success with the given APIs :
https://developers.google.com/android/management/reference/rest/v1/enterprises
If it is not possible, how can I transfer all our enrollments to a new enterprise without any user action ?
(if we cannot change the GCP project of our enterprise, we will have to transfer all the enrollments and all applications links on out playstore)

Google play IAP subscription for yearly plan always get Cancelled for License Tester

I have recently implemented IAP for our android application.
I have created both monthly and yearly plan which have trial period offer for 7 days and are autorenewable.
We are using RTDN to handle the subscription state at backend.
For monthly plan INR 2800 the subscription flow is working perfect and I am receiving proper RTDN notifications every 5 min for test purchase.
However for Yearly plan INR 19000 is getting canceled immediately once subscription is done and I am getting SUBSCRIPTION_STATE_CANCELED notification from RTDN.
As per RBI if amount is greater than 5000 INR Subscriptions will not autorenew but I am not able to make 1st purchase for yearly plan which is more than 5000 INR.
Response from google api for yearly plan :
{
"kind": "androidpublisher#subscriptionPurchaseV2",
"startTime": "2022-11-22T11:43:56.194Z",
"regionCode": "IN",
"subscriptionState": "SUBSCRIPTION_STATE_CANCELED",
"latestOrderId": "GPA.XXXXXXXXXXXXXXX",
"canceledStateContext": {
"systemInitiatedCancellation": {}
},
"testPurchase": {},
"acknowledgementState": "ACKNOWLEDGEMENT_STATE_ACKNOWLEDGED",
"externalAccountIdentifiers": {
"obfuscatedExternalAccountId": "XXXXXXXXX",
"obfuscatedExternalProfileId": "XXXXXXXXX"
},
"lineItems": [
{
"productId": "yearlyplan",
"expiryTime": "2022-11-22T12:13:45.621Z",
"autoRenewingPlan": {},
"offerDetails": {
"basePlanId": "yearly01"
}
}
]
}

Play Integrity test cases failed

Below are the test cases that we created on Play Console for Play Integrity:
We have created combinations of different verdicts that can be received by Play Integrity API. All below test cases work when we remove all google accounts from a device and keep only that email ID with which the test case is created. But these test cases don't seem to work when a device has multiple google accounts.
Test case 1 - device 1:
As per the test case, the verdict returned should be "Basic device integrity met, running unlicensed Play-recognised app" but received below verdict:
`"appIntegrity": {
"appRecognitionVerdict": "UNRECOGNIZED_VERSION",
"certificateSha256Digest": ["KrKTIuq1ehCAmzZmpBnECGnylNUIhJNKmG3cIYU-xU8"],
"packageName": "mypackagename",
"versionCode": "228"
},
"deviceIntegrity": {
"deviceRecognitionVerdict": ["MEETS_BASIC_INTEGRITY", "MEETS_DEVICE_INTEGRITY"]
},
"accountDetails": {
"appLicensingVerdict": "LICENSED"
}`
With this verdict, the message displayed on mobile app is - "App is not google play recognized"
When we removed all accounts and kept only device 1 test case email account in the same device, we got the expected result.:
`"appIntegrity": {
"appRecognitionVerdict": "PLAY_RECOGNIZED",
"certificateSha256Digest": ["ki_C3iCaCK58mqf7FNrVH6KsPa8wDxBPsx_NQ37Qslw"],
"packageName": "mypackagename",
"versionCode": "228"
},
"deviceIntegrity": {
"deviceRecognitionVerdict": ["MEETS_BASIC_INTEGRITY"]
},
"accountDetails": {
"appLicensingVerdict": "UNLICENSED"
}`
With this verdict, the message displayed on mobile app is - "Integrity check fail"
Test case 2 - device 2:
The only exception is this device where all test cases work in spite of the device having multiple google accounts.
As per the test case, the verdict returned should be "Strong device integrity met, running licensed Play-recognised app" which is correctly returned:
`"appIntegrity": {
"appRecognitionVerdict": "PLAY_RECOGNIZED",
"certificateSha256Digest": ["ki_C3iCaCK58mqf7FNrVH6KsPa8wDxBPsx_NQ37Qslw"],
"packageName": "mypackagename",
"versionCode": "228"
},
"deviceIntegrity": {
"deviceRecognitionVerdict": ["MEETS_BASIC_INTEGRITY", "MEETS_DEVICE_INTEGRITY", "MEETS_STRONG_INTEGRITY"]
},
"accountDetails": {
"appLicensingVerdict": "LICENSED"
}`
With above verdict, no error message is displayed on mobile app and user successfully proceeds to next screen.
Tested same cases on few devices it's not working properly.

Xamarin Forms Android - AppCenter push notifications working by device id but not by user id

I'm having a problem using Push Notifications with User Ids on Xamarin Forms Android. I have had it working previously but for some reason, now that I have come back to the project I'm having no joy.
On the iOS project everything is working with both device & user id's.
In the app, on a successful login I set the AppCenter UserId from our LoginResponse.
AppCenter.SetUserId(loginResponse.UserId.ToString());
To test, I have tried to send pushes through the AppCenter interface and using Postman. The results are as follows.
All registered devices - Everything is working with this. Multiple device receive the notification.
Device List - Works fine whether separately or as a group of device id's.
User List - Nothing is being sent, Results show 0/0.
Using Postman I have sent the following to the API which works perfectly.
{
"notification_content": {
"name": "My Device Test",
"title": "A New Android Device Message!!",
"body": "First test in the real app!!"
},
"notification_target": {
"type": "devices_target",
"devices": [ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ]
},
}
But trying to send to a user id, once again, does nothing.
{
"notification_content": {
"name": "My User Test",
"title": "A New Android User Message!!",
"body": "First test in the real app!!"
},
"notification_target": {
"type": "user_ids_target",
"user_ids": [ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ]
},
}
As I said at the start, this has worked fine previously (about 3 months ago) and I've even tried an old build of the app just in case, with no luck.
I'm struggling to think of what I might have missed, so any advice would be great.

Paypal SDK sandbox mode return status "Created"

I have integrated Paypal in my android app, user can pay by either Paypal or card.
Card Payment is working correctly but when paying through Paypal returns status "created" instead of "approved".
Below is response from Paypal -
{
"client": {
"environment": "sandbox",
"paypal_sdk_version": "x.xx.x",
"platform": "Android",
"product_name": "PayPal-Android-SDK"
},
"response": {
"create_time": "2016-05-23T10:51:47Z",
"id": "PAY-XXXXXXXXXXXXXXXXXXXXXXXX",
"intent": "sale",
"state": "created"
},
"response_type": "payment"
}
Why it is not returning status to approved.
What is wrong in my code.
TIA
For Sandbox environment, You need to use a credit card that is registered under the sandbox personal account. Check the "Profile" of the PayPal sandbox personal account and go to the "Funding" tab for the test credit card. This will give you a "approved" result instead of "created".
The problem is you are created the Merchant account as Business account in your sandbox, but we need to create Business-Pro account in sandbox.
I got solved the issue by created like that.

Categories

Resources