Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Wake Xamarin.iOS app once a day / Night notification

$
0
0

I have a problem that i don't really know how to solve.

Background:

I'm developing a exercise app with Xamarin (native, Xamarin.Android & Xamarin.iOS).

The user will have to schedule when they are suppose to exercise, for example 2 pm every Thursday. The user gets an local local notification at 2 pm, that says "Hey - exercise". Afterwards the user are supposed to register the training session in the training log (Fitness journal, don't know the correct word).

I have all of that implemented but here is

The problem

Every night (8 pm) a user has planned to work out, an local notification should fire if there is no entry in the diary. The notification is suppose to say "No entry in the log."

I can see two ways how to solve this, but I wanna hear if you have any suggestions.

My customer don't have a lot of money, so a time-efficient solution is preferable.

1. possible solution

When a user schedule his/hers training set two alarms. One at 2 pm (that says "Hey exercise"), and another at 8 pm (that says "No entry in the log").

When a user add a entry in the log, find and dismiss the 8 pm notification.

2. possible solution

Try to wake the app at 8 pm every night and check if today was scheduled and if there are any entry in the training log. If scheduled but no entry -> fire local notification. Otherwise do nothing.

The problem with this solution is that I don't know how to wake the app at a specific time, from the background. I've not implemented remote push-notifications, so a silent remote push notification is not possible I think (with the customers budget).

I've tried with "background fetch", but no success there and I've read it's unreliable.

So any thoughts?

Am I missing anything obvious?

I really appreciate your thoughts!

Thanks :)


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>