I see crashes in the Google Play crash log that is really stumping me.
java.lang.RuntimeException:
at android.app.ActivityThread.performLaunchActivity (Ac
After some search i finally fix the issue. You have to check 3 things.
null
or not (otherwise you will get a NullPointerException)Sample code example :
public class MyDialogFragment extends DialogFragment{
private String id;
public static MyDialogFragment newInstance(String id) {
MyDialogFragment f = new MyDialogFragment ();
Bundle args = new Bundle();
if(id!= null){
args.putString("id", id);
}
f.setArguments(args);
return f;
}
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if(savedInstanceState != null){
id= savedInstanceState.getString("id");
}
}
}