Is it possible to launch another Android (or iOS) application directly from the Dynamics 365 for Phones mobile application?
Background:
- I'd like to add customizations to Dynamics 365 to be able to launch my mobile app directly from the Dynamics 365 for Phones app.
- I have an Android mobile application that is registered to handle a custom URL scheme (e.g. appscheme://).
- The Android intent filters are in place for the application to be launched in response to this scheme. This works as expected from a browser. That is, clicking a link or redirecting using a URL of format 'appscheme://' will successfully launch the mobile application.
Things I've tried:
- Adding link elements to a web resource. The behaviour varied depending on the link contents. Both worked from Dynamics 365 in the Android Chrome browser:
- href="appscheme://start?param1=blah": The Dynamics app crashes with an error in logcat: "Application attempted to call on a destroyed WebView."
- href="intent://start?param1=blah#Intent;package=com.example.app;scheme=appscheme;end;": nothing appears to happen. There is a logcat message: "Activity: External Activity Launch failed. Error: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=intent://start/?param1=blah }"
- Using the client-side Xrm.Navigation.openUrl function from Javascript with the custom URL scheme or the intent (called from within a web resource). The Dynamics app either crashes, or an exception stack is reported in logcat.
- Creating a URL-based ribbon button using the custom URI scheme. Nothing seems to happen when the button is pressed.