# Handling Android Fragment Arguments Across Configuration Changes and Process Recreation

DevFeed: [Handling Android Fragment Arguments Across Configuration Changes and Process Recreation](<https://devfeed.tech/articles/fragmentargs-25445.md>)

Original publisher: [Read original article](<https://hannesdorfmann.com/android/fragmentargs/>)

Author: Hannes Dorfmann

Published: 2014-09-15T09:00:00Z

Content type: tutorial

Language: en

Sources: [Hannes Dorfmann](<https://devfeed.tech/sources/hannes-dorfmann.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Code](<https://devfeed.tech/topics/code.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [crash](<https://devfeed.tech/tags/crash.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [java](<https://devfeed.tech/tags/java.md>), [memory](<https://devfeed.tech/tags/memory.md>), [multitasking](<https://devfeed.tech/tags/multitasking.md>), [state](<https://devfeed.tech/tags/state.md>)

## AI overview

This tutorial explains why Android fragments can lose arguments and crash after screen rotation or background process recreation. It distinguishes temporary instance-state saving from the persistent state needed when an app is destroyed and later restored.

## Source excerpt

Developing for Android is sometimes painful. You have to write lot of code to do simple things like setting up a Fragment. Fortunately java supports a powerful tool: Annotation Processors This post is part of a series of posts about useful annotation processors like ParcelablePlease or AnnotatedAdapter The Problem with Fragments is that you have to set arguments (the parameters) for a fragment to make them work correctly.