After sending the broadcast, the redirect activity problem torched over a day.
At first I thought it was a repeat broadcast. Didn’t solve.
Then see under Caused by: Java. Lang. An IllegalStateException: Can not perform this action after onSaveInstanceState
Life cycle issues. I know why
After the broadcast the activity is on the edge of being killed in some scenario, the system calls the onSaveInstanceState method, which calls the FragmentManager saveAllState method, saves the state of the fragment, and after the state is saved, the user actively calls onBackPressed, The method’s superclass super.onbackPressed determines if the FragmentManager has saved state and throws an exception for IllegalStateException if it has. Then the activity cannot be found when the broadcast is received
It’s easy: let me rewrite it
Override
protected void onSaveInstanceState(Bundle outState) {
// TODO auto-generated method stub
}
At first I thought it was a repeat broadcast. Didn’t solve.
Then see under Caused by: Java. Lang. An IllegalStateException: Can not perform this action after onSaveInstanceState
Life cycle issues. I know why
After the broadcast the activity is on the edge of being killed in some scenario, the system calls the onSaveInstanceState method, which calls the FragmentManager saveAllState method, saves the state of the fragment, and after the state is saved, the user actively calls onBackPressed, The method’s superclass super.onbackPressed determines if the FragmentManager has saved state and throws an exception for IllegalStateException if it has. Then the activity cannot be found when the broadcast is received
It’s easy: let me rewrite it
Override
protected void onSaveInstanceState(Bundle outState) {
// TODO auto-generated method stub
}
Read More:
- Android can’t transfer value when using extras, bundle and intent
- module ‘win32com.gen_py.00020813-0000-0000-C000-000000000046x0x1x9‘ has no attribute ‘CLSIDToClassMa
- The reason and solution of Android intent value not updated
- Error starting userland proxy: listen TCP 0.0.0.0:9000: Listen: address already in use
- The intent solution cannot be updated in onrestart method
- RuntimeError: Expected hidden[0] size (x, x, x), got(x, x, x)
- Solution to the error code of 0x80040154 in COM / ole call
- Apache Groovy——java.lang.NoSuchMethodError: x.x.x: method <init>()V not found
- SSH Login: RSA host key for 192.168.x.x has changed and you have requested strict checking. Host key
- CLP: error: getaddrinfo enotfound http://x.x.x.x/
- [Solved] emulator: glteximage2d: got err pre 🙁 0x502 internal 0x1908 format 0x1908 type 0x1401
- Repadmin has dsreplicagetinfo() failed with status 8453 (0x2105) error
- Error 0x80070079: The semaphore timeout period has expired
- [-] handler failed to bind to x.x.x.x: Port troubleshooting
- A problem occurred configuring project ‘:x x x‘. > java.lang.NullPointerException (no error message)
- register ASP.NET An error has occurred: 0x8007b799
- After win7 shared the printer, the client connection prompt: the printer has been deleted (0x00000709)
- 1067 – Invalid default value for ‘sex‘1366 – Incorrect string value: ‘\xE6\x8A\x80\xE6\x9C\xAF…‘ f
- Vue start error: listen eadrnotavail
- Could not write JSON: write javaBean error, fastjson version x.x.x, class