Is it possible to force Chrome to refresh app notification settings when using Notification delegation - trusted-web-activity

In a previous answer regarding Notification Delegation between Chrome and an Android TWA app it was said that:
"If the TWA has notifications disabled in Android Settings, we disable
them in Chrome instead. There's a little bit of latency with how this
gets propagated, but things should get updated on the next TWA launch
at latest.
How exactly Notification Delegation does work?
On my site I am sending the user to androids app notification settings when I find that notifications are not allowed in the browser.
But upon the users immediate return, the changes are not propagated to Chrome (to be expected from the comment above since the TWA is not launched again).
I wonder if there is anyway I can speed this up? Otherwise the user is forced to exit the page completely and restart the app before the permission is granted, which is not a very good user experience.

It seems the only workaround would be to force restarting the application, which is not a great user experience. I have filed an issue on Chromium bugs to track a fix for this: https://bugs.chromium.org/p/chromium/issues/detail?id=1064300

Related

Webauthn demo not wokring on safari

When testing various demos for webauthn, the credentials.create() function stopped working for safari (on mac), returning NotAllowedError: Operation failed. I tried these demos (1 , 2 , 3), and they all still work on chrome, but after being able to create two passkey credentials through safari, I can no longer use any webauthn demo (on my device) to create a credential (for any authenticator type). Nothing changed about my computer or my safari preferences. What could be going on here? Is there some setting to change in the .create() options that could prevent this?
Two potential causes spring to mind.
There are issues with ongoing concurrent WebAuthn requests, such as across multiple tabs. You may either have had a visible request going via a modal window, or have encountered a browser bug. In both cases, you'd see the issue clear up if you quit the browser (or force-quit on iOS-based platforms).
Because of the potential for abuse of modal UI, latest Safari institutes a policy where after the first request, subsequent requests may have to be triggered by user activation (e.g. a click). Older versions of Safari instituted more aggressive policies here, including not carrying that activation through a fetch()

infinite loop on consent screen login with google android ionic capacitor

I recently created an application with ionic capacitor, in it I use login with google, but I have the following drawback, on some phones (very few) it does not log, it stays on the consent screen, and when they press allow, it shows a loading and returns to leave the consent screen, over and over again, as in an infinite cycle, the thing is that I cannot replicate this on any device or emulator, it has happened on android 8 and 5.1, I even downloaded an emulator with android 5.1 and still I am not able to replicate the error, 90% of the users do manage to enter.
I do not know much about android, however I was reviewing the official documentation and it is identical to the implementation of the plugin (except for the calls to javascript after finishing), I thought it could be the configuration in the console, but I do not think, since as I said in 90% of the devices it works fine.
I would really appreciate if anyone could give me at least an idea on how to replicate the error, or something like that.
this is the plugin in question, in case it is of any use
https://github.com/CodetrixStudio/CapacitorGoogleAuth
I do not share code because I am sure that the problem is not in javascript
these are the scopes i'm using "profile", "email"

Chrome dev tools site gets stuck in mobile view when exiting emulation mode

When using chrome dev tools to emulate mobile devices, sometimes when toggling emulation from mobile back to desktop the user agent spoofing gets stuck in mobile. I've tried hard cache reset, closing browser completely, restore to default.... but anything I do the site still renders in mobile (even when emulation is turned off).
This happens in Canary, beta, and regular Chrome.
Also a note i've only seen this happen in Sharepoint.
Anyone know how to resolve? Nothing seems to get the dev tools to change user agent back to default when exiting emulation.
Have you tried deleting your chrome settings?
Windows: C:/Users/%username%/AppData/Local/Google/Chrome/User Data
Mac OSX: ~/Library/Application Support/Google/Chrome/
Ubuntu: ~/.config/chromium/
Also make sure you aren't ZOOMED! Gets ya everytime
I ran into this same problem previously when using dev tools in Chrome to look at mobile resolutions that got me permanently stuck in mobile for SharePoint only. I solved it originally with the recommendation above of deleting my Chrome settings folder, however, that meant I had to sign in again, sync my extensions, etc.
After forgetting that this would happen again, I ran into the same issue, but this time I discovered that if you append the following to your SharePoint URL it will reset this back to non-mobile. I verified that it is not temporary as I have closed my browser, reopened, visited SharePoint, and it still loads in desktop mode.
/?mobile=0
So, you would use your site url, e.g. https://siteurl/?mobile=0
Weird, this just started happening to me. It persists in new tabs and new windows. Only fix is to open DevTools and switch to Responsive mode and then pull it way out. As soon as I turn off Responsive / Mobile view, Chrome snaps right back to a mobile view by default (appears to be iPad size).
The solution for me (so far) was to quit Chrome and open it back up.

ABAddressBookGetAuthorizationStatus in simulator always returns kABAuthorizationStatusAuthorized

I am updating an app for iOS 6 Address Book authorization and have hit a problem in testing. The simulator always returns that authorization is granted. This means I do not see the dialog popup requesting permission and can therefore not test that code path. Ok, use a device instead... The problem there is the OS appears to remember my answer so only asks once. Deleting the app does not help. On reinstalling it has retained the permission setting from before, so again no popup.
Resetting the simulator does not help and if you go into the Privacy settings on the simulator no apps are listed as requesting permission to the Address Book.
The only option I have is use another iOS device that has never had our app installed on for each test. This cannot be how you are supposed to test this. Any ideas anyone?
Thanks
Found it. From the device, Settings->General->Reset->Reset Location & Privacy. So you have to do that for each test

iPad didn't call didRegisterForRemoteNotificationsWithDeviceToken

I'm trying to get device token in iPad for remote push notifications;
registerForRemoteNotificationTypes is called okay, no error, but didRegisterForRemoteNotificationsWithDeviceToken also not been called;
Application is appear in Settings/Notification;
What's I doing wrong?
iPhone is registering successfully.
Thank you
PS: iPad 1, iOs 5.1
In this case, if the code works on iPhone that code should work on iPad as well. Coz the os is same. Anyway if your code is not working on iPad try to remove provisioning profile from the iPad and reinstall the correct one. Sometime the old provisioning profile remains. And don't forget to check the code signing on target as well.
check that you are registering correctly for Push Notifications, including verifying your provisioning profile for "aps-environment" key and the code signing of the .app.
also you can debug Push Notification status messages in the console (you will need to install PersistentConnectionLogging.mobileconfig provisioning profile on your device and reboot it. check out this link under "Observing Push Status Messages").
There is an important thing to know with the provisioning profile. You should ensure to create the certificate first (the one used for the notifications), and then recreate the provisioning profiles, so that they know about the notifications. So you're sure it's not a provisioning profile issue.
Well, problem was solved in production sign and provisioning, but not in development. When I archive application for device and load it through iTunes, push notifications is working. Very strange behaviour.
I know it's a late answer, but it may help others. I had the same issue as the OP. After you click ok on the notification popup, it disappears but none of the method gets called to get the device token. Then I checked the internet connection when testing push notifications and I realized I had no connection. After re-connecting, it began working fine.