notification-logger icon indicating copy to clipboard operation
notification-logger copied to clipboard

Add support for Chrome on Android

Open jarifibrahim opened this issue 8 years ago • 6 comments

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

jarifibrahim avatar Oct 18 '16 06:10 jarifibrahim

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 avatar Oct 18 '16 07:10 hkirat

@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.

simevidas avatar Oct 18 '16 21:10 simevidas

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 avatar Oct 21 '16 07:10 hkirat

@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 avatar Oct 21 '16 15:10 jarifibrahim

@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 avatar Oct 21 '16 19:10 hkirat

@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 :)

jarifibrahim avatar Sep 25 '18 13:09 jarifibrahim