How to stop sending notification to users who have not used the app instance for X days?

The requirement is around removing records of Apps that are not in use from local database 

No Channel ID should be maintained where there has been no activity from the app since last N days (eg: 30 days). Require the API that gets inactive ChannelID for both android and iOS.

Didn't find what you were looking for?

New post

Comments

7 comments

  • Hi,

    Do you wish to remove/uninstall channels that are inactive for over 30 days?

    You can use the Channel Listing API to get all of your channels and then filter for all channels who's `last_registration` date is more than 30 days ago.

    Let me know if you have any questions or tell us more about your use case and we'll provide more information.

    Thanks,

    Jay M.
    Airship Technical Support

    Comment actions Permalink
  • Hi Jay, 

    Scenario: 

    Step1 : User downloads the app and activates PUSH notification. 

    Step 2: User does not use the app (does not login at all) for next N days 

    Security requirement is to not have PUSH notification delivered to Channel ID which has not been used by the user for more than N days. Hence, remove the record from local database. 

    Q1. Does Urban Airship track App usage?

    Q2. What timestamp does "last_registration" capture? Is this the last time the user launched the app? Or logged in ? or received a PUSH 

    Q3. Is Uninstallation of the app only way to mark a record in Urban Airship as "Inactive" ?

    Q4. Is the  "/api/channels/uninstall" API called when user disables PUSH notification for the app ? And does it update the status of the instance in Urban Airship as "Inactive".

     

    Comment actions Permalink
    0
    1. Yes, we track some user/app usage.
    2. Date and time. You can see a couple of examples in the API doc I linked to but here is one: "last_registration": "2014-10-07T21:28:35". It is the last activity that was registered, which includes and is most commonly an app open (it will also be tapping a notification but not just receiving one)
    3. I'm not sure if by inactive you mean uninstalled in this case. If the app is uninstalled from the phone the channel will be uninstalled as well. If you use the uninstall API it will mark the channel as uninstalled. 
    4. That API endpoint isn't called when push is disabled, the channel will just be marked as opted out but you can still send it In-App Messages and use In-App Automation, and Message Center. By default, it will automatically be marked as inactive after 12 months of inactivity. But you can call that API endpoint any time to uninstall a channel directly.
    Comment actions Permalink
    0
  • Okay. 

    Q1. "By default, it will automatically be marked as inactive after 12 months of inactivity. " Can this be configured to our needs. Like mentioned above reset this to 90 days for our app. 

    Q2. Is there any notification/feedback sent back to sender if the PUSH notification was NOT delivered to the user as the user has uninstalled the app. 

    Comment actions Permalink
    0
    1. Yes, but the lowest we can set it is 4 months, so this method won't be enough for your use case.
    2. Yes, if an app is uninstalled in which case its device token would not be deliverable, Apple/Google send an indication of this back to our system and this triggers uninstalling the channel on our end.
    Comment actions Permalink
    0
  • Thanks Jay. 

    User1 installs the app in a device say DEVICE1 which assigns it a channelID - say CHANNELID1.

    the app DOES NOT restrict multiple users to login from the same device. If User2 logs into the same device DEVICE1 , does Urban Airship assign a new Channel ID ? 

    Comment actions Permalink
    0
  • It will have the same Channel ID. To be able to target a specific user vs a specific device, we recommend implementing our Named Users feature: https://docs.airship.com/guides/audience/tags-named-users/#named-users

    This way when a user logs in the channel id is associated with a specific named user. When you log out and in with another user it'll disassociate the previous named user from the channel and associate the new one.

    Comment actions Permalink
    0

Please sign in to leave a comment.