samczsun / Skype4J

Skype API written in Java. Does not support P2P chats
Apache License 2.0
145 stars 48 forks source link

getMood() and getRichMood() always return null. #103

Closed MrPowerGamerBR closed 8 years ago

MrPowerGamerBR commented 8 years ago

As the title says, getMood and getRichMood always return null, even if the user has a mood.

Every Skype API I tried has the same problem, but Web Skype can get the user's mood, so maybe it is possible to fix this, right?

samczsun commented 8 years ago

I'll take a look. It's about high time this project got kick started again

MrPowerGamerBR commented 8 years ago

@samczsun yay!

Also, before I create another issue, is there is anyway to get all the users groups? (There is a method to create groups, but there isn't a method to get the user groups, skype.getAllChats() returns an empty list).

Now, the last question, it is impossible to get the contact (not the client, the other person) status? (Online, Busy, Offline...)

samczsun commented 8 years ago

You can use Skype#loadMoreChats(int amount) to load more chats into memory.

There is no way yet to check if someone is online

MrPowerGamerBR commented 8 years ago

@samczsun using Skype.loadMoreChats causes an NullPointerException no matter what number I use in "amount"

com.samczsun.skype4j.exceptions.ConnectionException
    at com.samczsun.skype4j.internal.ExceptionHandler.generateException(ExceptionHandler.java:110)
    at com.samczsun.skype4j.internal.SkypeImpl.loadMoreChats(SkypeImpl.java:196)
    at com.mrpowergamerbr.skykaty.SkyKatyApp.searchContactsByName(SkyKatyApp.java:177)
    at com.mrpowergamerbr.skykaty.SkyKatyApp.main(SkyKatyApp.java:97)
Caused by: java.io.IOException: stream is closed
    at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.ensureOpen(HttpURLConnection.java:3309)
    at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3334)
    at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
    at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
    at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
    at java.io.InputStreamReader.read(InputStreamReader.java:184)
    at com.eclipsesource.json.JsonParser.read(JsonParser.java:319)
    at com.eclipsesource.json.JsonParser.parse(JsonParser.java:60)
    at com.eclipsesource.json.JsonValue.readFrom(JsonValue.java:91)
    at com.samczsun.skype4j.internal.Utils.parseJsonValue(Utils.java:52)
    at com.samczsun.skype4j.internal.Utils.parseJsonObject(Utils.java:42)
    at com.samczsun.skype4j.internal.SkypeImpl.loadMoreChats(SkypeImpl.java:161)
    ... 2 more
samczsun commented 8 years ago

Oh great. They changed that too :/

MrPowerGamerBR commented 8 years ago

@samczsun also, the new commit broke getAllContacts() :/

Before:

Contatos: 765

After:

Contatos: 1

And the only contact shown is me, using skype.loadAllContacts() throws an error.

MrPowerGamerBR commented 8 years ago
Exception in thread "main" java.util.UnknownFormatConversionException: Conversion = '2'
    at java.util.Formatter.checkText(Formatter.java:2579)
    at java.util.Formatter.parse(Formatter.java:2555)
    at java.util.Formatter.format(Formatter.java:2501)
    at java.util.Formatter.format(Formatter.java:2455)
    at java.lang.String.format(String.java:2940)
    at com.samczsun.skype4j.internal.Endpoints$EndpointConnection.connect(Endpoints.java:346)
    at com.samczsun.skype4j.internal.Endpoints$EndpointConnection.get(Endpoints.java:275)
    at com.samczsun.skype4j.internal.client.FullClient.loadAllContacts(FullClient.java:119)
    at com.mrpowergamerbr.skykaty.SkyKatyApp.searchContactsByName(SkyKatyApp.java:177)
    at com.mrpowergamerbr.skykaty.SkyKatyApp.main(SkyKatyApp.java:97)

This didn't happen before the last commit. :/

samczsun commented 8 years ago

Try again

MrPowerGamerBR commented 8 years ago

@samczsun thank you! Now it is working without any issues :)

MrPowerGamerBR commented 8 years ago

Also, getAllChats is working now! (I thought you didn't fix it yet) :smile: