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

Android (SDK > 19) compatibility #139

Open
ruha9005 opened this issue Dec 7, 2016 · 6 comments
Open

Android (SDK > 19) compatibility #139

ruha9005 opened this issue Dec 7, 2016 · 6 comments

Comments

@ruha9005
Copy link

ruha9005 commented Dec 7, 2016

This project uses Java 1.8. Are there any forks of Skype4J with Java 1.7 (SDK >= 19) compatibility? Because backporting all of this project code will take a long time.

@bagelcoder
Copy link

Java 7 was released 5 years ago. Any particular reason why you can't move on?

@ruha9005
Copy link
Author

ruha9005 commented Dec 8, 2016

@Slacktooth My skills in Java 1.8 are not so high. I thought that someone has already ported this API to Android, and I asked this question not because I'm so lazy or something else...

@ducc
Copy link
Contributor

ducc commented Dec 10, 2016

you dont need to know how to use java 8 features to use skype4j, the internal code is just using java 8 features so it needs 1.8.

@ruha9005
Copy link
Author

ruha9005 commented Dec 10, 2016

@Sponges I know about it, but for Android (SDK 19) compatibility I need to backport code that used java 1.8 features to java 1.7, because Android SDK < 24 (below Android N) doesn't support java 1.8.

@ruha9005
Copy link
Author

ruha9005 commented Dec 19, 2016

Issue resolved.
Maybe helpful for someone:
FOREACH:
//this.resources.forEach(interestedResources::add);
for (String resource : this.resources) {
interestedResources.add(resource);
}

FOREACHREMAINING:
//object.get("capabilities").asArray().iterator().forEachRemaining(value -> //this.capabilities.add(value.asString()));
Iterator iterator1 = object.get("capabilities").asArray().iterator();
while (iterator1.hasNext()) {
JsonValue value = iterator1.next();
this.capabilities.add(value.asString());
}

java.util.Function - https://github.com/streamsupport/streamsupport or https://github.com/aNNiMON/Lightweight-Stream-API

Lambdas - retrolambda or enabling Jack in build.gradle (module level)

@netherpyro
Copy link

@ruha9005 could you provide me resolved project code please? I wasted the whole day to finding a solution to downgrade to 1.7

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

4 participants