Publishing Android Instant App: Domain is used by another app - android

I'm trying to publish an Instant app but got this error on review and release page.
Your Instant App APKs contain the domain 'xxx.xxx.com' that is already in use by another app.
If I remove the intent-filter that contains the domain, then this error will go away. So looks like it's the only issue in my app bundle.
However, that domain is not used by any other app. Also, I set up the assetlink.json file correctly, as I'm able to pass the test in App Links Assistant.
What are the other possibilities that Google may report this error to me?

Related

App Action Works on App Actions Test Tool But not On Google Assistant

I have cloned the project from https://github.com/actions-on-google/appactions-common-biis-kotlin. I made the package name of this project the same as my draft project in Play Console which has a temporary app name 'com.acesoft.actions (unreviewed)'. I can trigger the app actions with App Action Test Tool (AATT). If I set the Invocation Name to "test app" with AATT, it would work on my physical test device if I say "Open active tasks in test app". However, Google Assistant would not open the app when I say "Open active tasks in todo". Todo is the display name for the app. According to the documentation, the default invocation name is the display name of the app. The command "Open active tasks in todo" would result in a search in the web. What did I do wrong? How do I invoke the app actions without AATT?
I have also tried typing the following in Google Assistant:
"open active tasks in todo"
"open active tasks in actions" ("actions" is the last part of the temporary name)
All these commands would result in web searches instead of opening the app!
Can anyone help?
If your app is not published on the Play store, it definitely will not work. Google Assistant only formally recognizes apps that have been uploaded and have passed review. It works in the test tool because that tool establishes a temporary "preview" of how things will work if it were fully published.
Still, in some cases, Google Assistant is unable to match the name of the app as spoken to the name of the app as installed on the device. This situation is not possible to resolve on your own. What you will need to do is contact Google Assistant support and explain what you are trying to do. They might be able to make a change manually to the backend to enable this.
You can see someone else having a similar problem in this public bug. However, please do not file a new bug, and do not fill out the form unless your app is uploaded to Play. If your app is uploaded to Play, follow the instructions given in the last comment on that issue:
If your app is shipping on the Play store, then you can get support for this using this support form - you should choose "App Actions review" for now, and point out that you would like a manual mapping for your app. Don't worry about the actions console project ID - that is for another project.
For me it was enough to put my app into "internal testing" in the Play Console and then install the app on device through the test link that is provided by the Play Console. I could use Google Assistant and use the app name for invocation.

Internal app sharing show downloading error | Error retrieving information from server. DF-DFERH-01

I published my app in internal app sharing. After I shared link to download to myself, but to another account. I turn on internal app sharing in Google Play on my phone. When I click downloading, I catch error -> Error retrieving information from server. DF-DFERH-01
I tried to test in two phones, but with same google account.
There is a step I missed - testers have to opt in to the test program before they can use the shared link, and until they do they get the opaque DF-DFERH-01 error. On the Play Console under Release Management, select App releases. In Internal test track, click Manage. Under Manage Testers click the drop arrow. This opens up a panel, and near the bottom is an opt-in URL. Copy this and send it to testers. They have to click on this link and agree to opt in to the test program. They can then download the current version. After this they can also use internal app sharing links for new builds.
In my case, I was trying to access the internally shared debug app not a production testing app. For this, I was using Internal App Sharing feature. To be able to install and use such apps one's email needs to be added to an email-list(as per the settings we had) otherwise, anyone with the link can install.
Problem
The problem is despite having my email in the list, and email representing a google account I was not able to install it. I faced this error.
Click here to see the Screenshot
Cause
I maintain about 8 google accounts on my mobile and I was logged in to all of them. I realized having multiple accounts is causing the issue.
Solution
Instead of logging out from all the google accounts, I simply created a new user in my mobile and set it up. Then I opted-in to Internal App Sharing in the App store. Then shared the app link via google-keep. Voila, I was able to install it.
In my case I just had to wait ~48 hours and it Just Worked with no other changes.
A few more silly things to consider if you are new to Google Play Console.
You need to make sure to enable Internal App Sharing on Google Play Settings, here is a tutorial for that.
Do not forget to publish your modifications by clicking on publication overview (sorry for the Portuguese language on the pic, but you can find through the icon):
And then publishing it by clicking on the blue button (publish modifications or something like that):
After doing this, try to clean the cache of your play store and remove all updates from play store (after doing this you'll need to enable Internal App Sharing again).
I was able to get rid of the error by clearing the storage of the google play store app then open the play store app again and enabling the internal app feature then opening the internal app sharing link again.
sometimes if that didn't work , restarting the device does the trick!

Where do I find the package name (eg. com.android.browser, com.android.phone, com.android.contacts) of an existing Android App?

I am learning how to use Espresso to validate intents. The documentation has the following example:
intended(allOf(..., toPackage("com.android.browser")));
Where can I find the package names of other existing apps (eg. Gmail)?
The answer can be found at https://support.google.com/admob/answer/3086746?hl=en:
Go to the Google Play store page.
Search for your app (eg. Gmail) and go to the app page.
Google Play URL uses the following format:
https://play.google.com/store/apps/details?id=<package_name>
Another way is to run a failing test and see what shows up.

Should I implement app links in my installed app along with my instant app? What the right way to implement app links?

The docs state that both my instant and installed app should implement App Links. Why should the installed app implement App Links as well, since I only want my instant app URLs to be surfaced correctly in Google Search with the instant badge? Also, what are the best practices?
Yes - app links enables seamless link resolution to your app, installed or instant. In order for Google Search to surface results for either your installed or instant app, you must setup app links properly for both. In addition, to avoid degrading the user experience from instant to installed, all URLS supported by the instant app should also be supported by the installed app. Hence, as the docs state, both the instant and installed app should implement app links."
Here are the best practices:
Set autoVerify=true in at least one intent filter in both the instant and installed app manifest.
Host one assetlinks.json per subdomain. The file must be served from /.well-known/assetlinks.json on each https subdomain.
assetlinks.json file must be valid json (correct syntax, no BOM for instance) served with header "Content-Type: application/json" and served with an HTTP 200 status on each domain (no redirects)
assetlinks.json file location must be accessible to bots, e.g. robots.txt needs. This means if you include internal urls in the manifest that are only accessible internally, the validation will fail.
Ensure all path claims in your instant app are also in your published regular app.
All declared intent filters must support both http and https in the scheme.
Do not use wildcards hosts in your intent filters (e.g.) In *.example.local, the * will be dropped and example.local will be indexed.
Only one instant app can be supported for each domain. Multiple Instant Apps cannot be associated with the same domain.
Ensure your assetlinks.json is valid for your most popular search results using the tool described in “Confirm the Digital Asset Links files” on the App Link support page.
Test your app links here.
Instant Apps and App Links
As you noted, Instant Apps rely on App Links to work. However, not all devices support Instant Apps, and if your full app is installed, you will want your users to be sent there instead of the Instant App version. So your full app still needs to support App Links too.
The difference between a regular app and an Instant App is that the device will only load a single Activity in response to the App Link the user clicks, instead of needing to download the full package through the Play Store. It's a more seamless experience for the user, but the underlying technology works the same way.
Passing Context Between Instant and Full App
You also probably need some way to make sure your users are handed off between app versions seamlessly, if they choose to download the full version. Android doesn't offer this by default (surprisingly), so you'll either need to build it yourself or use a service like Branch.io (full disclosure: I'm on the Branch team).

Debug Android inapp billing using Eclipse

Now I managed to sign the apk (using Eclipse Android Tools) and adb install .. to the device for testing.
But this removed the debug function, e.g. "step over" which make problem tracing much more difficult.
Is it possible to debug the inapp billing using Eclipse?
Unfortunately I don't think there is any way to step debug, I have just been using print outputs. This is due to the fact that you have to sign your app with a release key in order for it to communicate properly with the billing service. Very annoying.
When you go through the in app billing documentation, you kinda realize that it can take substantial amount of time to understand this complex piece of technology. Most developers feel the need for a working HelloWorld, and then later play around with the builds.
I have uploaded 2 projects
The android sample project. You can download this project, and immediately run the sample. This will help you quickly debug/trace thru and figure out how the in app billing works.
A cleaned up project to help you integrate your app quickly. This can help like a library. Just integrate make your “purchase requests” on your “checkout” button action.
Mind you : I have not incorporated the security recommendations. Read android in app billing documentation. Until then you are on your own risk.
For 1
Download “http://www.4shared.com/file/f5wH3qke/InAppBilling1.html”
Create a new gmail account for all correspondence (Why, I will explain below)
Pay that 25$ and purchase a “Market Place” account.
Import the project to your eclipse environment
Create a signed application apk, File-Export-Select Your Project-Create OR Use keystore, it should be valid for 25 years from today.
Upload the signed apk to the market place as a “Draft Application”, DO NOT PUBLISH it.
For the uploaded apk, you need to add “In App Products”. You will find this link on the home page for your uploaded apk.
In Security.java dont forget to add your “public key” from your market place account “edit profile” page.
On the “In App Product List”, you need to add the following products one by one
The text below should used as “In app Product id”
sword_001 as Managed
potions_001 as Unmanaged
Title and Description dont matter (for testing purpose). Add what you need here.
Cost add 1$ (minimum)
Click auto fill
Save
Publish the in app project (dont get confused here, you only need to publish the in app product, NOT the APP)
In the test account, add your personal gmail id here. Now, this gmail account needs to be configured as your first gmail account on your phone.
Yes, this WONT work on your emulator
Now the sample app should work.
For 2
Download “http://www.4shared.com/file/h8YnJyf_/InAppBillingIntegration.html”
To integrate, in your calling activity initialize the checkout code
Handler handler = new Handler() ;
CheckoutPurchaseObserver checkout = new CheckoutPurchaseObserver(this, handler);
To send the checkout request for your product
checkout.sendCheckoutRequest(purchaseUri.toString(),null);
Important Note :
This purchaseUri is the “In-app Product ID” of your resource on the “market.android.com/publish-->Create New In-App Product” options. This string should be set as the “in app product” id.
That’s why the “id” is most important. The “In-App Product ID” is how you refer to that particular product.
Also, in Security.java dont forget to add your “public key” from your market place account “edit profile” page.**
Debugging Notes
LogCat will show all errors as InAppBilling tag
This project creates a shared_preferences named “inappbilling” And debug is set to true
The androidmanifest.xml may not be needed since this project does not
have a home screen.
Why do we need to create a new gmail account ?
Simple. The account you purchase your market place account for, cant be used for “testing” your in app billing. Since you cannot purchase products for yourself. And your primary account on your device should be set as a “test account” on the market place account. Chicken-Egg issue here. Hope its clear.
An interesting blog I came by “http://crazyviraj.blogspot.com/2011/06/some-notes-on-implementing-in-app.html“ (not mine).
In my app, I used the test product id, android.test.purchased, which will simulate the actual buying process (ie, will show the in app dialog and you'll be able to purchase and get a response that can be handled by your application). Using that product id, you can run the in app code on the device (unsigned) via eclipse over usb connection. You still might need to work around some things for testing (ie, account for the fact that you are using a testing product id and not your real id), but I found using that product ID did help me quite a bit.
See the testing section of the in app billing guide

Categories

Resources