GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Does this not work with Android? · Issue #1696 · googleapis/google-cloud-java

Does this not work with Android? #1696

New issue
Copy link
New issue
Copy link
Closed
Closed
Does this not work with Android?#1696
Copy link
Assignees
garrettjonesgoogle
Labels
android

Description

@Orbyt
Orbyt
opened on Mar 5, 2017
Issue body actions

I've had nothing but issue after issue, and still have not been able to get my app to run after adding the gradle dependencies listed in the docs:

compile group: 'com.google.cloud', name: 'google-cloud-storage', version: '0.9.3-beta'

Instead of copying over all the issues and error messages, i'll link to the unanswered StackOverflow question i've already posted: http://stackoverflow.com/questions/42601917/accessing-cloud-storage-from-android

As mentioned, i've run into many issues and have still yet been able to run the app without errors. Before wasting even more of my time, I wanted to confirm if it's even possible to use this client library with Android.

If it is not, how should I interact with my Cloud Storage buckets? All I'm trying to do is pull down some media stored in Cloud Storage.

Activity

Next
  1. suntzu93 commented on Mar 5, 2017

    @suntzu93
    suntzu93
    on Mar 5, 2017
    More actions

    I have same issue :(
    My gradle :
    dependencies {
    compile 'com.android.support:appcompat-v7:25.0.1'
    compile 'com.microsoft.projectoxford:vision:1.0.374'
    compile 'com.android.support:recyclerview-v7:25.0.1'
    compile ('com.google.code.gson:gson:2.2.4')
    compile 'com.android.support:design:25.0.1'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile group: 'com.google.cloud', name: 'google-cloud-translate', version: '0.9.3-alpha'
    }
    And i got a message :
    Warning:WARNING: Dependency org.apache.httpcomponents:httpclient:4.0.1 is ignored for debug as it may be conflicting with the internal version provided by Android.
    Warning:WARNING: Dependency org.json:json:20151123 is ignored for debug as it may be conflicting with the internal version provided by Android.

  2. Orbyt commented on Mar 5, 2017

    @Orbyt
    Orbyt
    on Mar 5, 2017
    Author
    More actions

    @thanhlv93 You can get rid of those warning by excluding the relevant groups like the following:

    compile ('com.google.cloud:google-cloud-storage:0.9.3-beta') {
            exclude group: 'org.apache.httpcomponents'
            exclude group: 'org.json'
        }
    

    However, this does not resolve the root issue and will only remove the warnings. I've spoken to a few individuals who seem to have suggested that this library is NOT compatible with Android, but weren't completely sure. I would appreciate if a team member from Google can chime in here.

  3. suntzu93 commented on Mar 6, 2017

    @suntzu93
    suntzu93
    on Mar 6, 2017
    More actions

    @Orbyt thank you for your suggest , i've can get rid of those warning .

  4. garrettjonesgoogle commented on Mar 6, 2017

    @garrettjonesgoogle
    garrettjonesgoogle
    on Mar 6, 2017
    Contributor
    More actions

    We have not done any specific work to make google-cloud-java compatible with Android, and there are a number of known issues (as you have discovered). First-class Android support will come at a later date.

    Reacted by Orbyt
  5. garrettjonesgoogle
    added
    android
    on Mar 6, 2017
  6. Orbyt commented on Mar 6, 2017

    @Orbyt
    Orbyt
    on Mar 6, 2017
    Author
    More actions

    @garrettjonesgoogle Thank you for the confirmation. A few follow up questions:

    • I took the Google Cloud Client Library for Java to mean Android. What kind of client application is this library suppose to be for then? Someone suggested this is for App Engine, which confuses me as this is a client library and App Engine is server side.

    • If not this SDK, how do I access Cloud products from Android? For example, I have a .mp4 in Google Cloud Storage. How can I get the video from my Android application?

    Thanks!

  7. garrettjonesgoogle commented on Mar 6, 2017

    @garrettjonesgoogle
    garrettjonesgoogle
    on Mar 6, 2017
    Contributor
    More actions

    This library is currently aimed primarily at server applications that need to make calls to GCP services. (In this scenario, the "server application" is the "client" of the "GCP servers".)

    Our currently-recommended way is to have your own server (e.g. on App Engine) that makes the calls to GCP, and your own Android app makes calls to your server. The reason is that google-cloud-java only has support for 2LO auth (service-account-based), not 3LO auth (user-account-based). If you make calls from your android app with 2LO auth, it's theoretically possible for someone to steal your service credentials from your app and use them in their own app. This isn't a problem with 3LO, though. With your App Engine app, you can use 3LO auth.

    Reacted by Orbyt
  8. Orbyt commented on Mar 7, 2017

    @Orbyt
    Orbyt
    on Mar 7, 2017
    Author
    More actions

    @garrettjonesgoogle I see, thank you for the information.

    This does prompt another question though. As I understand it Firebase Storage is essentially a wrapper around Google Cloud Storage. If I store something using Firebase Storage, it stores it in a bucket in Cloud Storage. Yet, I can interact with Firebase Storage (and thus Cloud Storage) directly from my mobile application. How does this not breach the same security concerns you've listed?

  9. swftvsn commented on Mar 7, 2017

    @swftvsn
    swftvsn
    on Mar 7, 2017
    More actions

    Firebase storage can be used with Google Cloud Storage as it stores the files there, but it uses Firebase specific security rules to protect the content. Essentially the Firebase project is granted access to GCS and when a client makes a request, they enforce the security rules you have given.

    Using a 2LO auth bypasses the Firebase security rules and accesses the files directly and should not be used in an app as the used credentials can be stolen easily from the deployment.

    The 3LO auth that Firebase uses (which is actually the same as Googles under the hood.) is used to add the "current user" info to the request, which is then validated against the Storage rules you give. See here: https://firebase.google.com/docs/storage/security/

    So you really should be using the Firebase Android library to access the files, or if not using Firebase, you essentially need to create your own per-user-acl system if I understand correctly.

    Note that I'm not in any way affiliated with Google nor Firebase, so if anyone can validate my assumptions correct I would be gratefull.

  10. Orbyt commented on Mar 8, 2017

    @Orbyt
    Orbyt
    on Mar 8, 2017
    Author
    More actions

    @swftvsn Thank you for the information.

    I suggest a notice should be added in the documentation that clearly specifies that Android is not supported. As mentioned earlier, I assumed a "Client library for Java" to be used in a client side Java application, such as a mobile app. Others have had the same assumption, as noted by this issue, others issues like #1361, and more.

    If required I can submit a pull request, however this should be a simple change for a current contributor.

  11. garrettjonesgoogle commented on Mar 8, 2017

    @garrettjonesgoogle
    garrettjonesgoogle
    on Mar 8, 2017
    Contributor
    More actions

    Agreed. We will make a note in the docs.

  12. garrettjonesgoogle
    added
    docs
    Status: Release Blocking
    on Mar 8, 2017
  13. lesv commented on Mar 14, 2017

    @lesv
    lesv
    on Mar 14, 2017
    Contributor
    More actions

    I've both the README.md for the project and the site/index.html (FAQ) #1747 & #1746

  14. lesv commented on Mar 14, 2017

    @lesv
    lesv
    on Mar 14, 2017
    Contributor
    More actions

    Internal bug written b/36197699

  15. 13 remaining items

  16. Proxcentaur commented on Oct 20, 2020

    @Proxcentaur
    Proxcentaur
    on Oct 20, 2020
    More actions

    For machine learning there's also this: https://developers.google.com/ml-kit and https://firebase.google.com/products/ml

    Maybe the built in solution is enough? https://developer.android.com/reference/android/speech/SpeechRecognizer

    the built-in solution isn't enough, because the voice that I want to convert from speech to text is a .flac file from user mobile storage, and I think google cloud speech is more accurate than the built-in solution

  17. JustinBeckwith
    assigned
    garrettjonesgoogle
    on Feb 1, 2021
  18. meltsufin
    added a commit that references this issue on Dec 22, 2025

    chore(deps): update dependency com.google.cloud.samples:shared-config…

    992d347
  19. chingor13
    added a commit that references this issue on Jan 22, 2026

    chore: Update generation configuration at Fri Jan 3 02:23:25 UTC 2025 (…

    732ae66
  20. chingor13
    added a commit that references this issue on Feb 24, 2026

    chore(deps): update dependency org.slf4j:slf4j-api to v2.0.17 (#1696)

    24b47c7
  21. suztomo
    added a commit that references this issue on Mar 11, 2026

    chore(deps): update dependency com.google.cloud.samples:shared-config…

    57fc2d3
  22. chingor13
    added a commit that references this issue on Mar 12, 2026

    chore(deps): update dependency org.slf4j:slf4j-api to v2.0.17 (#1696)

    035e9de
  23. suztomo
    added 2 commits that reference this issue on Mar 23, 2026

    deps: update dependency com.google.cloud:google-cloud-trace to v2.47.0 (

    7db29b4

    chore(main): release 2.20.2 (googleapis#1678)

    4492913
  24. suztomo
    added a commit that references this issue on Mar 30, 2026

    deps: update dependency com.google.cloud:sdk-platform-java-config to …

    4c76967
  25. lqiu96
    added a commit that references this issue on Apr 1, 2026

    deps: update dependency com.google.cloud:sdk-platform-java-config to …

    82a924e
  26. meltsufin
    added 4 commits that reference this issue on Apr 29, 2026

    deps: update dependency org.graalvm.buildtools:native-maven-plugin to…

    cc9ae19

    chore(main): release 1.133.0 (#2206)

    a3b6539

    deps: update dependency org.graalvm.buildtools:native-maven-plugin to…

    6447202

    chore(main): release 1.133.0 (#2206)

    1180af9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @garrettjonesgoogle
    garrettjonesgoogle

Labels

android

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.