IntentBuilder
IntentBuilder copied to clipboard
Add check != null to intent
Add check != null to intent , because if MainActivity is running in first time => Nullpointer exception
public static void inject(Intent intent, MainActivity activity) {
if (intent == null) return; // <---- add this line
Bundle extras = intent.getExtras();
if (extras.containsKey("mAppreciateSubmitted")) {
activity.mAppreciateSubmitted = (Boolean) extras.get("mAppreciateSubmitted");
} else {
activity.mAppreciateSubmitted = null;
}
}
Bundle extras = intent.getExtras();
if(extras == null) return; // <---- add this line
// other code
@emilsjolander can we get this fixed? kind of an annoying issue
@amnsinghl seems the lib is no more supported, so now I suggest to use this one compile 'com.github.marcinmoskala.activitystarter:activitystarter:0.30' apt 'com.github.marcinmoskala.activitystarter:activitystarter-compiler:0.30'