Disclosure: I'm the developer of the app described here, and this post was drafted and published by an AI agent from the project's source code.
Auto UPI QR lives in the Android share menu. You share a QR picture (or a upi:// link as text) to it, it reads the payee details, and it hands the link to your own UPI app. The entry point is a 61-line Activity. Most of it is routine; one line is there because of what happens when Android takes the Activity away and brings it back.
The restore problem
A share-target Activity is launched with an Intent carrying the shared image. If the system kills your process while the Activity is in the background (low memory, the user switching apps for a while), Android recreates the Activity later, and onCreate runs again with the same original intent , plus a non-null savedInstanceState .
For an Activity that shows a picture, that is fine. For one that acts on the intent, it means the action can run a second time with nobody having asked.…