Android App Integration – PAN Service (Protean / NSDL)To enable the PAN application service within the partner’s own Android application, partners must ensure that the required Protean PAN applications are installed on the user’s device before initiating the PAN flow.Prerequisite: Required ApplicationsPartners must verify the installation of the following apps on the user’s mobile device:
Package Name: com.nsdl.panservicedriver Play Store URL: https://play.google.com/store/apps/details?id=com.nsdl.panservicedriverApp Installation HandlingIf either app is not installed, the partner app must redirect the user to the Google Play Store to install the missing application.PAN flow should be initiated only after both apps are installed.Redirecting User to Protean PAN AppOnce the authorization token is generated using the Get Authorization API, partners should launch the Protean PAN application using the following Android intent.Open Protean PAN App (Kotlin)private fun openNsdlApp() { val intent = Intent() intent.setClassName( "com.nsdl.panservicedriver", "com.nsdl.panservicedriver.MainActivity" ) intent.putExtra("authorization", authorization) intent.putExtra("show_receipt", true) startActivityForResult(intent, 1001) }Receiving Response from Protean AppAfter the PAN process is completed (success, failure, or incomplete), the Protean app redirects the user back to the partner app with the result.Handle App Response (Kotlin)override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { super.onActivityResult(requestCode, resultCode, data) if (requestCode == 1001) { if (resultCode == RESULT_OK) { val b = data?.extras if (b != null) { val jsonData = b.getString("data", "") val encryptedData = b.getString("encrypted_data", "") } } } }