EN version
In some cases, when your app includes a Splashscreen, you may experience no redirections when using an External URL (https) or a Deeplink while your app is killed (totally closed).
This case happens as your mainActivity (homepage) overrides the action preventing the redirection from running properly.
In order to solve have a compliant user experience, you will want your engineering team to follow the steps below :
We will take the Open External URL action as an example.
You will be able to access all types of actions and methods from the following documentation section:
- iOS: https://docs.airship.com/platform/ios/actions/
- Android: https://docs.airship.com/platform/android/actions/
1 - Look up the Open External URL Action entry
ActionRegistry.Entry entry = UAirship.shared() .getActionRegistry() .getEntry("open_external_url_action");
Action registration method can be found here:
- iOS: https://docs.airship.com/platform/ios/actions/#action-registry
- Android: https://docs.airship.com/platform/android/actions/#action-registry
2 - Override the default action of the External URL Action and save the External URL
Call manually the External URL Action later when your app is ready (the splashscreen has been fully loaded).
Remember that Action Situations are like triggers. They are what actually triggers an action to run
- iOS : https://docs.airship.com/platform/ios/actions/#action-situations
- Android : https://docs.airship.com/platform/android/actions/#action-situation
In this case, on PUSH_OPENED, we want to delay this trigger from occurring.
Use the Predicate method that will reject PUSH_OPENED causing the action to never run during that situation :
Predicate<ActionArguments> rejectPushOpenedPredicate = new Predicate<ActionArguments>() { @Override public boolean apply(ActionArguments arguments) {
// Save the arguments.value somewhere you can access it later
return !(Situation.PUSH_OPENED.equals(arguments.getSituation())); } };
`
Make sure to set the predicate :
entry.setPredicate(rejectPushOpenedPredicate);
3 - Trigger the Open External URL Action with the URL
Lastly, when your app is ready, go ahead and manually trigger the Open External URL Action with the URL you saved from arguments.value in your predicate:
// Running an action directly through the ActionRunRequest
ActionRunRequest.createRequest("open_external_url_action") .setSituation(Situation.MANUAL_INVOCATION) .setValue("<Insert the URL from arguments.value here>") .run();
If it still doesn't work, please contact the Support team.
FR version
Dans certains cas, lorsque votre application contient un Splashscreen, les redirections utilisant des liens externes (https) ou des deeplinks peuvent être surchargés par cotre mainActivity (homepage) empêchent ces derniers de fonctionner correctement.
Ce comportement peut se produire lorsque votre application est killée (totalement fermée).
Pour résoudre ce point, veuillez demander à votre équipe technique de suivre les étapes décrites ci-dessous:
Nous prendrons en exemple, l'action Open External URL.
Sachez que vous pouvez accéder à toutes les actions et méthodes depuis la documentation ci-dessous :
- iOS : https://docs.airship.com/platform/ios/actions/
- Android : https://docs.airship.com/platform/android/actions/
1 - Enregistrer de l'entrée de l'action Open External URL
ActionRegistry.Entry entry = UAirship.shared() .getActionRegistry() .getEntry("open_external_url_action");
À savoir que vous avez la possibilité de connaitre tous les enregistrements des actions possibles depuis les liens ci-dessous :
- iOS : https://docs.airship.com/platform/ios/actions/#action-registry
- Android : https://docs.airship.com/platform/android/actions/#action-registry
2 - Surcharger l'action par défaut du External URL Action et sauvegarder l'External URL
Ceci a pour but d'appeler manuellement l'action une fois que votre application (Splashscreen) sera chargée.
Pour information, les "Action Situations" sont des éléments déclencheurs, qui permettent l'action de se déclencher :
- iOS : https://docs.airship.com/platform/ios/actions/#action-situations
- Android : https://docs.airship.com/platform/android/actions/#action-situation
Ainsi, pour la Situation PUSH_OPENED, il faudra retarder le déclenchement de l'action :
// Predicate that will reject PUSH_OPENED causing the action to never run during that situation.
Predicate<ActionArguments> rejectPushOpenedPredicate = new Predicate<ActionArguments>() { @Override public boolean apply(ActionArguments arguments) {
// Save the arguments.value somewhere you can access it later
return !(Situation.PUSH_OPENED.equals(arguments.getSituation())); } };
// Make sure to set the predicate
entry.setPredicate(rejectPushOpenedPredicate);
Déclencher l'Open External URL Action incluant l'URL
Dernièrement, une fois que votre application (splashscreen) sera chargée, vous pourrez déclencher l'Open External URL Action incluant l'URL sauvegardée depuis l'arguments.value de votre predicate.
// Running an action directly through the ActionRunRequest
ActionRunRequest.createRequest("open_external_url_action") .setSituation(Situation.MANUAL_INVOCATION) .setValue("<Insert the URL from arguments.value here>") .run();
Si ceci ne résout pas votre point, n'hésite pas à contacter l'équipe Support.