PlotProjects - using dwelling notifications on iOS - ios

I'm using Plot Projects service to send geofencing notifications to users of iOS and Android application.
I want to use "dwelling" event to trigger specific notifications when user remains at one specific geofence for some extended time. The documentation states that dwelling event can be used on iOS, but has certain specifics:
Please note that due to restrictions in iOS the notification filter for dwelling notifications is called when the user enters the geofence or beacon region and that the returned notifications are only shown when the user remains in the region for the specified amount of time.
By my understanding, this would mean that the Notification filter gets triggered as soon as user enters the geofence, but the notification, if properly filtered, will be displayed after user dwells there. Filtering logic in my case is done on server-side - iOS app sends notification info to server, and then appropriate logic is applied to decide whether to show notification or not.
So, server-side logic for checking whether to show notification or not would be triggered at the time user trips geofence, but the notification would be shown to the user once he dwells there for some time. In my specific case, in order to properly decide whether to show the notification or not, I'd need the check to be done at the time the user really dwells, and not on entering. My understanding is that this cannot be done on iOS (unlike Android).
Am I right to assume this? If not, what would be the way to achieve a dwell-time filtering check, as opposed to enter-time filtering check?

You're correct about the moment when the Notification Filter will trigger on iOS. This is done because of platform limitations. The filter will be called directly when you enter the geofence. When you want filter out messages, that is indeed the time to do so. There is no way to filter at the time of the end of the dwelling period.
This, as mentioned, differs from the behaviour on Android. There it will be called at the end of the dwelling period.

Related

Beginner Firebase User FCM Set-Up Questions

FOR iOS
Notifications
Cannot see an option for in app pop up messsages - is it only push/re-engagement message types?
Can the notifcations be automated not just scheduled one by one? Can this be done programatically? I.e. Something left in basket so send automatic push
Can the notifications be triggered based on in app user behaviour not just audience or property and can they have a time lag e.g. 3 days after trigger? I.e. User clicked on X promotion and hasn't returned in 2 days
Active Users 1, 7, 30 day
Accuracy of data - how reliable is the Firebase Active user data - what is the definition of actives reported?
Viewing new vs returning? Is this possible? I cannot find a view of this in the dashboard?
User Properties
When you add the code for the setUserProperty() once is is registered how does Firebase start to gather than data on this user property value?
Cannot see an option for in app pop up messsages - is it only
push/re-engagement message types?
FCM is for Notifications and data messages. At this time, if you want messages to appear in the app, you would use a data payload and handle the appearance of a pop-up within your code. See About FCM Messages for details on Notifications vs data messages.
Can the notifcations be automated not just scheduled one by one? Can
this be done programatically? I.e. Something left in basket so send
automatic push
From the console, you can schedule notifications. If you want to automate based on events, I suggest you use a combination of Cloud Functions for Firebase and the Admin SDK. Store the FCM tokens in the database for sending.
Can the notifications be triggered based on in app user behaviour not
just audience or property and can they have a time lag e.g. 3 days
after trigger? I.e. User clicked on X promotion and hasn't returned in
2 days
As for a delay, that would be something you'd have to handle in your own server.
Accuracy of data - how reliable is the Firebase Active user data -
what is the definition of actives reported?
According to the documentation, "An active user has engaged with an app in the device foreground, and has logged a user_engagement event."
Viewing new vs returning? Is this possible? I cannot find a view of
this in the dashboard?
No, this is not possible. You can see the first_open event and extrapolate from that.
When you add the code for the setUserProperty() once is is registered
how does Firebase start to gather than data on this user property
value?
According to the documentation, "User properties are effectively sticky event parameters that are automatically logged when you call logEvent."

iOS - Schedule http request

I am building a travel app which gives complete information about all transportation systems in my city. There is a requirement to notify the user when there is any change in time table of public transport/delay/any incident. To get that information, app has to hit the server at a specified time, say 9am everyday, and if anything is reported, that has to be notified to the user using local notification.
I am aware that this is not a proper design and there are many limitations with respect to Application states to fire the event. But still can iOS app manage such situation(which should work even when app is in background, suspended, inactive, terminated), as I am not getting any support from backend team?
Unfortunately if your backend team is not giving you any support then you are out of luck. Silent push is the only way to do this as per your requirement (exact time every day even if terminated). You could try the background update method, as apparently iOS learns when you're most likely to use a particular app and will schedule the update accordingly.

Capturing iBeacon messages for later use

have a quick question on iBeacons.
Is there a way the user can capture messages they receive when they
are in a particular range to a beacon? Lets say an iBeacon app is being used
in a retail store, the user walks close to a particular beacon and
gets a message prompt and likes it but when he walks away it goes away
and another message appears. Is there a way for the user to capture
which messages they like and look at it later on even when they are
not in the store r within range to a beacon?
Thank you very much
The iBeacon itself doesn't send any messages to the end user. It just makes a three-part numeric identifier available to the app when the iBeacon is visible through the Monitoring or Ranging APIs. Any messaging directly displayed to the user (through a text field or a notification or whatever) always originates from the app itself, in the use case you describe triggered by the iBeacon being detected.
Because the messages always originate from the app and not the iBeacon, you can simply program the app to save off any messaging for later viewing by the end user.
What you want to achieve doesn't seem to be directly related to ibeacons.
It's more about how you will design your app and features. Surely you can save any kind of messages/notifications for posterior use/visualisation. For example you can store them on a server database or locally using iOS user-defaults of your app.
The same thing happens when you receive SMS or email. An app stores them so you can see later, including the time you received and who sent you.

Geo location notification in iOS

I want implement a geo location notification in iOS, but just in a specific date and time.
The notification will only be launched if the user is in a certain location and at a certain date and time.
Ex.: The user is in Rio de Janeiro and is 12 o'clock.
Does anyone know how to merge these two conditions to launch a notification?
There is nothing built in that I know of -- you will have to code the logic yourself. So you will simply get geo updates from CoreLocation, and you can create a timer to give you time updates, then write some logic that execs periodically and, if the time/place matches your business rules, fire the notification. Note that the app will have to be running to accomplish this. You could send a push notification from an external server, but that server must know where the phone is, and your app must tell it.
Does this help?
It seems that this can be done elegantly as long as location updates are given precedent.
Use this CoreLocation startMonitoringSignificantLocationChanges
To get updates about location, and these updates will be able to start your app in the background (as explained in the docs). Then, in the "application:didFinishLaunchingWithOptions" method of your AppDelegate, include your logic for checking if it is the right time to send a notification (by checking with stuff in CoreData or otherwise).
There shouldn't be a need to create a timer with periodic checks. Just let CoreLocation handle the event's entry point since it'll launch your app in the background at the right location.
This is simple. I assume that you are familiar using the CLLocationManager and the MKReverseGeocoder classes. For your purpose monitoring for only significant location changes would probably be fine (even if that sometimes only happens for moving kilometers). It will help you save battery power on the device.
So, for CLLocationManager's delegate there is a method called locationManager:didUpdateToLocation:fromLocation what you can use. All you need to do is to use reverse geocoding here to determine the actual city's name depending the actual location using the MKReverseGeocoder class. Also, you have to check the local time on the device, match the two, and act accordingly (set up a local notification to wake the app from the background for example).

How to rise Reminder through PeriodicTask in WP7 Mango?

I'm developing wp7 Mango application. I run PeriodicTask and want to notify user according to some conditions. I'm using ShellToast for notification. But to my mind its isn't enough for my purpose. First of all ShellToast disappears after some time and user can easy miss this notification. Secondary that doesn't work when application runs. And minor issue - notification's sound is very quiet.
Reminder is more suitable for me. It is loud and doesn't disappear till user close it. But it isn't possible to create Reminder from background thread, so I've created Reminder on foreground side and set BeginTime = DateTime.MaxValue. On the background I just use ScheduledActionService.Find("ReminderName") for extracting Reminder and change BeginTime property to DateTime.Now. Unfortunately without success.
Does anybody has idea how to rise Reminder through PeriodicTask?
As you've discovered, it's not permitted to set a reminder from a BackgroundTask.
I think you would benefit by considering things from the users persective. As a user:
- would you an app that kept raising notifications that you had to respond to?
- would you want an app ignored the conventions of the platform
- would you want an app that always made loud noises? even if you turned the volume down?
If it's really vital to your app that you notify the user in a more prominent way you coudl send an SMS via an external service.
Or you could have the user subscribe to a web based calendar and then add your events to that calendar from the background thread. But when you get to this point it probably makes sense to move more functionality out of the background task and put that on the server too.

Resources