• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
      • Introduction to Data Entry
      • Data Entry Application
      • Data Entry Editing
      • CAPI Data Entry
      • Network Data Entry
      • Android Data Entry
        • Android Development
        • Android Limitations
        • Android Navigation
        • Android Settings
        • CSEntry Settings Modification
        • Interacting With Other Android Applications
        • Launching CSEntry from Other Android Applications
    • Batch Editing Applications
    • Tabulation Applications
    • Data Sources
    • CSPro Statements and Functions
    • Text Templates
    • Templated Reporting System
    • HTML, Markdown, and JavaScript Integration
    • Action Invoker
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataManager>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <CSWeb>

Launching CSEntry from Other Android Applications

If you are an Android application developer and would like to launch CSEntry from your application, there are two approaches, both of which are demonstrated in the CSEntry Launcher application on GitHub.
The two approaches, using an Intent or a deep link, have the following differences:
  • Deep links can open non-entry applications.
  • Deep links for entry applications open the Case Listing activity, whereas the Intent approach skips the Case Listing and opens the Entry activity.
If you are instead interested in ways to interactive with other applications from within CSEntry, there are a variety of ways to do this.
Launching CSEntry Using an Intent
To launch CSEntry, create an Intent using the class "gov.census.cspro.csentry.ui.EntryActivity":
val intent = Intent()
intent.component = ComponentName(
"gov.census.cspro.csentry", "gov.census.cspro.csentry.ui.EntryActivity")
Specify the PFF's filename or path as an extra:
intent.putExtra("PffFilename", "CSEntry Application.pff")
If PffFilename is a fully evaluated file path, that file will be opened. If not, CSEntry will recursively look at files in the csentry directory until finding a file with the filename.
To pass additional parameters that will get added to the PFF, add them as extras. For example, to set the operator ID and the case key:
intent.putExtra("OperatorID", "John Doe")
intent.putExtra(
"Key", "01050669557")
Finally, launch the activity using the Intent:
startActivity(intent)
Launching CSEntry Using a Deep Link
Deep links that run applications using CSEntry begin with "https://csprousers.org/pff". The PFF's filename is specified, following "/pff", as part of the URI's path. If multiple path segments are provided, for example "https://csprousers.org/pff/my-directory/my-survey.pff", the path is treated as a full file path to be evaluated from within the csentry directory. If only a single path segment is provided, for example "https://csprousers.org/pff/my-survey.pff", then CSEntry will recursively look at files in the csentry directory until finding a file with the filename.
To pass additional parameters that will get added to the PFF, add them as query parameters.
For example, code to launch CSEntry using a deep link might look like:
val uri = Uri.parse("https://csprousers.org/pff")
    .buildUpon()
    .appendPath(
"CSEntry Application.pff")
    .appendQueryParameter(
"OperatorID", "John Doe")
    .appendQueryParameter(
"Key", "01050669557")
    .build()

val intent = Intent(Intent.ACTION_VIEW, uri)
startActivity(intent)
See also: Android Development, Interacting With Other Android Applications