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.
Related
I have released my app with google play integrity api.
App works after device integrity check success
"deviceIntegrity": {
"deviceRecognitionVerdict": ["MEETS_BASIC_INTEGRITY", "MEETS_DEVICE_INTEGRITY"]
},
I found issue with some user facing the issue that device passes device integrity at the time of install
but after restart device, deviceIntegrity check failed
here is response what i found during debugging after restart
{
"requestDetails": {
"requestPackageName": "com.my.package",
"timestampMillis": "1674455009345",
"nonce": "Y29tLm1hbnRyYS5yZHNlcnZpY2UyMDIzMDEyMzExNTIzMjajHDrnJ9vtl2AfC1fUdEDJmD_HfvFtcpc\u003d"
},
"appIntegrity": {
"appRecognitionVerdict": "UNEVALUATED"
},
"deviceIntegrity": {
},
"accountDetails": {
"appLicensingVerdict": "UNEVALUATED"
}
}
I have search about UNEVALUATED result
"Application integrity was not evaluated. A necessary requirement was missed, such as the device not being trustworthy enough."
But the issue accures only after restarting the android device
I Hope some one can help us on this issue.
I have followed Android-Management-API quick start and successfully done all steps and provision a device with work profile mode. But when I tried provisioning devices(via QR code scan) as dedicated devices after factory reset, it fails and I do not see my device in "devices-list" under my organization. I see "device-policy" in settings>Google on device but when i click on "device policy" it shows that policy not synced and clicking "sync" manually shows "error updating policy". Can you please help if i misconfigure anything?
My policy is given below:
{
"applications": [
{
"packageName": "com.google.android.gm",
"installType": "FORCE_INSTALLED"
}
],
"debuggingFeaturesAllowed": true
}
My QRcode is given below:
{
"android.app.extra.PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME": "com.google.android.apps.work.clouddpc/.receivers.CloudDeviceAdminReceiver",
"android.app.extra.PROVISIONING_DEVICE_ADMIN_SIGNATURE_CHECKSUM": "I5YvS0O5hXY46mb01BlRjq4oJJGs2kuUcHvVkAPEXlg",
"android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION": "https://play.google.com/managed/downloadManagingApp?identifier=setup",
"android.app.extra.PROVISIONING_ADMIN_EXTRAS_BUNDLE":{
"com.google.android.apps.work.clouddpc.EXTRA_ENROLLMENT_TOKEN": "{enrollment-token}"
}
}
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.
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.
I have just started developing an app for Android and iPhone with trigger.io and parse.com. Now I'm stuck trying to add push notifications to the app. I send test pushes from the control panel at parse.com but nothing happens on the Android phone I'm testing with.
Here's what I've done:
Added the partners/parse section in config.json with applicationId and clientKey from the settings at parse.com
Added "event": true to the modules section in config.json
My config.json looks like this:
{
"config_version": "2",
"name": "My test app",
"author": "(my email)",
"version": "0.1",
"platform_version": "v1.4",
"description": "An empty app created by default",
"modules": {
"logging": {
"level": "DEBUG"
},
"event": true,
"geolocation": true,
"contact": true,
"file": true,
"is": true,
"media": true,
"notification": true,
"prefs": true,
"request": {
"permissions": ["http://*/*", "https://*/*"]
},
"tools": true,
"reload": true
},
"partners": {
"parse": {
"applicationId": "(my real app id)",
"clientKey": "(my real client key)"
}
}
}
Added the following code to listen for incoming pushes:
forge.logging.info('Adding push listener');
forge.event.messagePushed.addListener(function (msg) {
forge.logging.info('Got push: ');
forge.logging.info(JSON.stringify(msg));
}, function(err) {
forge.logging.error('There was an error receiving push!');
forge.logging.error(err);
});
To test the app I connect my Android phone by USB cable to my Mac and choose "Run android" in Trigger toolkit in the browser
In the log I see the messages "Initializing Parse and subscribing to default channel" and "Adding push listener"
I go to parse.com Push notifications and see that there is one connected device. I test to send several messages, some in "Message" mode, some in JSON mode.
Parse thinks that the messages get sent but nothing is logged on my side
I also tested connecting another Android phone. Parse then indicated that there were two reachable phones, but the new phone didn't get any messages either.
Looking at the documentation and examples I can't think of anything else to try. I cannot decide if this is a trigger.io problem or a parse.com problem.
Does anyone have any ideas?
Is this a problem just when you're using the default broadcast - rather than a named - channel?
We have a fix for a problem with the broadcast channel on Android ready to be deployed tomorrow or early next week - it will be in platform version v1.4.27.