Status Update
Comments
pe...@google.com <pe...@google.com> #2
Issue with notification access code in core. Unclear where, but probably safe to assume NotificationCompat
.
ba...@gmail.com <ba...@gmail.com> #3
Note that this is a lint error and can be suppressed or lowered to warning-level on the client side. Lowering back to P2
.
pe...@google.com <pe...@google.com> #4
androidx/platform/frameworks/support/+/androidx-main:buildSrc/public/src/main/kotlin/androidx/build/SupportConfig.kt;l=50 to 33 and then run ./gradlew :core:core:lintDebug
ba...@gmail.com <ba...@gmail.com> #5
It's at
frameworks/support/core/core/src/main/java/androidx/core/app/NotificationManagerCompat.java:223: Error: When targeting Android 13 or higher, posting a permission requires holding the POST_NOTIFICATIONS permission [NotificationPermission]
mNotificationManager.notify(tag, id, notification);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Explanation for issues of type "NotificationPermission":
When targeting Android 13 and higher, posting permissions requires holding
the runtime permission android.permission.POST_NOTIFICATIONS.
yf...@google.com <yf...@google.com> #6
Handling this as part of
ba...@gmail.com <ba...@gmail.com> #7
pe...@google.com <pe...@google.com> #8
Which Custom Tabs APIs are you using? Could you send us an APK (ideally one that doesn't require signing in to anything)?
ba...@gmail.com <ba...@gmail.com> #9
I'm affraid I can't give an app version as our company (Amex GBT) policy doesn't allow that. Or I can make you an apk (nothing related to ) which just opens a link in custom tab?
pe...@google.com <pe...@google.com> #10
Ah, no worries.
Which of the Custom Tabs APIs specifically are you using? Which classes/methods from
Is it only the very basic usage like so:
String url = "https://google.com/";
CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
CustomTabsIntent customTabsIntent = builder.build();
customTabsIntent.launchUrl(this, Uri.parse(url));
Or are you using more advanced features (eg, stuff from
ba...@gmail.com <ba...@gmail.com> #11
ba...@gmail.com <ba...@gmail.com> #12
ba...@gmail.com <ba...@gmail.com> #13
I installed a work profile in my device using Test DPC app.
I tried to launch the Chrome Custom Tab. The app is crashed with the exact log that i posted initially.
What i observed i that the work profile doesn't have any browser installed but rather than saying so package found to handle the intent, it throughs the error "java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity."
I can solve this with a try catch but is this exczption relevent to this case?
pe...@google.com <pe...@google.com> #14
Hello (sorry for the delay, I was ill most of last week).
That is very interesting - though I find it odd that the work profile doesn't have a browser installed.
As an aside, do you have a <queries>
entry in your manifest - for example the ones listed under "Check whether a browser is available" or "Open URL in Custom Tabs"
I think for your case, using a try-catch may be appropriate (or potentially querying what browsers are available and picking one).
+chrome-connective-tissue, in case they've come across something similar before.
tw...@google.com <tw...@google.com> #15
Re #13 -- does your app have a fallback if sending the intent fails? A try-catch or calling #resolveActivity() before firing the intent would eliminate the crash but the UX flow may still be broken.
Description
Version used: 1.4.0
Devices/Android versions reproduced on: Samsung S21 5g, Pixel 7
When the CCT is launched, we get a crash on some devcie like below:
Fatal Exception: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
at androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:852)
at androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:815)
at androidx.appcompat.app.AppCompatDelegateImpl.onPostCreate(AppCompatDelegateImpl.java:536)
at androidx.appcompat.app.AppCompatActivity.onPostCreate(AppCompatActivity.java:151)
at android.app.Instrumentation.callActivityOnPostCreate(Instrumentation.java:1386)
at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3652)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2172)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:8163)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:972)
The Activity which launches the CCT extends AppCompatActivity and the theme is correctly set with Appcompat theme