Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

FMX Cloud Pack don't works on SDK >= 26?

 Post Reply Post Reply
Author
Schröder Heiko View Drop Down
Member
Member
Avatar

Joined: 30 Nov 2010
Posts: 43
Post Options Post Options   Quote Schröder Heiko Quote  Post ReplyReply Direct Link To This Post Topic: FMX Cloud Pack don't works on SDK >= 26?
    Posted: 05 Feb 2019 at 4:46pm
Hello,

could you update your demo apps please, because it seems some of them are not working under SDK>=26 (new requirement to update apps in Google Play Store!)

My problem: my Android app uses FMX Cloud Pack since some years. But now if I compile my app in RAD Studio 10.3 Rio and want to connect to the Cloud services Dropbox and GDrive for SDK>26 I will get the error: "EJNIException with message android.os.NetworkOnMainThreadException".
SdkVersion is the following: <uses-sdk android:minSdkVersion="20" android:targetSdkVersion="28" /> 

I ckeched the same source code in RAD Studio 10.1 with the current version of the FMX Cloud Pack but another SdKVersion and it works!
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="14" /> 

That's why I thought I can check your CloudStorageDemo, but it seems it isn't SDK>=26 compatible.

In UCloudStorageDemo you have to use another user folder, otherwise you will get an error.
Or you have to implement the new restriction access with the FileProvider to get acces to another folders!

  {$IFDEF MOBILE}
//  fn := TPath.GetSharedDocumentsPath + PathDelim;
  fn := System.SysUtils.IncludeTrailingPathDelimiter(System.IOUtils.TPath.GetHomepath);
  {$ELSE}
  fn := ExtractFilePath(Paramstr(0));
  {$ENDIF}
In your StorageDemo if I try to connect to Dropbox or Google Drive I will get the error "Java Class JCustomTabsIntent_Builder not found" on line 222 in FMX.TMSCloudBaseFMX.pas

Could you give me an answer if you know about the problems and you will work on it to fix it?


Best regards
Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2081
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 05 Feb 2019 at 4:58pm
Hi,

Thank you for notifying us.
We are currently investigating this issue and will report back as soon as possible.
Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2081
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 07 Feb 2019 at 9:56am
- We haven't been able to reproduce the NetworkOnMainThreadException.
Can you please provide the following information so I can further investigate this?
Does the issue also occur in the demo or only in your own application?
Which version of Android are you using?

- The GetSharedDocumentsPath has been replaced in the demo.
The update will be available with the next release of TMS FMX Cloud Pack.

- To avoid the "JCustomTabsIntent_Builder" error, please follow instructions on this page: https://www.tmssoftware.com/site/externalbrowser.asp
Back to Top
Schröder Heiko View Drop Down
Member
Member
Avatar

Joined: 30 Nov 2010
Posts: 43
Post Options Post Options   Quote Schröder Heiko Quote  Post ReplyReply Direct Link To This Post Posted: 07 Feb 2019 at 6:47pm
Hello,

thanks for the response. The NetworkOnMainThreadException is in my application on Android 9.
It looks for  a special folder on GDrive.

I can test it tomorrow on Android 6.0.1 with the current version of FMXCloud Pack.
Back to Top
Schröder Heiko View Drop Down
Member
Member
Avatar

Joined: 30 Nov 2010
Posts: 43
Post Options Post Options   Quote Schröder Heiko Quote  Post ReplyReply Direct Link To This Post Posted: 13 Feb 2019 at 3:21pm
Hello,

I was able to solve the error: "EJNIException with message android.os.NetworkOnMainThreadException".

It was a thread issue in my app. 

In SDK<26 the usage of TMS Cloud Pack function like "TMSGoogleDrive.SearchFolder()" in TThread.Synchronize() is possible, Later on Android it isn't no more possible and I have to do such function calls in TThread.CreateAnonymousThread();



Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down