The the Lotus Notes Traveler client on Android first starts, it will prompt the user for a Server, User name, and password.
When the LotusTraveler.apk is downloaded from the traveler servlet, the Server and user name are pre-filled.
This is accomplished by using the browser history to capture those values.
If the LotusTraveler.apk has been deployed through another means, there are 2 ways for a solution provider to pre-fill the Server and User name fields; with a properties file or by inserting a url into the browser history.
1. Property file
Traveler will look in the directory returned by:
Environment.getExternalStorageDirectory()
for a file named:
/Lotus/TravelerInit.properties
Inside this file, you can set the following properties:
com.lotus.mobileInstall.SERVER
com.lotus.mobileInstall.USER_ID
The values for these properties will be pre-filled in the traveler configuration .
for example a file in:
/mnt/sdcard/Lotus/TravelerInit.properties
could contain.
com.lotus.mobileInstall.SERVER=https://myserver.mycompany.com/servlet/traveler
com.lotus.mobileInstall.USER_ID=userid@mycompany.com
to provide pre-filled values:
2. Browser history.
Lotus Notes Traveler looks uses the Browser bookmarks content provider to look in the browser history. The browser history is retrieved using this code:
getContentResolver().query(Browser.BOOKMARKS_URI, Browser.HISTORY_PROJECTION,
Browser.HISTORY_PROJECTION[Browser.HISTORY_PROJECTION_VISITS_INDEX] + ">0", null,
Browser.HISTORY_PROJECTION[Browser.HISTORY_PROJECTION_DATE_INDEX] + " DESC");
Note: The "last visited" property
must be in the past 24 hours.
The url should be URL encoded with the following parameters
action | must be "GET" |
address | the server name to pre-fill |
userId | the user name to pre-fill |
redirectURL | must contain "LotusTraveler.apk" somewhere in it. |
Here is an example browser history url:
http://myserver.mycompany.com/traveler?action=GET&deviceType=700&address=https%3A%2F%2Fmyserver.mycompany.com%2Ftraveler&userId=username%40mycompany.com&redirectURL=%2Ftravelerclients%2FLotusTraveler%2Fservlet%2Fandroid%2F8.5.4.0.201209101101%2FLotusTraveler.apk
The above url would pre-fill
You can use the Browser.updateVisitedHistory() call to add a url to the browser history.
http://developer.android.com/reference/android/provider/Browser.html#updateVisitedHistory(android.content.ContentResolver,%20java.lang.String,%20boolean)