a-marenkov / gsheets

A Dart library for working with Google Sheets API.
Other
79 stars 31 forks source link

gSheet issue when app is built #8

Closed inosuke80171 closed 4 years ago

inosuke80171 commented 4 years ago

Good day! I have an issue with my app using this package. I got my app connected to a spreadsheet using your package. But when I build the app into apk and install it to my phone (android) to test it, it no longer works. I mean, it can no longer fetch the data from the spreadsheet. Tried it with multiple android phones, but to no avail. But when I run the app from Android Studio, it works just fine.

a-marenkov commented 4 years ago

@inosuke80171

Hi! Thanks for checking out gsheets library!

My guess is that you running into socket exception in release mode.

Try adding internet permission into android manifest file (to enable internet in release mode).

<uses-permission android:name="android.permission.INTERNET"/>

If it does not solve your problem, could you please provide me with error stack trace or minimal example that reproduces the issue.

Thanks!

a-marenkov commented 4 years ago

@inosuke80171

Hi did it help to solve the issue?

inosuke80171 commented 4 years ago

Yes, that solved the issue! Sorry, my bad..

Also, this is completely unrelated, but is there a way that I could fetch all the users that have access to a private spreadsheet, as well as their user privileges?

Great package, by the way!

a-marenkov commented 4 years ago

@inosuke80171

Sure, try following:

  final gsheets = GSheets(_credentials);
  final ss = await gsheets.spreadsheet(_spreadsheetId);
  print(await ss.permissions());

You can also share and revoke permissions programmatically.

inosuke80171 commented 4 years ago

Awesome, thanks!

moyosolaa commented 2 years ago

@inosuke80171

Hi! Thanks for checking out gsheets library!

My guess is that you running into socket exception in release mode.

Try adding internet permission into android manifest file (to enable internet in release mode).

<uses-permission android:name="android.permission.INTERNET"/>

If it does not solve your problem, could you please provide me with error stack trace or minimal example that reproduces the issue.

Thanks!

Hi, I have the same issue. Internet permission is added to the manifest, every other task that require Internet works fine except the one to upload to Google sheet. It works fine in the emulator but not real device