Glucosio / glucosio-android

Glucosio Android App
GNU General Public License v3.0
338 stars 162 forks source link

Google Drive Backup Function Crashes #416

Open ghost opened 6 years ago

ghost commented 6 years ago

Exception java.lang.RuntimeException: Can't toast on a thread that has not called Looper.prepare() android.widget.Toast$TN. (Toast.java:390) android.widget.Toast. (Toast.java:114) android.widget.Toast.makeText (Toast.java:277) android.widget.Toast.makeText (Toast.java:267) android.widget.Toast.makeText (Toast.java:304) org.glucosio.android.activity.BackupActivity.n () org.glucosio.android.activity.BackupActivity.b () org.glucosio.android.activity.BackupActivity$7$1.run ()

Possibly Google has deprecated the way @paolorotolo originally implemented Google Drive Backup: https://developers.google.com/android/reference/com/google/android/gms/drive/DriveApi

ghost commented 6 years ago

Possibly same issue: Exception java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() android.os.Handler. (Handler.java:200) android.os.Handler. (Handler.java:114) android.widget.Toast$TN. (Toast.java:639) android.widget.Toast. (Toast.java:131) android.widget.Toast.makeText (Toast.java:434) android.widget.Toast.makeText (Toast.java:507) org.glucosio.android.activity.BackupActivity.n () org.glucosio.android.activity.BackupActivity.b () org.glucosio.android.activity.BackupActivity$7$1.run ()

ghost commented 6 years ago

Exception java.lang.NullPointerException: uriString android.net.Uri$StringUri. (Uri.java:477) android.net.Uri$StringUri. (Uri.java) android.net.Uri.parse (Uri.java:439) org.glucosio.android.activity.BackupActivity$8.a () org.glucosio.android.activity.BackupActivity$8.a () com.google.android.gms.common.api.internal.BasePendingResult$a.handleMessage () android.os.Handler.dispatchMessage (Handler.java:105) android.os.Looper.loop (Looper.java:156) android.app.ActivityThread.main (ActivityThread.java:6523) java.lang.reflect.Method.invoke (Method.java) com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:942) com.android.internal.os.ZygoteInit.main (ZygoteInit.java:832)

ghost commented 6 years ago

It doesn't look like any work has occurred on this that said @paolorotolo has agreed to look at it this weekend. It looks like the Google Drive code will need to be replaced as Google deprecated it. Why did it break? Because we updated to newer API level which deprecates it but older API level did not.

I'd love for us to have the discussion of adding login and letting users sync their data to a server we run so this does not continue to become an issue. We can also still offer Google Drive for those who want it!