Jump to content

Yaron

Members
  • Content Count

    168
  • Joined

  • Last visited

  • Days Won

    1

Yaron last won the day on November 13 2018

Yaron had the most liked content!

Community Reputation

34 Excellent

Technical Information

  • Delphi-Version
    Delphi 10.3 Rio

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I'm not sure it's compatible with recent changes in v10.3.2 and 10.3.3.
  2. What do I use to extract the resources and what do I use to them rebuilt the file and make it accessible in the IDE? Remember, I only need to change a few RGB values, not really anything too complex. I guess if I can't share my work, I'll just document which values I changed.
  3. I'm aware that with recent versions, the theming has been rewritten so I'm wondering if there's any tool/editor supporting the latest Delphi theming features that would let me specify my own RGB values for each UI element. I would like to create an alternative dark theme that's more utilitarian. While I prefer a dark theme for eye strain, I find the current dark theme too flat with UI elements that I expect to be on a different plane (color) becoming merged visually (e.g. Scrollbars widgets). I'm aware there are a few other dark'ish themes included, but they too suffer from their own issues so I would rather create (and share of course) my own color-theme.
  4. Yaron

    Android, TWebBrowser & Uploading files

    It seems the problem is specific accept=".jpg, .jpeg" or even accept=".jpg" using accept="image/jpeg" works just fine.
  5. Yaron

    Android, TWebBrowser & Uploading files

    I figured out why it's crashing in my code and not in the simple sample page, If the HTML form file input has an "accept" field (e.g. "<input type="file" accept=".jpg, .jpeg" name="UploadImage" required>"), the App will crash. Since I may not have control over the form's design, I am still looking for a solution around this issue. You can easily test this with the code I linked in the previous post by replacing: WebBrowser.Navigate('https://ps.uci.edu/~franklin/doc/file_upload.html'); With: WebBrowser.LoadFromStrings( '<HTML><HEAD><TITLE>Test</TITLE></HEAD><BODY>'+ '<form method="post" enctype="multipart/form-data" action="https://bla.com">'+ '<input type="file" accept=".jpg, .jpeg" name="UploadImage" required>'+ '<input type="submit" value="Save">'+ '</form>'+ '</BODY></HTML>','');
  6. Yaron

    Android, TWebBrowser & Uploading files

    I also tried recreating the FManager component after each page load like this: procedure TMainForm.WebBrowserDidFinishLoad(ASender: TObject); begin FManager := nil; {$IFDEF TRACEDEBUG}AddDebugEntry('Create FWebManager (before)');{$ENDIF} Try FManager := TWebChromeClientManager.Create(WebBrowser); Except on E: Exception do begin {$IFDEF TRACEDEBUG}AddDebugEntry('Error creating FWebManager : '+E.Message);{$ENDIF} end; End; {$IFDEF TRACEDEBUG}AddDebugEntry('Create FWebManager (after)');{$ENDIF} end; But it didn't help, still crashes instantly after pressing the button.
  7. Yaron

    Android, TWebBrowser & Uploading files

    Sadly, this issue is not resolved. Like you wrote, it only works if the TWebBrowser component is visible and I verified that it works using the very simple upload form you linked to originally. However, when using it in a more complicated form, after browsing through several pages within the WebView to reach the form, clicking the button just terminates the App instantly (no UI error message). Looking at the logcat, here's the output: 11-28 12:44:35.138 3138 3240 I InputDispatcher: Delivering touch to (3807): action: 0x0, toolType: 1 11-28 12:44:35.138 3807 3807 D ViewRootImpl: ViewPostImeInputStage processPointer 0 11-28 12:44:35.208 3138 3241 D InputReader: Input event(9): value=0 when=3853093882434000 11-28 12:44:35.208 3138 3241 D InputReader: Input event(9): value=0 when=3853093882434000 11-28 12:44:35.208 3138 3241 I InputReader: Touch event's action is 0x1 (deviceType=0) [pCnt=1, s=] when=3853093882434000 11-28 12:44:35.208 3138 3240 I InputDispatcher: Delivering touch to (3807): action: 0x1, toolType: 1 11-28 12:44:35.208 3807 3807 D ViewRootImpl: ViewPostImeInputStage processPointer 1 11-28 12:44:35.238 3807 3807 D Instrumentation: checkStartActivityResult() : Intent { act=android.intent.action.GET_CONTENT cat=[android.intent.category.OPENABLE] typ=.jpg } 11-28 12:44:35.238 3807 3807 D Instrumentation: checkStartActivityResult() : intent is instance of [Intent]. 11-28 12:44:35.238 3138 4840 D ApplicationPolicy: isIntentDisabled start :Intent { act=android.intent.action.GET_CONTENT cat=[android.intent.category.OPENABLE] typ=.jpg } 11-28 12:44:35.238 3138 4840 D ApplicationPolicy: isIntentDisabled return :false 11-28 12:44:35.238 3807 3807 W System.err: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.GET_CONTENT cat=[android.intent.category.OPENABLE] typ=.jpg } 11-28 12:44:35.238 3807 3807 W System.err: at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1878) 11-28 12:44:35.238 3807 3807 W System.err: at android.app.Instrumentation.execStartActivity(Instrumentation.java:1545) 11-28 12:44:35.238 3807 3807 W System.err: at android.app.Activity.startActivityForResult(Activity.java:4283) 11-28 12:44:35.238 3807 3807 W System.err: at android.app.Activity.startActivityForResult(Activity.java:4230) 11-28 12:44:35.238 3807 3807 W System.err: at com.embarcadero.rtl.ProxyInterface.dispatchToNative(Native Method) 11-28 12:44:35.238 3807 3807 W System.err: at com.embarcadero.rtl.ProxyInterface.invoke(ProxyInterface.java:21) 11-28 12:44:35.238 3807 3807 W System.err: at java.lang.reflect.Proxy.invoke(Proxy.java:393) 11-28 12:44:35.238 3807 3807 W System.err: at $Proxy12.onFileChooserIntent(Unknown Source) 11-28 12:44:35.238 3807 3807 W System.err: at com.delphiworlds.kastri.DWWebChromeClient.onShowFileChooser(DWWebChromeClient.java:29) 11-28 12:44:35.238 3807 3807 W System.err: at N6.a(PG:145) 11-28 12:44:35.238 3807 3807 W System.err: at xp.runFileChooser(PG:2) 11-28 12:44:35.238 3807 3807 W System.err: at android.os.MessageQueue.nativePollOnce(Native Method) 11-28 12:44:35.238 3807 3807 W System.err: at android.os.MessageQueue.next(MessageQueue.java:323) 11-28 12:44:35.238 3807 3807 W System.err: at android.os.Looper.loop(Looper.java:143) 11-28 12:44:35.238 3807 3807 W System.err: at android.app.ActivityThread.main(ActivityThread.java:7225) 11-28 12:44:35.238 3807 3807 W System.err: at java.lang.reflect.Method.invoke(Native Method) 11-28 12:44:35.238 3807 3807 W System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) 11-28 12:44:35.238 3807 3807 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) 11-28 12:44:35.248 1343 1516 D libEGL : eglTerminate EGLDisplay = 0xb690164c 11-28 12:44:35.258 1343 4318 I SurfaceFlinger: id=17304 Removed TurfaceView (4/10) 11-28 12:44:35.258 1343 1522 I SurfaceFlinger: id=17304 Removed TurfaceView (-2/10) 11-28 12:44:35.268 1343 1343 D libEGL : eglTerminate EGLDisplay = 0xbe93d3ac 11-28 12:44:35.888 3138 3240 W InputDispatcher: channel ~ Consumer closed input channel or an error occurred. events=0x9 11-28 12:44:35.888 3138 3240 E InputDispatcher: channel ~ Channel is unrecoverably broken and will be disposed! 11-28 12:44:35.888 3138 4840 I WindowState: WIN DEATH: Window{891996c u0 d0 PopupWindow:8f2b053} 11-28 12:44:35.898 3138 3914 D GraphicsStats: Buffer count: 11 11-28 12:44:35.898 1343 1522 I SurfaceFlinger: id=17305 Removed QopupWindow (5/9) 11-28 12:44:35.898 1343 19954 D libEGL : eglTerminate EGLDisplay = 0xb09a86fc 11-28 12:44:35.898 1343 1522 I SurfaceFlinger: id=17305 Removed QopupWindow (-2/9) 11-28 12:44:35.898 1343 19954 D libEGL : eglTerminate EGLDisplay = 0xb09a86fc 11-28 12:44:35.898 3138 3920 I ActivityManager: Process com.inmatrix.Voucherim (pid 3807)(adj 0) has died(274,734) 11-28 12:44:35.898 3138 3920 D ActivityManager: cleanUpApplicationRecord -- 3807
  8. Yaron

    Android, TWebBrowser & Uploading files

    Thanks Eli, Adding the library resolved the exception, however clicking on the choose file button still does nothing, so something else is preventing this from working in my own code and I can't seem to find out what. I posted the App's source here: https://inmatrix.com/temp/TestApp_src.zip It just wraps around a website, simply run it and click 'connect' (no need for name and pass, it just opens a sample file submission page)
  9. I tried that, it didn't work. Perhaps I didn't understand what you mean by "manually delete", I just used the project dialog to make sure all entries across debug/release/all configuration were the same and then changed the value on 'all configurations' to see if it affects the 'release configuration' (which it didn't).
  10. And if I have overridden the version number in the past, how can I restore it so it will be set again by 'all configuration'?
  11. For some reason, any data I entered under the Project Options version info's "all configuration" entries is not actually applied to the release/debug sections. And later on, I couldn't upload to the play store, because it was seeing the old version number from the "release" section. Is it just me, or am I misunderstanding what the "all configuration" entries actually do (I was assuming it was applying whatever I entered into both release/debug profiles so I don't have to do everything twice).
  12. Yaron

    Debugger in 10.3.3 is useless :'(

    Thanks, In a million years I wouldn't have made that connection.
  13. Yaron

    Debugger in 10.3.3 is useless :'(

    Where is that option? I can't seem to find it.
  14. Yaron

    Debugger in 10.3.3 is useless :'(

    Without any rationale?
  15. Yaron

    Android, TWebBrowser & Uploading files

    The demo project seems to work, but when porting the snippet into my own code I'm catching an exception when calling "FWebManager := TWebChromeClientManager.Create(VoucherimWebBrowser);" : "Error creating FWebManager : java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.ClassLoader java.lang.Class.getClassLoader()' on a null object reference" Other than renaming the variables/components, I used the exact same OnCreate override as in the sample and just added an "FWebManager := nil" when closing the app. You mentioned including the jar file, but I haven't seen anything in particular in the demo itself, so I'm assuming it's included by one of the units (which I also included in my project). Any ideas? If needed, I can post the entire source code for this app, it's just a wrapper around a web site. Unrelated, I get a hint while compiling: [DCC Hint] DW.WebChromeClient.Android.pas(98): H2443 Inline function 'TAndroidHelper.GetJActivity' has not been expanded because unit 'Androidapi.JNI.App' is not specified in USES list
×