i finish the activity?
Exeption:
E/ActivityThread: Activity com.ext.pow.[redacted].MainActivity has leaked IntentReceiver io.realm.internal.network.NetworkStateReceiver@fc5313a that was originally registered here. Are you missing a call to unregisterReceiver()?
android.app.IntentReceiverLeaked: Activity com.ext.pow.[redacted].MainActivity has leaked IntentReceiver io.realm.internal.network.NetworkStateReceiver@fc5313a that was originally registered here. Are you missing a call to unregisterReceiver()?
Snippet:
Intent intent = new Intent(MainActivity.this, LoginActivity.class);
startActivity(intent);
finish();
You need to unregister your receivers in onDestroy as the error says
and try make a context field in your class Context context; then in on Create: context = this; and pass context instead of MainActivity.this
Обсуждают сегодня