Developing java 11 google cloud functions in android studio - android

Now that we can develop google cloud functions with java runtime (or Scala or Groovy).
Anybody using android studio to develop google cloud function using android studio?
If you have a standard build.gradle please post.
Is there a way to auto create pom.xml from gradle build.
can we provision cloud function from within android studio.

Most of this information is already available in the Cloud Functions documentation.
There is a tutotial, available here, that offers an example build.gradle for a sample project, you can build on top of that one for your project's needs.
According to this community answer, you can use the archiveTask task in the Maven Plugin so that a pom.xml file is generated and stored in the <buildDir>/poms directory of your project.
Unfortunately this is not possible. As you can see in this documentation:
You can deploy Cloud Functions from your local machine, from your GitHub or Bitbucket source repository (via Cloud Source Repositories), or from the Cloud Functions API directly.
NOTE: For deployment from the local machine if you follow through the referring documentation you will see that this only applies to a deploy using the gcloud command-line tool

Related

Is there a way to handle Firebase projet and android application creation automation?

I'm working on a continuous project creation from an administrator tool. This tool is able to create a create a gitlab and jenkins project from template.
The android template use Firebase crashlytics and we all know that google-services.json file will be mandatory to use Firebase service.
After creating the project from our template using our administrator tool, jenkins build failed because of lack of google-services.json file.
So to retrieve google-services.json file, we need to create project firebase and android application. All of these actions are manual. My question is there a way to get this file using kind of Firebase APIs to create project and android application ?
Thanks
In android studio you get the option to link your Firebase Account. Double tap Shift and type Firebase You should get the assistant and then follow the instructions.

Share version information in Azure DevOps

I've written a small Android application using Xamarin Android. As the title suggests, I'm using Azure DevOps as CI and Release pipeline. The finally signed APK is published as a GitHub release.
Now I'd like to centralize the version information. At the moment, the Android version information in AndroidManifest.xml and GitHub release version are independent and I have to synchronize them manually.
How can I do this? Obviously, I could do something like:
Centralize version information within a single file
Read file as a build step in Azure DevOps
Pass the extracted information into the Xamarin build step and the GitHub release step.
Is there any built-in approach that comes without this manual ceremony?
I'm not sure about a built-in way but there is this extension (Mobile App Tasks for iOS and Android) for Azure DevOps which provides a 'Bump Version' function. There is a blog post and video about it here.

Add library dependency for my SDK in Xamarin

I have SDK (.jar file) written in Java. I created an Android Java Bindings Library following that description. I used the generated JNI files from the jar to write the API for my Xamarin plugin. I dont have experience with Xamarin, so I would like to ask you these questions:
My SDK.jar file depends on the Google Play Services.jar file. How and where I have to add it? I want to make the plugin to add the Google Play Services automatically to the project where it's installed my plugin. Like Google Play Services plugin adds Support library when it's added.
Could someone explain to me what's the difference between Components and Packages? I have these folders and I dont know in which one I have to add the Google Play Services Plugin and what's the difference.
How to get the current activity from my API files? I dont use Xamarin.Forms. Should I?
Thanks in advance
To clarify:
Answer for 2:
Components are Xamarin Components whereby packages are mostly nuget packages. User is not forced to publish component on Xamarin Component store, but many do. Some don't because Xamarin Component must have accompanying samples, documentation and screenshots, so for the large number of users effort to implement component is substantial. That is the reason a lot of authors just publish their SDKs on nuget.
Xamarin Components are tested before publishing by Xamarin Components Team and the reason is mainly correctness and quality (something like Apple's app submission process). This should help users to have minimal/starter samples that show how the SDK/component work and some documentation.
Some authors publish their components in steps: first nuget and when samples and docs are ready then Xamarin Component which references nuget dependencies mentioned in 1st step. This is called empty-shell (or just shell component). User can install it either as nuget or as component into some application or library.
Packages (nuget) are installed via Nuget Package Manager in Visual Studio or Xamarin studio. While components are added to you project. Samples and docs can be found in Components/ folder in solution root.
Plugins are special form of component used mostly for cross platform Xamarin.Forms (but not only) applications and they utilize special technique called bait-and-switch for loading platform specific dlls (from nugets).
Google Play Services (GPS) are not plugins, because they are Android only, so no need for plugin (ios and Windows parts). I think there is only Game Service on iOS, but not sure.
GPS come in 2 flavors as nuget packages and as components (empty shell).
Here are the answers of my 2 questions:
in component.yaml file before publishing the plugin: http://developer.xamarin.com/guides/cross-platform/advanced/submitting_components/components_and_nuget/
Don't have the answer yet...
Can't get it from API files if you dont send it as a parameter, but then your API is not compatible with the iOS API. Because of this I separated the plugin: one for Android and another for iOS.

App engine cloud endpoints backend and android in the same maven project

Can I create app engine cloud endpoints backend project for my android application, so that I can manage the server and client library code in the same maven project?
Currently I have an android project in android studio, but I want to add a cloud endpoints backend to it. Dont want to manage 2 separate projects in git for these.
You can add the cloud backend using Android Studio itself. It is quiet straightforward!You need to add App Engine first to your package and then generate end points. I have tried it and it works perfectly fine.

Mobile Backend Starter Java - on Android Studio

Has anyone managed to extend "Mobile Backend Starter Java" on Android Studio
https://github.com/GoogleCloudPlatform/solutions-mobile-backend-starter-java
Frustratingly any documentation that exists seems out of date or only for Eclipse".
I want to use Gradle and not Maven , Android Studio and not Eclipse
I followed the Tutorial
https://developers.google.com/cloud/samples/mbs/
but the extend page left me confused
https://developers.google.com/cloud/samples/mbs/extend_backend
I would like to know if anyone has tried this
I thought about going from the other direction creating an app and then Google Cloud Tools and App Engine Backend with Google Cloud Messaging but I do not see a deploy , I did see this, Deploy Google App Engine backend from Android Studio
but have not tried yet
There is a project on GitHub which you can use as module. It provides you with the basic client libraries. You can use it as starting point. See https://github.com/thagikura/mobile-backend-starter-android-client-with-AndroidStudio and follow the instructions there.

Categories

Resources