Office Hours — Today, January 24

Yesterday, January 23

Jan 24
3:55 PM
Mark M.
has entered the room
Mark M.
turned on guest access
Bryan
has entered the room
Mark M.
hello, Bryan!
how can I help you today?
Bryan
Hey Mark, I hope you are having a great day
4:00 PM
Mark M.
thanks -- you too!
Bryan
I am trying to see if there is a way to "automate" something in a webview without accessibility
my ideal situation:
View paste
1) User opens my app, with webview, it is showing a 3rd party web page.
2) User interacts with the webview, my app records the actions somehow (via dom, x/y click, keypress, etc)
3) My app records the actions
4) next time user opens my app to that webview my app can automate the steps recorded
even better would be if I could do it on a headless webview
I have read a bunch of stuff out there around this type of interaction (some by you on stack overflow), and have not come away with a clear answer
so figured I would ask :)
Mark M.
um, well, that's difficult to answer in the abstract
there are also legal issues, which I won't get into
WebView itself has nothing specifically for this
Bryan
do you know if accessibility has access to the specifics of a webview?
Mark M.
but you can invoke JavaScript in the context of the currently-viewed Web page
Bryan
meaning will it report the ids of the html itself
Mark M.
I doubt it but do not know for certain
Bryan
right, but invoking javascript only helps if you know specifics about the page, right?
Mark M.
well, sure
if you're thinking that you will be able to do this for an arbitrary Web page... that's impractical
Bryan
yeah, I am working under the assumption that I don't know that, and that I would want to "discover" it via the initial interaction by the user
4:05 PM
Bryan
it would only be arbitrary as far as the app knows, the user will know it
if that makes sense
Mark M.
well, yes, but unless the user is writing the app, that doesn't help much
Bryan
that was what I was afraid of :(
do you know if the the dom crawler and whatnot in chrome is available in the webview
all the dev tools on chrome desktop
etc
Mark M.
there is a way you can hook up Chrome DevTools to a WebView, IIRC
Bryan
internally, or via adb?
Mark M.
adb, IIRC
Bryan
internally meaning in app
Mark M.
the tools themselves are in Chrome
Bryan
ok, thanks, not necessarily what I was hoping for, but good to know :)
I have another question if you have time
Mark M.
it's reminiscent of how Stetho leverages the DevTools protocol to allow you to inspect a non-WebView android app
Bryan
gotcha
Mark M.
sure -- there's nobody else in the chat room at the moment
Bryan
so I quickly, too quickly, moved my app to support SDK 26
and it wreaked havoc on a bunch of things
due to how much I was using background processes, etc
so I am going to have to do some serious rewriting
Mark M.
do you mean that you set targetSdkVersion to 26?
Bryan
yeah
:(
live and learn
the nice thing is that my app has an expected persistent notification
but currently I have multiple services that were running in the background
it seems that I need to move the functionality of those into one service that is attached to the notification
4:10 PM
Bryan
so they can run in the background
is that correct?
Mark M.
probably
Bryan
meaning the service running in the background has to be bound to the notification
Mark M.
I have not experimented with that scenario
Bryan
it doesn't whitelist all services from an app if they have a notification
ok
Mark M.
mostly because having 2+ services running simultaneously is a code smell
it is possible that having a single foreground service is sufficient
but I haven't tried it
Bryan
yeah, when I originally wrote it it seemed good to separate the functionality out
Mark M.
separate functionality, in terms of Java classes, is fine
separate functionality, in terms of independent services, is probably overkill
Bryan
makes sense
ok, thanks for the time!
Mark M.
off the cuff, having a single foreground service ought to work
assuming that all of the services are in one process
as "foregroundness" is a process-level construct
Bryan
yeah, I hope to merge them all down into that and move over to rxjava
Mark M.
("foregroundosity"? "foregrounditude"?)
Bryan
I think they all work ;)
have a good rest of your day!
I am sure I will be back soon
Mark M.
you too!
4:20 PM
Dave S.
has entered the room
4:25 PM
Mark M.
hello, Dave!
how can I help you today?
4:30 PM
Bryan
has left the room
Dave S.
Hey, Mark. I finally broke down and j'ined up. I did NOT expect a 4500-page book! Are you now doing office hours? I sort of stumbled onto this page. In the future, to get into an office hours lecture, seminar, colloquiem, whatever it's called, do I just go straight to https://commonsware.campfirenow.com/room/249110, or does the last part of the URL change, and if so, how do I get it? Do I sign up somewhere, email you, etc.
Mark M.
"I did NOT expect a 4500-page book!" -- well, technically, there are three books, with a fourth on the way
Dave S.
Colloquium
Mark M.
"Are you now doing office hours?" -- been doing 'em for the better part of a decade: https://commonsware.com/office-hours/
"does the last part of the URL change" - yes
"how do I get it?" -- visit https://wares.commonsware.com, log in, click the "Office Hours" nav bar link
if the chat is live, that link is in green, and there's an "Enter the Chat" button above the calendar of upcoming chats
Dave S.
Ah. Just go to the URL I mentioned and you'll have changed the last part to something else.
4:35 PM
Mark M.
the Campfire chat room URL is different on each chat
at least, I think
I haven't really paid attention to that part
I've been focusing on the URL that goes into the Warescription site
Dave S.
BTW, I MEANT to ask "are you doing office hours right at the moment." I knew you had done so for awhile
Mark M.
yup, in the rotating schedule, I have office hours today from 4-5pm US Eastern
4:40 PM
Dave S.
Well, my daughter's boyfriend, who is about 50, had a stroke, I just found out, so I have to leave abruptly. He went to a local hospital and they plan to send him to U. of Cincinnati. Thank God. Local is very lacking. Anyway, thanks for all the hard work you've done over a couple decades, I guess, or more. Including helping me so many times. Thanks especially for that. I'm sitting tight waiting for news about which hospital, but I'm still going to leave the room.
4:45 PM
Mark M.
my condolences -- I wish everyone the best of luck
Dave S.
has left the room
Mark M.
and thanks for the kind words!
4:55 PM
Mark M.
turned off guest access

Yesterday, January 23

 

Office Hours

People in this transcript

  • Bryan
  • Dave Slomer
  • Mark Murphy