Office Hours Transcript: 2021-09-04
how can I help you today?
Hey good day, hope you weekend is good!
On Android 12 we have this change relate to Web intent resolution
On my app I’m using App Links, not deep links.
For this my web need to define assetlinks.json what they have.
But when installing my app I cannot open the links directly on my app and keep opening the web.
This probably us something related to intent-filter and probably something I’m doing wrong… Because the push notifications are not working too.
if I run “adb shell pm get-app-links --user cur app.package” I can see that all app links are disable and I can enable them from the settings app info>open by default, what make everything work. So I know my manifest is correctly setup.
I’m using a pixel 3 on Android 12, app target/compile Android 12.
If I get the previous version of the app (target/compile Android 11) it works without issues on Android 12
wow, you type fast! 😁
hahaha I was prepared, do not wanna waste your time
Basically, everything worked before targeting Android 11 and now on Android 12 it stopped, so this intent-filter for Apps Links and Push notifications is broke, I added the
I assume that you have
if you uninstall and reinstall the app, you should see some messages about the app links verification
indeed, I have in all them
I think we need to manually show this message, not sure, but I did uninstall and install, even from Google Play using a Release build on Beta (open test) and nothing appeared =/
so, you are not seeing messages from things like
nothing that I’m aware
I am running some experiments now — this will take a few minutes
understandable, not something trivial, thanks for tanking a look
ah, OK, at least on 11, the message I was thinking of comes from
IntentFilterIntentOp — let me try on 12
yes, the messages come from
IntentFilterIntentOp on 12 as well
hmm… I’m not using this anywhere in my code
this is for manual setup from the user side?
no, those are Logcat messages from a system process that handles the app links verification
So the user "allow" the app links?
I see, I didn’t come across this before, will take some time and study it
if you run
adb shell pm verify-app-links --re-verify your.applcation.id.goes.here (for your application ID), you will force re-verification on Android 12
a successful verification should log stuff like this:
2021-09-04 16:07:29.516 I/IntentFilterIntentOp: Verifying IntentFilter. verificationId:2 scheme:"https" hosts:"docs.google.com" package:"com.google.android.apps.docs.editors.docs". 2021-09-04 16:07:29.981 I/IntentFilterIntentOp: Verification 2 complete. Success:true. Failed hosts:.
(wow, did that format weird)
hahaha, give me 2s
a failure will look more like:
2021-09-04 16:06:08.271 I/IntentFilterIntentOp: Verifying IntentFilter. verificationId:1 scheme:"https" hosts:"www.commonsware.com" package:"com.commonsware.android.dev.debug". [CONTEXT service_id=244 ] 2021-09-04 16:06:08.661 I/IntentFilterIntentOp: Verification 1 complete. Success:false. Failed hosts:www.commonsware.com. [CONTEXT service_id=244 ]
(those posts are a bit old, but in terms of the logging, they are still accurate)
Lol, "Unknown command: verify-app-links". XD will search this
on Android 12?
Yeah, let me run on my physical device
maybe emulator stuff
yeah, I tested on a Pixel 3 XL that has the current beta
"work" on my pixel 3 with Android 12 Beta, terminal has not answer but I cannot see anything on logcat verbose for IntentFilterIntentOp
that is strange
the test app that I tried is one that uses app links, but it does not have
targetSdkVersion 31 — we will not make that move until next year
(we just moved to 30 within the past couple of months)
so, it is possible that the difference in behavior comes from that
Don’t wanna take your time, while I execute this tests/rebuild etc and will take my time to study the links you provide.
But based that we cannot reset the app link verification for our users
how would be the expectation to make this work?
do you have
CATEGORY_BROWSABLE on your
there is also a new
DomainVerificationManager that you can try to see what your status is at runtime: https://developer.android.com/about/versions/12/web-intent-resolution?hl=en#user-prompt-domain-verification-manager
however, that does not let you request re-verification — it just tells you what your current state is
I have the Browsable like this:
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data> ... </data> </intent-filter>
that looks good
When I run the command
adb shell pm get-app-links --user cur app.package I can see the right links declared
but they are "disable"
I can enable manually, but they should be enable automatically
What make me think that is some wrong setting from my side is because push notification is broke too
what exactly do you mean by "push notification is broke too"? are you working with FCM directly or via some third-party push messaging library?
<action android:name="com.android.vending.INSTALL_REFERRER" />
<action android:name="com.google.firebase.MESSAGING_EVENT" />
If I have my App targeting Android 11 open in two devices and open android 12 in another device, when I send the push notification I receive on the apps that are targeting android 11, but not the app targeting 12
I do not have enough experience with that to provide much advice
the good news, relatively speaking, is that you have over a year to get
targetSdkVersion 31 working
Yeah, probably will be good to postpone this a little @@
Thanks for the time Mark!
will leave you so you can think in other problems hahahha
have a good day and we talk soon ^^
I am sorry that I did not have a solution for you!
is part of the beauty side of being a developer, if I discover something concrete ret I let you know, could help more people
that would be great — thanks!