notification-logger
notification-logger copied to clipboard
Add support for Chrome on Android
I've created a test repo for demonstration - https://jarifibrahim.github.io/test/
The notification works on Chrome desktop and android. The only catch is for android notifications to work, the website should be https
.
This fixes https://github.com/hkirat/notification-logger/issues/5
Most of the times this application will be used when testing and debugging locally which doesnt happen on https most of the times.
Issue #5 focusses on mobile debugging, a technique used to debug on mobile using Desktop. It is for that that we need Desktop Notifications to occur. Your fix would log them as mobile notifications. We will have to read remote debugging guidelines to get through this I dont think this fixes #5 Am I correct @simevidas ?
@hkirat It fixes #5 in that the web notifications are created on the Android device, which is what we want. For example, you create a JS Bin demo that uses console.log
. Then you load that demo in Chrome for Android and the logged message is correctly displayed as a web notification on the device.
Regarding remote debugging, there is no need for this tool to work with it. As I've mentioned in #5, notification-logger is an alternative to remote debugging, in scenarios where the developer doesn't want to go through the hassle of connecting the device via USB just to view console messages.
So, when remote-debugging a web page, the developer will view console messages in the actual DevTools Console on desktop normally; and when viewing/debugging the page on the device itself, the developer will see console messages as web notifications with @jarifibrahim's fix.
ok Great! @jarifibrahim Can you look for a fix for the https problem. Because rarely someone tests their websites on https. I am also looking for the same. Also you have P.R.'d one of your merged commits as well (notification-icon). Loose that and apply for another P.R.
@hkirat There's no fix for the https problem. The notification does not work over http. Try it over http and see the console.
You've merged my last PR (notification-icon) and hence that commit is no more in this PR. Github takes care of this stuff. I can see only one commit in this PR.
@jarifibrahim Yes I was going through this https://developers.google.com/web/fundamentals/engage-and-retain/push-notifications/ It has a notification in the end that says works only on https for chrome Thanks. I'll merge soon
@hkirat Is this fix still valid? I can resolve the merge conflicts. I am sorry it took me so long to reply. I somehow lost track of this PR :)