How deploy my app with Google Cloud Run?

Hi community.
I would like to deploy my app in sideloading.
I have read tutorial on Gogle App Engine, but I'm evaluating Google Cloud Run because it seems cheeper.
Do you know step by step tutorial/guide on this topic? I'm not a developer so I need a guide.
Thank you!

Google Cloud Run seems a bit over the top for what you require. Why not use, to begin with, a free hosting provider, create an html page and upload your files for sideloading there ?

Hi @TIMAI2 , it's always a pleasure talking to you.
Unfortunately, I'm not an expert, so I sometimes ask the wrong questions, but your support is invaluable.

Current situation:

  • I download my APK from MIT App Inventor
  • I have a database on Firebase (Realtime)
  • I have storage on Firebase
  • I'd like to create my website with a download link for the APK file

Questions

  • Can I use Firebase storage to store the APK file?
  • Will the APK file also contain all the images and resources I used to create my app?
  • Are there any additional steps required? Don't I have to use Google App Engine or Cloud Run? Don't I need a PaaS?

Thank you!!!

How to create a web page that can host downloading apk files links might help you do what Tim suggested

Thank you @SteveJG for your support :slight_smile:

Yes

Yes

No, no & no

Here is an example of a static web page providing download links:

https://metricrat-hosting.web.app/

(this is hosted using firebase hosting, but it could be offered on any hosting provider)

The html is quite simple, herewith for just one section, showing a firebase storage link:

<div class="w3-container w3-dark-gray"> 
  <h3>Canvas to Base64</h3>
  <p>This extension provides the functionality to convert a canvas background image to a base64 string.</p>
  <p>Filename: uk.co.metricrat.canvasbase64.aix </p>
  <a href="https://firebasestorage.googleapis.com/v0/b/metricrat-hosting.appspot.com/o/Extensions%2Fuk.co.metricat.canvasbase64.aix?alt=media&token=10e0b6ac-c8a8-4e2b-a412-2783df959678&_gl=1*zzuq69*_ga*ODgwNDAzNTA5LjE2NzYwMzU4Mzk.*_ga_CW55HF8NVT*MTY5NTkzMDMwNS43My4xLjE2OTU5MzAzMzQuMzEuMC4w" class="w3-btn w3-ripple w3-blue w3-round-large" download>Download</a>
  <br><br>
</div>

@TIMAI2 thank you very much for your help!

Hi @TIMAI2 , in this post we said that for my app it's sufficient to store the APK file in Firebase Storage, have the database in Firebase Realtime, and have a download link on my website (the backend doesn't need to be hosted via Google App Engine).

My intention is to automatically check for updates each time my app is initialized. I was thinking of uploading a JSON file containing the latest version number and the download link to Firebase Storage, then implementing the check logic in the app using the MIT App Inventor Web Component.

My question:
I read that when I deploy a new version of my app, I need to delete instances of old versions to avoid unexpected costs (so deactivating the old versions and redirecting traffic).
Given my setup (NO backend hosting via Google App Engine), what should I do?

If your app is already using firebase, then you could have a tag for updates:

Update
|
__ V1.4:"https://firebasestorage.googleapis.com/v0/b/...."

Test the version number, if greater than the one stored in your tinydb then download the new apk.

Then install the new apk (either from within or outside of your app)

There are several examples on the community of how to do this.

Thank you @TIMAI2 for your suggestion relating how to update the app.
But have you an answer for my question?

Other questions

  • When I install new app, will the new one update the old, or it will add to the old one?
  • Do you think the solution with a tag in tinyDB is better that the one I propose with json file?

Firebase Storage provides 10GB of storage space on the free tier. Should be plenty for holding onto old versions of the app, unless you have an absolutely massive app...However you can easily manage this yourself by deleting obsolete versions. Say your app apk is 10mb in size, you could store up to 1000 versions on the free tier...

In general, if you do not change the package name, a new version of the app will update the existing app on your device

Tinydb is a good way of managing persistent data storage on your app. If you want to use a json file instead, that is up to you.

I understand.
But I referred to instances of an app that "works" in a project in Paas like GAE...I don't know if it is the same thing as a simple APK file size...
Sorry if I'm saying strange things...but I'm not an expert.
Will I have to manage instances? If yes, how in Firebase?

If you are not using these Paas in GAE solutions, why the questions ?

Instances ? Do you mean updated apks, if so the answer is most likely yes, they will need to be uploaded to firebase storage, you will need to get the download url, and update your firebase version tag.

I refer to this

Welcome. There are several options for checking for updates to your application.

Previously, I used Google Sheets, entering the application name, download link, and version number. However, this tool no longer works due to updates to the App Inventor platform.

The version number was moved to the project properties.

Previously, it was in the properties on screen 1. After that, I devised a method to check for updates using Cloud DB.

I created two applications: one for the admin or owner, which uploads the update, and another for the application that needs updating.

This is the application responsible for sending updates.
I'm writing the app ID, which is a cloud tag, the new version number, and the app download link.

image

Here's how to check the version number

Finally, if it checks the update version in the cloud and finds it to be higher than the application version, it will notify the user to update.

Here I put the current application version because I can't get it from the legislator properties. Previously I could get it from the properties on screen 1.

This way you can upload your application anywhere applications are uploaded, and it will automatically check for updates via cloud database.

I hope my explanation is clear. Thank you.

1 Like

image

Here I write the current application version

You do not have to use it so why worry about it ?

I thought that manage Google cloud platform instances is mandatory... But this is not true.
Ok, thank you very much!

Hi @The_Legend_Of_MTS thank you for your support.
Your solution is ok, but it seems a bit more complicated if compared to json solution or tag in tinydb solution suggested by TIMAI2.
Could you explain me if your solution has advantages?

There are no specific advantages to this solution. All I did was devise a way to make the application check for updates in Cloud Database only. If the community has other methods, you should search for "app update".