Does anyone know how to configure this correctly in Eclipse? Somehow I have both google-api-client-1.16.0-rc.jar (as an example) and 1.17 libs on the client. The 1.16 libs are generated by the GAE project when generating endpoints, not sure how the 1.17 libs got there. If I delete all the 1.16 libs on the client the app runs fine but I would really like to configure to the latest version.
I wouldn't mess with the libs generated for cloud endpoints. If it generates 1.16 then that is what endpoints is tested with, and probably what everyone else using endpoints is using. And I believe 1.16 is correct anyway - that's what my projects are using. The fact that it is one version behind (1.17 is current) is not a problem really - the google java client libraries have changed very little over the last few versions.
You can make sure you have the latest GPE (and you probably do since you get notified when updates are available), since this plays a role in endpoints, but like I said, I think 1.16 is correct for endpoints.
If you need Google Java Client Library for your own stuff, in the same project, I would personally stick to that same version - 1.16 - but you don't have to.
Related
In my current project we're working on mantaining/developing mobile (android/iOS) apps that use the services of the client's website (liferay 6.2). Whenever the guys in Backend generate new services (or just update an existing service to a new version with new features) we need to use the Liferay Mobile SDK 6.2.18, which uses really dated gradle 1 and http protocol, to generate a new jar library to allow the app call those new services.
As I guess many will know already, gradle recently deprecated HTTP in favour of HTTPS, and maven shortly after followed suit, so now we are completely unable to generate the jar libraries.
Unfortunately, our client won't accept upgrading Liferay to 7 - which Backend guys tell me would solve this bump in the road - so we need to find a workaround to this situation. I've tried searching both google in general (filtering by last month results) and SO in particular, but no dice.
Has anyone else here who found themselves in this situation managed to work around it?
Recently I've been working on integrating a GRPC API in a size sensitive android app. The API only had a couple of Unary calls. I noticed that the resulting APK had io.grpc (613KB) & io.opencensus (178.9KB) which was further reduced to 387.2KB and 39.4KB respectively using Proguard. I noticed that Proguard was able to remove many streaming call related classes/methods from the APK. However, I noticed that the app already had com.google.protobuf package, which I suspect is from something like Firebase SDK.
If Firebase SDK imported com.google.protobuf, why didn't it need io.grpc for transport? Does it use something else?
The protobuf protocol is used by some Firebase SDKs as part of their internal communications. The first one that comes to mind is Firebase Analytics, but there are others too.
The Cloud Firestore SDK in Firebase uses grpc as part of its transport protocol. If you're not using Cloud Firestore then the grpc library will not be included as far as I know.
To ensure that unused methods are removed, be sure to use ProGuard as part of your release build.
I am working on an Android project that needs three versions of the same application (for example: Admin version, User version, Custom version). I have already created a Google-App-Engine endpoints backend in the User version of the app. I have to start working on the other two versions now and I want to connect these two versions to the backend I created in the User version. I have tried finding the answer to this on the internet but I haven't been successful in doing so. I believe it is possible to connect the other versions of the app to the backend by importing the endpoint libraries from the cloud into the android projects somehow but I haven't been able to find a way to do so yet.
I did come across a way to import an existing module in the Android project but if I do that, then any time when I make changes to the backend in the "User" version, I will have to re-import the module in other versions of the app. I am so lost and confused.
Any help will be deeply appreciated.
Thank you!
After you build your cloud module there is a YOUR_CLOUD_MODULE_NAME-android-endpoints.jar under YOUR_CLOUD_MODULE_NAME/build/libs.
You can copy this jar into libs directory of all your android projects that need to interact with your back-end.
This approach makes it really easy to get out of sync though. After every change to back-end you would need to update the .jar in all dependent modules.
Are all of your Android applications in the same Android Studio project? If so I think you might be able to just add
compile project(path: ':{yourBackendModuleGoesHere}', configuration: 'android-endpoints')
to each of your Android apps build.gradle.
You could probably also make it work even if your backend is in a separate AndroidStudio project as long as they're part of the same gradle build.
Im sure I saw an official guide on this on the conscrypt project site but I cannot find this at all now.
Im wondering to the possibility of building BoringSSL locally and making it available via a bundled JCE Provider i.e. Conscrypt. I can see the BoringSSL project has build instructions but cant see anything about bundling Conscrypt.
Did I dream this was a thing people were doing?
Maybe updating the provider through GPlay, is good enough, but I would like to avoid interfacing with GPlay services if poss (as it can be quite frustrating) but maybe in this case its the lesser of two evils!
Thanks for any info :)
EDIT: Just found this barebones guide to building conscrypt. Conscrypt has a JNI component but assuming this talks direct to BoringSSL. Quoting the BoringSSL intro
We don’t recommend that third parties depend upon it. Doing so is likely to be frustrating because there are no guarantees of API or ABI stability.
How would I make sure that Conscrypt JNI -> BoringSSL are compatible versions I wonder?
Normally when I right-click my app engine project and choose "Generate cloud endpoint client library" using the Google plugin for Eclipse, it generates the client libraries and automatically copies them into the Android client project.
However, for no apparent reason, the client library is no longer being copied to the client project. In fact, it has been removed (so now I have a lot of errors in my project because it can't find the libraries).
I've tried re-generating the client library which completes without any errors but the problem persists. Interestingly, it seems to complete the process slightly faster than it used to.
I've tried cleaning all projects.
I've tried manually adding the generated source folders from endpoint-libs, but I can't because the generated folders no longer exist. There is also no longer any reference to them in the Java build path for the client project.
I've tried checking out an older version of the code where I know the plugin worked, and the problem occurred there too which leads me to believe it is not a problem in my code.
I also tried deleting the project in eclipse and re-importing everything.
What happened? I've used the generate function many times before and it worked every time until now. I think it started after doing a project clean.
An Update
I followed the suggestion here and was able to generate the client library for one of my endpoints, but the actual .jar file which is needed was not generated (the generated readme file even specifically states the filename and location of the jar but it does not exist).
The issue tracker shows that this issue was resolved (https://code.google.com/p/googleappengine/issues/detail?id=9746).
Also #howettl posted above in the comments that this issue was fixed.
There were some questions in the issue tracking about remote servers being involved and the fix not requiring an update to the GPE. This appears to be related to the fact that there is a Google web service used by the GPE for generating some of the cloud endpoint code.
If this web service is not working (routing issue, server issue, etc), or you don't have a connection to the internet, you will not be able to generate (or regenerate) cloud endpoints for your project.
Also if your generation is slow, it might be due to your internet connection speed.