Hi,
What is the best way of sharing data between a firemonkey windows application and a firemonkey mobile app?
Thanks,
Ken
Hi,
Can you please explain which component(s) from the TMS Cloud Pack for FireMonkey you are using and exactly what data you would like to share between the windows and the mobile app?
I am trying to decide which component is best to use. I need to obtain a list of items that are in a SQLite table.
This depends on which API service you would like to use or are using. Can you please further explain what you would like to use the TMS Cloud components for?
I have similar question. I use interbase Lite version on my mobile app and MS access on my desktop. Then I would like to synchronize them. I know Cloud pack doesn't support directly on database table synchronization. The way in my mind is to upload my mobile database to cloud, then have my desktop application to grap it, then do the syn. I have tried google drive, it seems that google registration is quite different from what is in the TMS guide, I got lost and gave up. I also tried dropbox, it didn't work for me. I am wondering if you have some suggestion on data synchronization between apps.
Thanks!
As services change their signup all the time, we have put information online about registration process rather than keeping updating doc that gets outdated.
The latest info on registration for a cloud storage service can be found here:
it seems that the signup pages are changed again from Google drive and dropbox. The web pages are quite different from the latest TMS help document. At present, I got stuck at CallBackURL and Callback port. They need to be the same as what I got at my service/app registration time. I just couldn't find out where to find out these information. The TMS help online documents out-dated again. Is it a way to create a simple account at google and dropbox and show us everything on the screen. Where those callbackURL and CallbackPort locate?
Thanks!
Gene.
Hi,
Hi, Bart,
Thanks for posting those useful help information!
I followed these instructions and successfully create Google/Dropbox API Key,.... But I still have a question about the CallBackURL.
What are CallBackURL and CallBackPort Exactl? I can only see they are empty when I am in the pages that have API Key, Secret... The CallBaclURL is empty. I am a bit confused if I should put in the default http://127.0.0.1:8888, or www.dropbox.com for dropbox and www.google.com for google drive.
It seems that I can get a google login window when I set googledrive component:
TMSFMXCloudGDrive1->App->CallBackURL = "http://www.google.com";
TMSFMXCloudGDrive1->App->Key = "";
TMSFMXCloudGDrive1->App->Secret = "";
TMSFMXCloudGDrive1->DoAuth();
I put in my user name and password in to that sign in form, but it doesn't let me in. I am wondering if there is somewhere I should check to give authorization or grant access to that user. Is there more information about this?
I am making progress, it seems that I am almost there to get my app connected to the cloud. Thanks a lot for your help!
Gene.
You can use the default CallBackURL (http://127.0.0.1:8888/) and CallBackPort (8888) value. Please note that if you are using multiple services in the same application it's recommended to use different port numbers for each service.
Hi, Bart,
That Help! I can sign in now. Then I see a form asking if I allow to access my files!
What I am doing is to copy a file from my android app and paste to google drive. Everything needs to be done without that signing in form, Is it possible to store this user name and password somewhere to sign in?
What will be the next step for me? Should I create an instance of TTMSFMXCloudItems and access the files and folders?
Unfortunately, I have only c++ Builder 10 Seattle version. It doesn't include Delphi. So I can't open the sample project to learn what is in there. Another question is if you have sample projects for C++ Builder? I have to go through the document to learn.
Thanks!
Gene.
To do further access, you'd just persist the access tokens and the next time the app is started, you load the persisted access tokens and can continue to work without requiring a new login. See SaveTokens / LoadTokens functionality.
SaveTokens / LoadTokens are methods of TTMSFMXCloudStorage. The sample codes in the manual is for delphi, I have trouble to get it to work. The trouble line is:
if (Sender is TTMSFMXCloudStorage)
then begin cs := Sender as TTMSFMXCloudStorage;
cs.SaveTokens;
end;
I had it converted to this:
TTMSFMXCloudStorage* Ptr;
if (Sender->ClassType() == TTMSFMXCloudStorage) {
Ptr=(TTMSFMXCloudStorage*) Sender;
Ptr->SaveTokens();
};
That doesn't work. The error message says "E2108 Improper use of typedef 'TTMSFMXCloudStorage'". I just don't know how to fix that.
Another thing here is what StorageComponent.Upload(filename) is? Is StorageComponent a part of TMSCloud component? I couldn't find it. I searched the manual and found nothing. Can you give more info on that?
Thanks!
Hi, that works! Now I can copy data file to my google drive. That is great!
Is it a way yo get rid of that google form saying "allow offline access"? Or can I just use a default value for it?
It seems that this doesn't work:
if (typeid(Sender) == typeid(TTMSFMXCloudGDrive))
I have a TTMSFMXCloudGDrive on my form. I need to check if the sender from TMSFMXCloudGDrive1ReceivedAccessToken event is the TTMSFMXCloudGDrive type. Can I use __Classid()?
On windows, everything works ok. But on android, The authen windows doesn't have the "Have offline access" "Allow" and "Deny" clickable. Has any one else had that problem? I am on C++ Builder 10 Seattle/ windows 7 64bit.
Thanks!
1)
it is weird, I re-compiled the project and it worked on android this morning.
Anyway, thanks a lot to get me through!
is it a way to check if my upload is successful?