CloudYouTube TestTokens returns true but empty str

Hello TMS,


I'm trying the youtube stuff out and while the win32 demo works with my keys, trying the same on Android TestTokens returns true but when I step into the function 

 resdat := HttpsGet(url, headers);

resdat is '' because of this :

function TTMSFMXCloudBase.HttpsGet(const Url: String; Headers: TCoreCloudHeaders): ansistring;
...
    if not Assigned(LJSSLContext) then
    begin
      Result := '';
      Exit;
    end;
...

But I don't see anything that I can differently. Any ideas ?

BTW. the Youtube demo does not work anymore because you renamed some components.

solved that, I need a explicit Connect in Android, in win32 (and the demo) it wasn0t necessary.

But now I get a android.os.NetworkOnMainThread Exception when I try to execute TestTokens.. Placing the connect process in a TThread.Queue didn't help.

Ideas ?

Hi,


Please follow instructions in the TMS FMX Cloud Pack PDF manual to enable external browser support for authentication.
The PDF manual can be downloaded from the product page.

I found the instruction and included the 2 jar files and disabled the other one. that works.


But the errors are the following atm.

1. The auth code that works in win32 does not work in Android the same way. In Android an explicit connect call is necessary. Maybe you could just insert the connect when HttpsGet is called and LJSSLContext isn't assigned yet ?

2. Android does not permit network calls on the main thread anymore. But the component (Youtube in my case) does them on the main thread, which causes an exception (android.os.NetworkOnMainThread). Could it be solved internally ?

Please update the demos, since you renamed components I have trouble finding working ones without editing dfm files first :(

best regards,
Helge 
  1. Please note that the Connect call performs a DoAuth call in the background after checking if tokens are available. Both techniques should be working as expected. 
    Can you please explain exactly when the issue occurs on Android and if you are seeing any error messages?

    2. This issue was fixed in a recent update of the TMS FMX Cloud Pack. Can you please make sure you are using the latest version?

    - We are not aware of any issues with the demo applictions. Please note that these where optimized for use on Windows, there might be some minor changes necessary to run them on Android.
    We'll look into improving the demos (specifically the Android compatibility) in a future version of the TMS FMX Cloud Pack.

    Can you please specify exactly which error messages you are seeing so I can further investigate this?


Well, with the most recent version it seems to work without another thread created by me.

In Delphi 10.1 and 10.2 I still get an error when I load the youtube demo project because the TListView has no OnClick.
Also when there is only 1 video to show in your account, there is no way to load it, because the OnChange is never called.

Greetings, Helge

Thank you for notifying us about the issues in the YouTubeDemo.

We'll have to investigate this and include an update in the next release of the TMS FMX Cloud Pack.