Status Update
Comments
am...@google.com <am...@google.com> #2
am...@google.com <am...@google.com> #3
Please provide answers for the following questions:
1. Where do you see the reference documentation of intent?
2. What intents do not work properly in which android device?
lb...@gmail.com <lb...@gmail.com> #4
As for a place that has documenations of Intents, here:
But there are many more of various other Intents. I had to use try-catch in many places, with fallbacks.
am...@google.com <am...@google.com> #5
am...@google.com <am...@google.com> #6
As per the issue reference
lb...@gmail.com <lb...@gmail.com> #7
Each time I noticed it, I used try-catch instead.
I want Android to be stable about these things. It doesn't make sense that when I tell it to reach some specific settings screen that's documented, the app will crash.
am...@google.com <am...@google.com> #8
lb...@gmail.com <lb...@gmail.com> #9
Is there a way on Firebase Crahslytics to find such exceptions? I think it's ActivityNotFound, but sometimes it's even SecurityException ?
Each time I've found it, I've used try-catch or something else, to prevent it...
I could, if you want, publish a new version that will send such exceptions to Crashlytics again, but using non-fatal mechanism ("Crashlytics.logException") . But it will take some time to see those again.
am...@google.com <am...@google.com> #10
lb...@gmail.com <lb...@gmail.com> #11
OK found some cases:
INSTALL_PACKAGE SecurityException on "JP5s Inmate Media Device" Android 4.2.2 - That's when using the ACTION_INSTALL_PACKAGE action on an APK file.
CONFIRM_PERMISSIONS ActivityNotFoundException "Galaxy S6" Android 5.1.1 - That's what I get from Intent.EXTRA_INTENT when confirming the installation permission by the OS.
I'm sure there are more cases, if I allowed users to open some Intents from here:
Anyway, please fix it. Add CTS rules that will force OEMs to handle official intents properly.
am...@google.com <am...@google.com> #12
lb...@gmail.com <lb...@gmail.com> #13
lb...@gmail.com <lb...@gmail.com> #14
APPLICATION_DETAILS_SETTINGS ActivityNotFoundException "Classic MY8301" Android 4.3
lb...@gmail.com <lb...@gmail.com> #15
Also of Xiaomi " Redmi Note 3" (Android 5.1.1):
lb...@gmail.com <lb...@gmail.com> #16
lb...@gmail.com <lb...@gmail.com> #17
Can't handle android.settings.USAGE_ACCESS_SETTINGS
HUAWEI Y6 Pro
Android 5.1
lb...@gmail.com <lb...@gmail.com> #18
OPPO
A9 2020
Android 10
lb...@gmail.com <lb...@gmail.com> #19
OPPO
Reno4 Lite
Android 11
lb...@gmail.com <lb...@gmail.com> #20
samsung
Galaxy J6+
Android 9
lb...@gmail.com <lb...@gmail.com> #21
realme 6
Android 10
lb...@gmail.com <lb...@gmail.com> #22
APPLICATION_DETAILS_SETTINGS :
OPPO A5 2020 Android 10
realme C11 Android 10
ACCESSIBILITY_DETAILS_SETTINGS:
TECNO POP 4
st...@gmail.com <st...@gmail.com> #23
I have bugs in my system that I took screenshots of
vi...@google.com <vi...@google.com>
vi...@google.com <vi...@google.com> #24
We have looked into the request you have reported and would like to inform that
-
CONFIRM_PERMISSIONS
isn't AOSP, it's defined by an app or an OEM so we (Google/Android) could not make any promises regarding its functionality. -
INSTALL_PACKAGE
will throw security exceptions if the app doesn't have theREQUEST_APP_INSTALL
app op granted therefore the behavior is working as intended. -
Regarding
APPLICATION_DETAIL_SETTINGS
not working. We recommend reaching out to the respective OEM's as we are trying our best to make sureAPPLICATION_DETAIL_SETTINGS
is supported.
lb...@gmail.com <lb...@gmail.com> #25
Please talk with the OEMs. I'm not in charge of making them follow the rules.
Google is. Google is the one providing them with licenses and should have tests to make sure they follow the rules properly.
There is also no normal, official form to report to them.
lb...@gmail.com <lb...@gmail.com> #26
Look how many are frustrated by OEMs breaking how apps work , in various ways:
lb...@gmail.com <lb...@gmail.com> #27
vi...@google.com <vi...@google.com>
vi...@google.com <vi...@google.com> #28
Could you verify that the intent names listed in the above description are correct? The terms like:
- INSTALL_PACKAGE and not INSTALL_PACKAGES
- USAGE_ACCESS_SETTINGS and not ACTION_USAGE_ACCESS_SETTINGS
lb...@gmail.com <lb...@gmail.com> #29
@28 I've specified multiple permissions already as examples. Not as the only things that should be checked. Of course you can read more that should be publicly available and working and make sure that OEMs keep them working as well.
As for the specific ones you've mentioned, it's Intent.ACTION_INSTALL_PACKAGE ("android.intent.action.INSTALL_PACKAGE").and Settings.ACTION_USAGE_ACCESS_SETTINGS ("android.settings.USAGE_ACCESS_SETTINGS").
Sadly the links don't show me the exceptions/crashes anymore because it's too far in the past (can reach only up to 90 days). The original request is from 2017... These things should be available for all devices.
ia...@google.com <ia...@google.com> #30
ACTION_ADD_DEVICE_ADMIN is covered by
ACTION_INSTALL_PACKAGE requires REQUEST_INSTALL_PACKAGES when targeting API 25+ and is covered by
CONFIRM_PERMISSIONS sounds like it's not an AOSP expectation per #24
An action string existing does not guarantee there is an intent filter on the device that can handle it, so you should always guard launching intents that are outside of your control with try/catch. If an intent is not required to be handled, the docs should indicate such with "In some cases, a matching Activity may not exist, so ensure you safeguard against this." That's the case for ACTION_ACCESSIBILITY_SETTINGS, ACTION_APPLICATION_DETAILS_SETTINGS, ACTION_USAGE_ACCESS_SETTINGS, etc.
lb...@gmail.com <lb...@gmail.com> #31
"This Intent is protected by CTS test XYZ (with link) so it should be fine to use it for Google's licensed devices. If you've found a device that has Play Services and does not follow it, please press the button below to report about it, and we will check it out"
This will help managing the CTS tests and ensure that even if some devices slip, developers might find them eventually and cover it.
As for the above specific cases:
ACTION_ADD_DEVICE_ADMIN - It's not recent. It's Android 9 that I've shown you the report of it.
ACTION_INSTALL_PACKAGE - I already have this permission declared.
CONFIRM_PERMISSIONS - Really this should not happen then. I've noticed there are also Admob crashes of this sort:
SecurityException: addOnPermissionsChangeListener: Neither user 10578 nor current process has android.permission.OBSERVE_GRANT_REVOKE_PERMISSIONS.
Is this also not part of AOSP ? If so, why does Admob try to use it?
About guarantee, shouldn't CTS reduce such crashes, so that there would be a better standard ?
Some intents are very important and there is no way to overcome by having some fallback. Just telling the user it's impossible on the device...
ia...@google.com <ia...@google.com> #32
Why don't you add text&button for each such protected Intent (Intent that you promise should work by the tests) into the docs
You could say the same thing for any virtually API in Android ("if it doesn't work as described, report it"), so I don't think it makes sense to put a button in each individual constant. If the problem is that the "In some cases, a matching Activity may not exist, so ensure you safeguard against this" warning isn't clear enough or is missing from Intents where it should be included, then we can fix that.
ACTION_ADD_DEVICE_ADMIN - It's not recent. It's Android 9 that I've shown you the report of it.
Unfortunately, if the OS/phone is ~6 years old, there's not a lot we can do about it, which is why I suggested filing a ticket if it's happening on a newer device. Hopefully if it's only happening on an older device, then that indicates it has since been fixed but that fix didn't roll out to all older devices.
ACTION_INSTALL_PACKAGE - I already have this permission declared.
Is this only happening on the one device that's >10 years old (SecurityException on "JP5s Inmate Media Device" Android 4.2.2)? REQUEST_INSTALL_PACKAGES was introduced in API level 23, which is newer than the OS the device is running, so that wouldn't have any affect. Given that this is an inmate device, I wouldn't be surprised if using a 3rd party app to install an arbitrary APK is specifically locked down and throws an exception.
CONFIRM_PERMISSIONS - Really this should not happen then. I've noticed there are also Admob crashes of this sort:
SecurityException: addOnPermissionsChangeListener: Neither user 10578 nor current process has android.permission.OBSERVE_GRANT_REVOKE_PERMISSIONS.
Is this also not part of AOSP ? If so, why does Admob try to use it?
I don't know where "CONFIRM_PERMISSIONS" is defined. It's not part of AOSP. "android.permission.OBSERVE_GRANT_REVOKE_PERMISSIONS" is a system permission. As far as I know, it's not used by Admob but is probably used by system services such as gmscore.
About guarantee, shouldn't CTS reduce such crashes, so that there would be a better standard ?
Android attempts to balance the need for flexibility from OEMs and users with the need for consistency for app developers. The
Some intents are very important and there is no way to overcome by having some fallback. Just telling the user it's impossible on the device...
If there's specific intent that you believe should be required to be supported by all devices, then you can file a ticket for that intent with details about your use case and the user impact of not having the functionality on all devices. The more specific a ticket, the more likely it can get routed to the expert for that particular aspect of Android and that person will have much more context on whether that intent makes sense for all possible use cases of AOSP.
lb...@gmail.com <lb...@gmail.com> #33
What I'd suggest is having an even better approach:
Have reporting being done automatically, by using Play Console and Firebase Crashlytics (and maybe collaborate with other similar services), so that you could see which devices are the most problematic , and for which APIs, and contact the OEM about it.
About ACTION_ADD_DEVICE_ADMIN and ACTION_INSTALL_PACKAGE - you say they are old devices. OK. But it wasn't this old when I've reported about this: 2020 ...
About OBSERVE_GRANT_REVOKE_PERMISSIONS, the exception includes "com.google.android.gms:play-services-basement", so it's incorrect that it's part of system. It's Play Services usage. Admob or anything else of the SDKs of Google. Please check here (attached video too):
The point of framework and its documentation is that we will be able to trust it to work as it's written.
That's why there are so many reports of Chinese OEMs (and now it's not just Chinese anymore) that break behaviors and add their own made-up permissions that can't be handled officially at all:
I've found there multiple violations for Xiaomi, some are in complete contradiction to what the documentation says.
So, instead of giving more and more space to OEMs to break things, you need to do the opposite. For example many times there are more and more restrictions on foreground-services, so OEMs take this a step forward and cause terrible behaviors that can't be handled properly, causing users to have worse experience and require developers to tell users to enable things that shouldn't even exist.
Description
Many times I see an Intent that is documented and doesn't work at all, even though it supposed to (meaning the Android versions is at least as the one as on the documentation of it).
Please prevent this from happening.
Force OEMs to let all documented Intents work properly. Both old Intents and new Intents.
In other words :
Each time there is a new Intent that is presented on version X of Android, force all Android devices with version X and above to support it properly.