Android Question Backup & restore from / to google-drive

TheRealMatze

Active Member
Licensed User
Hi,
for a new project without a own cloud-server i want to backup data to the users google-drive. I tried to understand how to, but i can´t find current informations. I found some threads here with demos, but i wasn´t able to run one without error...
I dont understand what to do. Why the "Google Cloud Platform" needs a payment methode from me?
Is there any working step-by-step example how to read and write files to the google-drive?

Thanks!
Matze
 

TheRealMatze

Active Member
Licensed User
Thank you Spavlyuk. That´s very interesting. The only problem is - i don´t want to restore all data anytime, i want to make a partitial restore. That´s not possible (if i read correct..) in this way.
 
Upvote 0

EcoGus

Member
Licensed User
Longtime User
Hello,

let's see if this can help you... I've been using this code for a long time to make copies in Google Drive for my databases; but in the last updates, this code stopped working for me. I've been doing some digging and I've seen various references to code, that you need to register with google, get an API code, etc. but it seems to me not very functional and a way to control us like, who, when we connect our software to google. I DO NOT LIKE IT.

I have seen that the problem is in the maximum versions of the SDK in the manifest....this does not have to be greater than "23"...then I paste the code...in this way, we execute the sending application of the android device. If you need the libraries or sample code or whatever, let me know.

Manifest:
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="23"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)

Example:
Sub Send
    ProgressDialogShow("Send to ...")
    
    Dim Dir, Filename As String
    Dir=File.DirDefaultExternal
    Filename="filename.zip"
    
    If File.Exists(Dir, Filename) Then
        Dim In As Intent
        Dim U As Uri
        U.Parse("file://" & File.Combine(Dir, Filename))
        In.Initialize(In.ACTION_SEND, "")
        In.SetType("text/plain")
        In.PutExtra("android.intent.extra.STREAM", U)
        StartActivity(In)
    Else
        ToastMessageShow("File send error",False)
    End If
    ProgressDialogHide
End Sub
 
Upvote 0
Top