Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API 14 #48

Closed
ZacSweers opened this issue Jul 25, 2015 · 5 comments
Closed

API 14 #48

ZacSweers opened this issue Jul 25, 2015 · 5 comments

Comments

@ZacSweers
Copy link
Contributor

Back with this again, sorry again :/

All the current tests pass whenever I try with API 14, and I can't find any significant UI changes between 14 and 15 that would impose a limitation on this library in the future.

Totally understand if you'd rather not though, just putting it up for consideration!

@JakeWharton
Copy link
Owner

I choose 15 by default for everything. There's no reason to support anything less in 99.99% of reasonable cases. That said, send a PR for this and I'll merge it.

@ZacSweers
Copy link
Contributor Author

Totally agree, it's just inertia for us since we have a ton of users (1 million...) still on API 14 devices for some reason.

That said, I just did some research, and found a solution for this via the ManifestMerger docs.

tools:overrideLibrary marker

A special marker that can only be used with uses-sdk declaration to override importing a library which minimum SDK version is more recent than that application's minimum SDK version.
Without such a marker, the manifest merger will fail. The marker will allow users to select which libraries can be imported ignoring the minimum SDK version.

Example, In the main android manifest :

<uses-sdk android:targetSdkVersion="14" android:minSdkVersion="2"
              tools:overrideLibrary="com.example.lib1, com.example.lib2"/>

will allow the library with the following manifest to be imported without error :

 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.example.lib1">
        <uses-sdk android:minSdkVersion="4" />
    </manifest>

One can just add the following to their manifest to force their SDK versions over the library:

<uses-sdk tools:overrideLibrary="com.jakewharton.rxbinding" />

Much nicer solution than modifying the library itself for everyone, so no worries on needing a PR from me on it now :)

Thanks anyway! Wish I'd thought to look for override mechanisms before opening the issue.

@JakeWharton
Copy link
Owner

Fair enough. If the customization becomes a problem, it's just one PR away...

@siavashabdoli
Copy link

siavashabdoli commented Jun 15, 2016

can I override library api v 10?! 6 percent of android devices in our country have gingerbread android version. so we have to support 2.2.3. which functionality can meet problem in this case?!
@JakeWharton

@JakeWharton
Copy link
Owner

As long as you don't use bindings which reference things added after API 10
it should probably work.

On Wed, Jun 15, 2016 at 9:24 AM Siavash A notifications@github.com wrote:

can I override library api v 10?! 6 percent of android devices in our
country have gingerbread android version. so we have to support 2.2.3.
which functionality can meet problem in this case?!


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#48 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAEEERIFuNiIn9QMTVKcK-45JfUBraQfks5qL_0HgaJpZM4Ffzbo
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants