-
Notifications
You must be signed in to change notification settings - Fork 47
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
Android support #62
Comments
we were aiming for 1.8 support, what sort of support does android have for 1.8? |
The main problem is about Instant class which is not available until Android api level 26. So if you replace Instant by Date (or timestamp or something else from java 1.7), iabtcf-java will support older Android versions. |
Does usage of java.util.stream cause problems for Android? |
No problem with java.util.stream because it is not exposed to user. The only problem that I see is java.time.Instant. |
Hm, I'm not an android expert but that doesn't make sense. Applying your argument, since Android doesn't support Instant and if I were to use it in a way that is "not exposed to the user" why would that work? |
Like it says here or here, some configurations in Android project allow us to use java 1.8 library. I cloned iabtcf-encoder project and tested it on an Android project, and it works by replacing Instant by Long (for example). |
can you test the following code snippet,
|
You are wright, I can't use java 8 languages API for Android API level under 24. It's not as simple as I thought. Thanks for your time. I think we can close this issue. |
can you try this, https://developer.android.com/studio/write/java8-support ? It looks like the way in which you use java8 code in android is you have to recompile it. Have you explored this? |
Yes, I have. Recompilation works fine on newest devices (API level 24+), but when I test on old device (API level under 24), I get java.lang.VerifyError on runtime. |
Do you need to support API level under 24? |
Yes, I do. Device under API 24, represent more than 25%. This not negligible for us. |
Hi,
As mentionned here, do you plan to support Android (java=1.7) in an other repository iabtcf-Android ?
The text was updated successfully, but these errors were encountered: