Android
The CHT Android application can be launched by clicking on a link or invoking an intent in another Android app. This is useful for enabling login by SMS, directing a user to a specific page, and integrating between Android applications.
Sending a URL
When the user clicks on a link to a CHT instance from an SMS, email, WhatsApp, or any other app, Android will prompt the user to choose whether to open the URL in the Android app or the browser. If a CHT app is not installed then the URL will be opened in the browser.
Users can choose “Always” to skip this prompt in future. The prompt may look different depending on the version of Android being used.
Using an intent
To have another Android application launch the CHT Android application, use an ACTION_VIEW intent, for example:
String url = "https://myapplication.app.medicmobile.org";
+ Create documentation issue
+ Create project issue
Android
The CHT Android application can be launched by clicking on a link or invoking an intent in another Android app. This is useful for enabling login by SMS, directing a user to a specific page, and integrating between Android applications.
Sending a URL
When the user clicks on a link to a CHT instance from an SMS, email, WhatsApp, or any other app, Android will prompt the user to choose whether to open the URL in the Android app or the browser. If a CHT app is not installed then the URL will be opened in the browser.
The prompt may look different depending on the version of Android being used. Up to Android 11, users can choose “Always” to skip this prompt in the future. Starting with Android 12, users will be promped to associate the CHT instance’s domain with the Android app. Alternatively, a CHT instance can be configured to have its links automatically verified for the associated Android App (with no user action required). See the docs on Android App Links verification for more information.
Using an intent
To have another Android application launch the CHT Android application, use an ACTION_VIEW intent, for example:
String url = "https://myapplication.app.medicmobile.org";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
-
Version notes
Feature | CHT Core version |
---|---|
Released | 3.10.0 |
Related Content
Related Content
CHT Applications > Reference > app_settings.json > -.token_login
Token login: Instructions and schema for Login by SMS
Feedback
Was this page helpful?
-Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.
Feedback
Was this page helpful?
+Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.