Closed uryevich closed 4 years ago
Stock iitc also suffers from this problem in canvas rendering mode. And iitc-ce has canvas by default..
May be there is a bug in WebView (https://stackoverflow.com/questions/30223117/draw-webview-into-a-canvas-in-android-l).
Notes:
May be it's possible to fix getDrawingCache
for canvas (I saw some posts at stackoverflow)
Or use some other api. I saw these was recommended (among others):
@modos189 , could you look at this?
I can try, but have little experience in Android development.
I replaced deprecated getDrawingCache to Canvas https://github.com/IITC-CE/ingress-intel-total-conversion/commit/347fee00e9497c4c710d6cf09f588709152a7439
But in screenshots there are no portals for another reason. We need to disable hardware acceleration to have access to the portals and links. https://github.com/IITC-CE/ingress-intel-total-conversion/commit/bfb1a94fdd32e3a4ea2c7825d5235e98a739c64e
If we do this, it will return the speed of the IITC to SVG.
I'll try to take a screenshot using JavaScript. If it does not work, I propose to remove function of creating screenshots.
We can remove screenshot sharing until solution not found. I believe such base functionality should be possible, we just need find proper way.
May be portals not shown because it is needed to capture them in some particular moment? Isn't onDraw
related?
https://stackoverflow.com/questions/20942623/which-can-replace-capturepicture-function/20963109#20963109
https://stackoverflow.com/questions/19856832/how-to-use-ondrawcanvas-to-obtain-a-bitmap-snapshot-of-the-webviewandroid
Edit
As per [enableSlowWholeDocumentDraw](https://developer.android.com/reference/android/webkit/WebView.html#enableSlowWholeDocumentDraw()) documentation: using onDraw
we still need enableSlowWholeDocumentDraw
...
After googling I found almost nothing promising.. (But I still want to mention that there was advise recommending using of TextureView, and another: use page print).
If it does not work, I propose to remove function of creating screenshots.
I'd would not remove function completely, as someone still have the possibility to disable preferCanvas
option (for some reason).
In mobile version, when sharing screenshot with map view, there is no portal circles and links/fields on a result image. Portal names if it turned on in plugins appears.