Xamarin.forms how to add Local Reminder - xamarin.forms

I make a Xamarin.forms app and try to make a reminder. I follow this documentation.
I've created everything and tested and work perfectly fine. Now my scenario is every user can add one or more reminders. Reminder can be called from every hour to every day depending on how the user configure the reminder.
How to organize this? My main question is how to save that list of reminders in the device and depending on time the OS should call it?

Related

Is it possible to change contents dynamically which Alexa skill shows without any user actions?

I want to create a Photo Frame Skill for Echo Show.
I want to change photos triggered by external server (such as Firebase and so on).
Is it possible to change it dynamically without any user actions?
I saw Notification API and Proactive Events API.
But, These show notifications to user. I don't want to show anythings to user.
I want just trigger controlled from external server to change contents.
The answer depends a lot on the type of skill (for example if it is based on Alexa Conversations or not). But you can try exploring something along this line:
Keep the token of last rendered APL document
Send an APL ExecuteCommand directive from your skill server (https://developer.amazon.com/en-US/docs/alexa/alexa-presentation-language/apl-interface.html#executecommands-directive)
You can use one of the standard APL commands, depending upon your use case. One option is SetValue command (https://developer.amazon.com/en-US/docs/alexa/alexa-presentation-language/apl-standard-commands.html#setvalue-command) to modify the background image.
I want to create a Photo Frame Skill for Echo Show
Technically, a skill can last for a maximum of 5min30sec without any user interaction. Only if you provide a prompt that last for 4min then a reprompt that last for 90sec. It could be a blank audio. But Alexa is not suited for custom skills that stays live for a long time without user interactions.

Best Practices using Firebase (Saving)

I'm currently making a online mobile game. It's like an online Idle Clicker.
In order to save the data I will use firebase. I'm still deciding if I should use the "Realtime Database" or " Cloud Firestore". (If any of you could help me too I would appreciate).
My main question is: When should I save my data ?
Saving the data every second is crazy because I will spend millions of euros. Even saving the data every minute seems not a viable solution to me.
I have searched and I can save the game everytime the user press the Home Button to leave the app. What if the user is playing and the phone dies?
Is there any other better solution that I am not thinking of ?
Thank you very much, Gonçalo
I would use OnApplicationQuit() for this. It's called whenever your game is closed. It won't be called if the device loses power though, so if you're worried about that you could start a timer when the game is opened and do autosaves every 10 minutes or on certain scene switches (if the player exits to the main menu for example).
This thread has more info on the topic that you may find useful.

Custom events in Firebase

I know this has been discussed a lot on SO, but even based on the previous questions and answers I still can't quite understand the details of how event logging is really supposed to work in Firebase.
Let's say somewhere in my code I have this:
FirebaseAnalytics mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
Bundle bundle = new Bundle();
bundle.putInt("card_id", 912);
mFirebaseAnalytics.logEvent("card_open", bundle);
Do I understand correctly that the "card open" even should now appear in Firebase Console with the "card_id" parameter?
Then I click More > Edit parameter reporting, enter the name of the parameter I added in my code, and it should appear on the list.
I have read the docs several times, but I still can't get it. Can I not even use any of the events and parameters provided by FirebaseAnalytics.Param and FirebaseAnalytics.Event and just send custom events/parameters (within the known limits, of course).
Another question is whether the limit on the number of global parameters force you to use Big Query?
Thank you!
You're correct. You should see the card_open event with card_id parameter in the analytics console.
Note that there's a delay in the analytics reporting, about 4 to 6 hours after it was logged and uploaded by the device.
Just to ensure that your implementation is correct. I mean, to verify that the events, parameters and user properties are logged in the right time and the right place correctly, use the DebugView console.
I also believe that you should be able see the card_id parameter in the custom reporting for card_open event, considering the delay in the reporting.
For your last question, the parameter limit is on a project level perspective now, compared before that it was per app. Parameters with the same name across different apps will be counted as 1. Not sure, maybe Firebase would like us (developers) to use the parameters accordingly.

IFTTT - record timestamp (rather than time range) in Google Calendar

I created an IFTTT recipe that logs the time I arrive and leave work every day, but it always records it in 1hr blocks.
I'm using iPhone's location to track when I arrive and leave. Everything seems to be working, but calendar events are showing as 1hr blocks rather than just a timestamp.
For example, if I arrive at 8:05am it will show as a block on my calendar from 8:05 to 9:05 rather than just showing for one minute. I'd rather it just say "I arrived at work at 8:05". Thanks in advance!
Am I right in assuming you used the default "Track your work hours in Google Calendar" applet made by Google ?
It uses the Quick add event action to add this event to your calendar. Instead, create your own version of the applet that uses the Create a detailed event action. This allows you to set the following parameters (specifically, it includes Start time and End time):
You can set the start time and end time to the same value, but it will, of course, still read as an event that runs from e.g. 9:05 to 9:05.
If you want to record just a single timestamp, you will need to use a different service to store your data. Perhaps record the data in a Google spreadsheet ?
Any queries, post a comment and I'll get back to you.

How do I know with telegram bot if a user has changed telegram profile photo?

How can I get a picture when the telegram user changes his main photo? Can I get this without cron?
I assume that you know getUserProfilePhotos method.
You can't get notified when users changed their profile photo, so you need to track it, like using cronjob.
You can use getUserProfilePhotos feature and save the last profile picture in a database. Then by checking the last profile picture in specific time periods (for example every 30 seconds) you can check whether the picture is changed or not. And if it was changed you can notify yourself.

Resources