Steps to reproduce
- Open the Flutter app on any device running Android 14 or higher.
- Navigate to the section of the app where the eSIM download functionality is available.
- Tap on the "Download eSIM" button.
- The app should take you to the device settings eSIM page to initiate the eSIM addition process.
- Follow the prompts to complete the eSIM installation.
- Upon successful eSIM installation, observe the result code received by the app.
- Note that despite successful installation, the app consistently receives RESULT_CANCELED instead of RESULT_OK.
- Repeat the process on a device running Android 13 or lower to verify that the issue does not occur on earlier versions.
- Document the observed behavior and result codes on both Android 13 (or lower) and Android 14 (or higher) devices for comparison.
- By following these steps, the issue with receiving incorrect result codes upon eSIM installation can be consistently reproduced and analyzed for further investigation and resolution.
Expected results
On Android versions 13 or lower:
-
After completing the eSIM installation process, the Flutter app should receive a result code of RESULT_OK.
The app should successfully handle the RESULT_OK code and proceed with the intended functionality.
On Android versions 14 or higher:
-
After completing the eSIM installation process, the Flutter app should still receive a result code of RESULT_OK.
The app should successfully handle the RESULT_OK code and proceed with the intended functionality.
Regardless of the Android version:
-
Upon successful eSIM installation, the user should be seamlessly redirected back to the Flutter app.
The app should reflect the newly installed eSIM and allow the user to proceed with any relevant actions or features related to the eSIM functionality.
Actual results
On Android versions 13 or lower:
-
After completing the eSIM installation process, the Flutter app successfully receives a result code of RESULT_OK.
The app handles the RESULT_OK code as expected and proceeds with the intended functionality without any issues.
On Android versions 14 or higher:
-
After completing the eSIM installation process, the Flutter app consistently receives a result code of RESULT_CANCELED.
Despite the successful installation of the eSIM, the app does not receive the expected RESULT_OK code.
Regardless of the Android version:
-
Upon successful eSIM installation, the user is redirected back to the Flutter app as expected.
However, due to the inconsistent result code (RESULT_CANCELED on Android 14 or higher), the app may not reflect the newly installed eSIM or allow the user to proceed with relevant actions related to eSIM functionality.
These actual results highlight the discrepancy between the expected behavior (receiving RESULT_OK) and the observed behavior (receiving RESULT_CANCELED) specifically on Android versions 14 or higher. This discrepancy is crucial to address to ensure the consistent and correct functioning of the Flutter app across different Android versions.
`private var lpaActivityIntent = Intent().apply {
action = EuiccManager.ACTION_START_EUICC_ACTIVATION
putExtra(EuiccManager.EXTRA_USE_QR_SCANNER, false)
}
mainActivity.startActivityForResult(lpaActivityIntent, ACTIVATE_ACTIVITY_CODE)
private fun onActivate(resultCode: Int) {
// Handling different result codes
}`
Platform Channel Communication: The result of the eSIM activation process will be communicated back to the Dart side (Flutter) using a platform channel. Depending on the result code received (RESULT_OK, RESULT_CANCELED, or others), appropriate callbacks will be invoked to communicate the result back to the Flutter side.
activateCallback?.invoke(Result.success(ActivateEsimReply(ServiceResult.OK)))