I'm trying to make kind of a reminder app and for that to work I'll need it to auto start when the phone comes on in order to track the time. Was thinking of using Messaging Center but that would only work when the app is active and running already. I'm using Xamarin.forms so would appreciate if someone could point me in the right direction.
Asked
Active
Viewed 1,259 times
1 Answers
0
Android has an AlarmManager that can start a service at specific times.
iOS has no such feature, and hence it can't be done on iOS due to security restrictions.
The only think I could think of, is to schedule a LocalNotification on iOS that the user would then have to press to open the app, but at least it would be a reminder of sorts. Not sure if that will suffice.

Adam
- 16,089
- 6
- 66
- 109
-
Ok. I don't know how to implement that using Forms. But let's say you want to do a messaging style app, where the app should auto start in the background listening to whenever the user gets a message. Any ideas on where to point to?? – John Feb 23 '17 at 16:49
-
Having your app start automatically or receive messages, is a native feature, you won't get anything like this with forms. This means that in your Forms app you need to implement these things natively on each platform specific project. Push notifications would be the only thing that could keep running even when the app is closed and you would be able to receive them and press on it and it would launch the app, or open it if it wasn't already. – Adam Feb 23 '17 at 23:39
-
http://stackoverflow.com/questions/36460571/xamarin-alarmmanager-android and https://developer.xamarin.com/guides/ios/application_fundamentals/notifications/local_notifications_in_ios_walkthrough/ – Adam Feb 25 '17 at 00:08