May 27, 2018 06:01
I'll check out your code tomorrow - it's 2am where I live
May 27, 2018 06:01
Log.d should work with InputMethodService, I have Log statements in my code that work fine.
May 26, 2018 21:03
Also, in regards to your question about why no Log.d is shown on logcat, I'm a little confused because the code you sent does not have any Log.d() method
May 26, 2018 21:03
So, moving the code to onStartInputView is a partial improvemnet
May 26, 2018 21:02
but other times, the recyclerview will not show any items
May 26, 2018 21:02
For example - sometimes when I open my keyboard, the recyclerview will show its items
May 26, 2018 21:02
In response to your question - for some reason mainview.tabRecyclerView.adapter = ... (with or without notifyDataSetChanged) afterwards works, but inconsistently.
May 26, 2018 20:54
@pskink Apologies, the documentation also says "to deal with input starting within the input area of the IME." in reference to onStartInputView, which made me think that it was called if you had a search bar (or EditText) within a custom keyboard. Now I'm confused because the sentence I found from the documentation and the sentences you found within the documentation seem to contradict, even though they are from the same document located at: developer.android.com/reference/android/inputmethodservice/…
May 26, 2018 20:54
@pskink It seems like onStartInputView is called after onCreateInputView. So, setting my adapters in that method could work. However, looking at the documentation for that method, it seems like that is not the proper place to set my adapters/use notifyDataSetChanged().
May 26, 2018 20:54
@pskink I know I can just call setAdapter(), but for some reason setAdapter() does not work if I call it while onCreateInputView() has not finished. I need to call setAdapter() once onCreateInputView() has finished running and returned the object mainview. Unfortunately, I can't call setAdapter() from within a coroutine, so I'm forced to call setAdapter() inside onCreateInputView() and use a coroutine to call notifyDataSetChanged() with a delay of 1 milliseconds, so I know that onCreateInputView has finished
May 26, 2018 20:54
@pskink Setting the adapter and not calling notifyDataSetChanged() doesn't do anything. I believe either [A] the adapter must be set after the onCreateInputView method has been finished or [B] if the adapter is set before onCreateInputView is finished, then notifyDataSetChanged() must be called after onCreateInputView is finished.
 
Apr 3, 2018 20:57
I do need to learn more about web development so next time I can recognize tricks like this.
Apr 3, 2018 20:56
I implemented your SM_Token technique and it worked! Thanks a bunch.
Apr 2, 2018 23:27
Thanks a lot.
Apr 2, 2018 23:27
Ok - I'm going to try experiment with this some more. Unfortunately, I'm out of time today, so can I set up a chat room with you tomorrow? You've been really helpful and I appreciate someone taking the time out of their day to help a stranger.
Apr 2, 2018 23:26
but I'm still getting token_expired. It's possible I'll have to automate this with javascript in order to be fast enough
Apr 2, 2018 23:25
and substituting the SM_Token and SM_URL values
Apr 2, 2018 23:25
Hmm.. this is hard. The way I'm doing it right now, is I'm taking this token (from when I opened up console and used the website to get a summary by hand): smmry.com/…
Apr 2, 2018 23:22
oh yeah - that might be what happened
Apr 2, 2018 23:19
but it said the token had expired
Apr 2, 2018 23:19
I tried on my own with the following URL: smmry.com/…
Apr 2, 2018 23:15
with the token
Apr 2, 2018 23:15
let me try typing out the correct URL
Apr 2, 2018 23:15
Ok, so I found another failed fetch() request, and found the following code URL inside of the html: smmry.com/…
Apr 2, 2018 23:10
why is it really easy?
Apr 2, 2018 23:09
how so?
Apr 2, 2018 23:08
First, though, I'm going to try to simulate the request header under XHR as closely as possible
Apr 2, 2018 23:07
I'm new to coding extensions, but I'll take a shot at doing that.
Apr 2, 2018 23:06
and then do fetch()
Apr 2, 2018 23:06
yeah, that could work too, open an invisible iframe with the page, so it fully loads with javascript/simulating the user
Apr 2, 2018 23:04
right now - the extension seems to work if a user manually visits the smmry.com/<insert-url> link beforehand. So this could work
Apr 2, 2018 23:04
then performs the fetch() request
Apr 2, 2018 23:03
then closes it
Apr 2, 2018 23:03
By the way, what do you think of the following workaround: Whenever the user clicks the link, the extension actually opens up a new tab for let's say... 1 to two seconds
Apr 2, 2018 23:02
Even though - I might also try opening the page through an invisible iframe
Apr 2, 2018 23:02
I'm going to look at the summary response
Apr 2, 2018 23:01
Hmm... my javascript test was useless, it said "please enable javascript" whether I manually downloaded the page or got it through a fetch() request
Apr 2, 2018 22:59
One second, I'm going to try my javascript interpreter test first
Apr 2, 2018 22:57
Ok, one second.
Apr 2, 2018 22:53
I'm going to test if the problem is a lack of a javascript interpreter
Apr 2, 2018 22:52
Hmm...
Apr 2, 2018 22:49
if you want too
Apr 2, 2018 22:49
I'll upload my code, so you can take a look.
Apr 2, 2018 22:49
Forging the headers didn't seem to work - but it's also possible that my code is terrible.
Apr 2, 2018 22:37
so, I'll try sticking that into my fetch request
Apr 2, 2018 22:37
I wasn't sure how to view the headers of the fetch() request through the FF console, but I did find out my own user agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0
Apr 2, 2018 22:33
fair enough - I'll try faking the headers first
Apr 2, 2018 22:31
Maybe I need a "Javascript interpreter"?
Apr 2, 2018 22:30
        <div style="position:relative;top:10px;left:0px;font-family:Verdana, Arial, Helvetica, sans-serif;font-size:17px;font-weight:bold;background-color:#EEFA11;width:600px;">PLEASE ENABLE JAVASCRIPT FOR THIS SITE TO WORK</div>