Hiding the URL bar for mobile applications
Using Trusted Web Activities, Trimble’s authentication sign in can be rendered by the user’s browser running in full screen mode without the URL bar. This creates a seamless experience for customers in any sign in UI that requires authentication. For Android apps, you do this using a protocol based on Custom Tabs and Digital Asset Links.
Digital Asset Link for Trimble Identity
- Production:
https://id.trimble.com/.well-known/assetlinks.json - Staging:
https://stage.id.trimblecloud.com/.well-known/assetlinks.json
Requesting an application be added to the assetlinks.json file
To request a new application be added to Trimble Identity’s assetlinks.json file, put a ticket in with support. Please include:
- package_name
- sha256_cert_fingerprints
- Environment (please note if you wish for the same DL to be added across environments)
Example
- package_name: com.trimble.mobile.auth
- sha256_cert_fingerprints: 0F:01:14:0C:EC:CB:48:1D:73:C3:BA:33:23:C6:8D:D7:2B:52:C6:79:5A:C3:08:D3:E9:09:82:FC:DF:5A:E2:4A
- Environment: Staging
Creating the link in your application
-
Add the following line to the manifest file under application:
<meta-data android:name="asset_statements" android:resource="@string/asset_statements" /> -
Add an asset_statements string resource to the strings.xml file. This will specify which files to load for your app.
<string name="asset_statements" translatable="false">[{\"include\": \"https://id.trimble.com/.well-known/assetlinks.json\"}]</string> -
Publish the application to the Google Play Store. The application must be released in the public channel for associations with the JSON to be picked up.