android firebase schedule notification programmatically (even in months) [duplicate] - java

This question already has answers here:
How can scheduled Firebase Cloud Messaging notifications be made outside of the Firebase Console?
(2 answers)
Schedule FCM Notification using HTTP V1
(1 answer)
Closed 3 months ago.
I am developing a personal app on android studio with java and firebase, in this specific project I don't have registration, protection or something else, just the java code connected to the firebase realtime database.
I'm trying to handle notifications for the first time, I have elements with a release date, I need to trigger a notification when the day of this date comes, it could be days, months or years from the date of creation.
There is a way to do it on firebase? like create programmatically a notification with a specific date scheduled, or, setting some firebase backend code, etc..?
I looked at the other similar questions but found nothing that could guide me in solving my specific problem.
what is the best way to archieve this?
If it's not possible with firebase, what are the other options?
The question that comes closest it's this:
How to trigger notification from firebase at a specific time?
From what I understand what I need can't be done (the question was from 2017 now I don't know if anything has changed), the only way to do it is to set up a server, but it doesn't explain how

Related

background service android java [duplicate]

This question already has answers here:
How to make an android app to always run in background?
(3 answers)
Closed 2 years ago.
I'm developing an android java application,
I'm stuck on a point of how to run a function in the background even if the app is closed.
My goal is to get the user location every 30 minutes.
Thank you.
You can either use JobIntentService or WorkManager for running the task periodically.
JobIntentService
WorkManager Periodically
You can use Service to get user location while the application is in the background.
And for further implementation you can refer below link:-
https://stackoverflow.com/a/8830135/11625897

Google Sign-In ApiException: 10: on a published App [duplicate]

This question already has answers here:
Firebase UI authentication with google fails with message (code:10 message:10)
(4 answers)
Closed 3 years ago.
I've been getting the ApiException 10 error when trying ot sign up with google. BEFORE YOU MARK THIS AS DUPLICATE: My question differs from others 'cause my App IS published on the playstore.
I've been getting ApiException 12500 while using debug and release SHA-1's until I figured I had to use Google Play's sha-1 'cause it's published.
Ok, set, but now I have an ApiException: 10:. The Client IDs I tried are the one I created in the Google Devs console (as Web App since I use Firebase) and the one written inside the google-services.json.
Is it messing up 'cause I'm using google play's SHA-1 or did I miss something? Would it work if I'd be to release it on the store? HOW do I program a Google Sign In and test it before publishing if my App is already on the store?
Btw before someone comes up with it, support mail is there and google auth is enabled.
Okay first things first, Have you added your SHA-1 for both debug and release to your Firebase Project? If yes, have you updated your google-services.json in your Android project ?
Also try updating your Google Play services once.
Also check this answer once if it helps. It's an really unpredictable solution, still give it a shot if it works

Getting all subway stations on Android app

I'm looking for a way to get all subway stations from a country on Android app but I found nothing on how to do it. Seems there is already a feature request about it (https://issuetracker.google.com/issues/35827961) but it's 4 years old. Is there any another way to get that list please?

How to schedule notification for a specific date and time in android studio? [duplicate]

This question already has an answer here:
Set notification for specific date and time [closed]
(1 answer)
Closed 4 years ago.
I want to set notification for a specific date and time (ex: 15/7/2018 02:00:00) in Android.
Can anyone help me?
Thank you.
Actually, it's not a duplicated question since the Android background and scheduling management changed dramatically on the newer versions; it's not really good practice to use AlarmManager.
also, you are not able in most cases.
I recommend using WorkManager from the recent jet pack project.
take a look at
Schedule tasks with WorkManager
WorkManager might use JobScheduler, Firebase JobDispatcher, or AlarmManager. You don't need to write device logic to figure out what capabilities the device has and choose an appropriate API; instead, you can just hand your task off to WorkManager and let it choose the best option.

ANDROID: I want to run a method everyday at 13.00 [duplicate]

This question already has answers here:
Scheduling recurring task in Android
(5 answers)
Closed 8 years ago.
I have an Android App
In my main activity I have a method, which is started when the user clicks a button.
I want to automate this method to run once a day
The method pulls in information and sends it to an local (phone) database.
I am unsure of the alarm service code.
Do I need to put my method into a service and call that at a specified time?
It sounds like you want your method to run every single day regardless of whether the application is open or not. In that case you will need to implement a service. See: http://developer.android.com/guide/components/services.html

Categories