The project minsdk is set to 16. Is this a hard requirement of the library ?
I think that's due to ActivityLifecycleCallbacks, which was introduced in API 14.
Gonna dig further why 16.
It's just 16 because I haven't had a reason to support anything lower for quite a while now. The latest distribution numbers show that < SDK 16 is at 4.9% and falling. It would probably work just fine at minSDK 14 (but, as @leonardo2204 said, not lower than that).
@EricKuck Exactly, min 14 will work just fine, but I agree, I don't see the point, but below that won't work
Looked into it further - apparently the startActivityForResult method didn't come about until SDK 16, so that is actually the hard minimum. Thanks for checking into it.
The startActivityForResult without the bundle was there from the beginning.
If you check ActivityCompat.startActivityForResult, you see:
/**
* Start new activity with options, if able, for which you would like a
* result when it finished.
*
* <p>In Android 4.1+ additional options were introduced to allow for more
* control on activity launch animations. Applications can use this method
* along with {@link ActivityOptionsCompat} to use these animations when
* available. When run on versions of the platform where this feature does
* not exist the activity will be launched normally.</p>
*
* @param activity Origin activity to launch from.
* @param intent The description of the activity to start.
* @param requestCode If >= 0, this code will be returned in
* onActivityResult() when the activity exits.
* @param options Additional options for how the Activity should be started.
* May be null if there are no options. See
* {@link ActivityOptionsCompat} for how to build the Bundle
* supplied here; there are no supported definitions for
* building it manually.
*/
public static void startActivityForResult(Activity activity, Intent intent, int requestCode,
@Nullable Bundle options) {
if (Build.VERSION.SDK_INT >= 16) {
ActivityCompatJB.startActivityForResult(activity, intent, requestCode, options);
} else {
activity.startActivityForResult(intent, requestCode);
}
}
So if it's really wanted, conductor could behave the same and drop the bundle like ActivityCompat does..
I personally don't need it and am looking forward to even drop API 17.
@PaulWoitaschek That's so naive of you to say, I mean there lots of bad guys with devices lower than api 16,
Anyways it's great it works for them aswell :D
Most helpful comment
Looked into it further - apparently the
startActivityForResultmethod didn't come about until SDK 16, so that is actually the hard minimum. Thanks for checking into it.