0

I don't understand well the document of Cloud Function provided on the firebase website so I had been watching cloud function Cron Jobs from "Firecast" on YouTube channel "Firebase" (I don`t know why they are all deleted now. why!?)

recently, there are new videos related to the cloud function has been created, so I watched it but the problem is all of them are implemented in javascript.

I am making an Android app and I wonder if I can use Cloud Function Cron Jobs on Android.

I've seen the documentation guideline, but it seems to me (perhaps because of my bad English) using the cloud function in Android seems to have a lot less functionality(features) than when using the cloud function in javascript. (for example, is it able to use Publish/Subscribe system on android-app also? not just http request)

I have to delete a certain amount of data every day. I want to allow users to use "some features" of my app for the number of times allowed per day. So the next day the count should be 0 again.

so my question is, is it nothing problem to use Cloud Function now on Android? (Cron Jobs)

replying me would be really grateful to me thank you for reading this

dontknowhy
  • 2,480
  • 2
  • 23
  • 67

1 Answers1

1

Cloud Functions run on Google's servers, and can be written (at least from the Firebase perspective) in JavaScript or TypeScript. Cloud Functions do not run on your Android device, although they can be called from there.

Making a Cloud Function run on a schedule is unrelated to Android. Have a look at this question for your options: Cloud Functions for Firebase trigger on time?

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • I don't understand what you're trying to accomplish. A cron job is a task that runs at a schedule. When you implement that with Cloud Functions, Android is not involved with it at all. You can definitely call (Callable or HTTPS) Cloud Functions from Android, but that's unrelated to cron jobs. – Frank van Puffelen Mar 22 '19 at 23:31