Skype4J icon indicating copy to clipboard operation
Skype4J copied to clipboard

Android (SDK > 19) compatibility

Open ruha9005 opened this issue 7 years ago • 6 comments

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.

ruha9005 avatar Dec 07 '16 10:12 ruha9005

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

bagelcoder avatar Dec 07 '16 22:12 bagelcoder

@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...

ruha9005 avatar Dec 08 '16 07:12 ruha9005

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.

ducc avatar Dec 10 '16 13:12 ducc

@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 avatar Dec 10 '16 15:12 ruha9005

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)

ruha9005 avatar Dec 19 '16 10:12 ruha9005

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

netherpyro avatar Jun 27 '17 11:06 netherpyro